dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
- [ --enable-freetype freetype support (default enabled)])
+ [ --enable-freetype freetype support (default enabled)])
if test "x${enable_freetype}" != "xno"
then
FREETYPE_PATH="${PATH}"
fi
fi
+dnl
+dnl CoreAudio plugin
+dnl
+AC_ARG_ENABLE(coreaudio,
+ [ --enable-coreaudio CoreAudio module (default enabled on MacOS X)])
+if test "x${enable_coreaudio}" != "xno" &&
+ (test "x${SYS}" = "xdarwin" || test "x${enable_coreaudio}" = "xyes")
+then
+ AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
+ [ BUILTINS="${BUILTINS} coreaudio"
+ PLUGINS="${PLUGINS} coreaudio_resampler"
+ LDFLAGS_coreaudio="${LDFLAGS_coreaudio} -framework CoreAudio"
+ LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox" ],
+ [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
+fi
+
dnl
dnl Interface plugins
dnl
dnl Skins module
dnl
AC_ARG_ENABLE(skins,
- [ --enable-skins Win32 skins module (default enabled on Win32)])
+ [ --enable-skins Win32 skins module (default enabled on Win32)])
if test "x${enable_skins}" != "xno"; then
if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
PLUGINS="${PLUGINS} skins"
[if test "x${enable_macosx}" = "xyes"
then
BUILTINS="${BUILTINS} macosx"
- PLUGINS="${PLUGINS} coreaudio_resampler"
- LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
- LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
+ LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
BUILTINS="${BUILTINS} macosx"
- PLUGINS="${PLUGINS} coreaudio_resampler"
- LDFLAGS_macosx="${LDFLAGS_macosx} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
- LDFLAGS_coreaudio_resampler="${LDFLAGS_coreaudio_resampler} -framework AudioToolbox"
+ LDFLAGS_macosx="${LDFLAGS_macosx} -framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC"
)])
dnl
SOURCES_alsa = modules/audio_output/alsa.c
SOURCES_arts = modules/audio_output/arts.c
+SOURCES_coreaudio = modules/audio_output/coreaudio.c
SOURCES_aout_directx = modules/audio_output/directx.c
SOURCES_esd = modules/audio_output/esd.c
SOURCES_aout_file = modules/audio_output/file.c
/*****************************************************************************
- * aout.m: CoreAudio output plugin
+ * coreaudio.c: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: aout.m,v 1.29 2003/03/16 20:06:34 jlj Exp $
+ * $Id: coreaudio.c,v 1.1 2003/03/30 23:35:06 jlj Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
#include "aout_internal.h"
-#include <Carbon/Carbon.h>
-#include <CoreAudio/HostTime.h>
-#include <CoreAudio/AudioHardware.h>
+#include <CoreAudio/CoreAudio.h>
#define A52_FRAME_NB 1536
static void InitDeviceVar ( aout_instance_t * p_aout, int i_option,
vlc_bool_t b_change );
+static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
+
static void Play ( aout_instance_t * p_aout );
static OSStatus IOCallback ( AudioDeviceID inDevice,
AudioDevicePropertyID inPropertyID,
void * inClientData );
+/*****************************************************************************
+ * Module descriptor
+ *****************************************************************************/
+#define ADEV_TEXT N_("audio device")
+
+vlc_module_begin();
+ set_description( _("CoreAudio output") );
+ set_capability( "audio output", 100 );
+ set_callbacks( Open, Close );
+ add_category_hint( N_("Audio"), NULL, VLC_FALSE );
+ add_integer( "coreaudio-dev", -1, NULL, ADEV_TEXT, ADEV_TEXT, VLC_FALSE );
+vlc_module_end();
+
/*****************************************************************************
* Open: open a CoreAudio HAL device
*****************************************************************************/
-int E_(OpenAudio)( vlc_object_t * p_this )
+static int Open( vlc_object_t * p_this )
{
OSStatus err;
UInt32 i_param_size;
if( var_Type( p_aout, "audio-device" ) == 0 )
{
- InitDeviceVar( p_aout, config_GetInt( p_aout, "macosx-adev" ),
+ InitDeviceVar( p_aout, config_GetInt( p_aout, "coreaudio-dev" ),
VLC_FALSE );
}
/*****************************************************************************
* Close: close the CoreAudio HAL device
*****************************************************************************/
-void E_(CloseAudio)( aout_instance_t * p_aout )
+static void Close( vlc_object_t * p_this )
{
OSStatus err;
+ aout_instance_t * p_aout = (aout_instance_t *)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys;
if( p_sys->b_dev_alive )
if( p_buffer != NULL )
{
/* move data into output data buffer */
- BlockMoveData( p_buffer->p_buffer,
- outOutputData->mBuffers[ 0 ].mData,
- p_sys->i_buffer_size );
+ p_aout->p_vlc->pf_memcpy( outOutputData->mBuffers[ 0 ].mData,
+ p_buffer->p_buffer,
+ p_sys->i_buffer_size );
aout_BufferFree( p_buffer );
}
return( VLC_EGENERIC );
}
- config_PutInt( p_aout, "macosx-adev", i_option );
+ config_PutInt( p_aout, "coreaudio-dev", i_option );
p_sys->i_sel_opt = i_option;
p_sys->devid = p_dev->devid;
{
p_sys->i_sel_opt = i;
var_Set( p_aout, "audio-device", val );
- config_PutInt( p_aout, "macosx-adev", i_option );
+ config_PutInt( p_aout, "coreaudio-dev", i_option );
}
}
SOURCES_macosx = \
modules/gui/macosx/applescript.h \
modules/gui/macosx/applescript.m \
- modules/gui/macosx/aout.m \
modules/gui/macosx/controls.h \
modules/gui/macosx/controls.m \
modules/gui/macosx/intf.m \
* macosx.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: macosx.m,v 1.5 2003/03/30 18:14:38 gbazin Exp $
+ * $Id: macosx.m,v 1.6 2003/03/30 23:35:06 jlj Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
int E_(OpenIntf) ( vlc_object_t * );
void E_(CloseIntf) ( vlc_object_t * );
-int E_(OpenAudio) ( vlc_object_t * );
-void E_(CloseAudio) ( vlc_object_t * );
-
int E_(OpenVideo) ( vlc_object_t * );
void E_(CloseVideo) ( vlc_object_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define ADEV_TEXT N_("audio device")
#define VDEV_TEXT N_("video device")
vlc_module_begin();
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_category_hint( N_("Video"), NULL, VLC_FALSE );
add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_TEXT, VLC_FALSE );
- add_submodule();
- set_capability( "audio output", 100 );
- set_callbacks( E_(OpenAudio), E_(CloseAudio) );
- add_category_hint( N_("Audio"), NULL, VLC_FALSE );
- add_integer( "macosx-adev", -1, NULL, ADEV_TEXT, ADEV_TEXT, VLC_FALSE );
vlc_module_end();