Commit 2516061e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Rename aout_instance_t to audio_output_t

parent d809a3fb
...@@ -52,7 +52,7 @@ function VlcSyntax() ...@@ -52,7 +52,7 @@ function VlcSyntax()
syn keyword cType audio_format_t video_format_t subs_format_t syn keyword cType audio_format_t video_format_t subs_format_t
syn keyword cType es_format_t video_palette_t syn keyword cType es_format_t video_palette_t
" Aout " Aout
syn keyword cType aout_instance_t aout_sys_t syn keyword cType audio_output_t aout_sys_t
syn keyword cType aout_fifo_t aout_input_t aout_buffer_t audio_sample_format_t syn keyword cType aout_fifo_t aout_input_t aout_buffer_t audio_sample_format_t
syn keyword cType aout_mixer_sys_t aout_filter_sys_t audio_volume_t syn keyword cType aout_mixer_sys_t aout_filter_sys_t audio_volume_t
syn keyword cType aout_mixer_t aout_output_t audio_date_t syn keyword cType aout_mixer_t aout_output_t audio_date_t
......
...@@ -167,7 +167,7 @@ struct aout_fifo_t ...@@ -167,7 +167,7 @@ struct aout_fifo_t
struct aout_mixer_t; struct aout_mixer_t;
/** Audio output object */ /** Audio output object */
struct aout_instance_t struct audio_output
{ {
VLC_COMMON_MEMBERS VLC_COMMON_MEMBERS
...@@ -198,10 +198,10 @@ struct aout_instance_t ...@@ -198,10 +198,10 @@ struct aout_instance_t
struct module_t *module; /**< Output plugin */ struct module_t *module; /**< Output plugin */
struct aout_sys_t *sys; /**< Output plugin private data */ struct aout_sys_t *sys; /**< Output plugin private data */
void (*pf_play)( aout_instance_t * ); /**< Audio buffer callback */ void (*pf_play)( audio_output_t * ); /**< Audio buffer callback */
void (* pf_pause)( aout_instance_t *, bool, mtime_t ); /**< Pause/resume void (* pf_pause)( audio_output_t *, bool, mtime_t ); /**< Pause/resume
callback (optional, may be NULL) */ callback (optional, may be NULL) */
int (* pf_volume_set )(aout_instance_t *, float, bool); /**< Volume setter int (* pf_volume_set )(audio_output_t *, float, bool); /**< Volume setter
(optional, may be NULL) */ (optional, may be NULL) */
int i_nb_samples; int i_nb_samples;
}; };
...@@ -221,7 +221,7 @@ static const uint32_t pi_vlc_chan_order_wg4[] = ...@@ -221,7 +221,7 @@ static const uint32_t pi_vlc_chan_order_wg4[] =
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
VLC_API aout_buffer_t * aout_OutputNextBuffer( aout_instance_t *, mtime_t, bool ) VLC_USED; VLC_API aout_buffer_t * aout_OutputNextBuffer( audio_output_t *, mtime_t, bool ) VLC_USED;
/** /**
* This function computes the reordering needed to go from pi_chan_order_in to * This function computes the reordering needed to go from pi_chan_order_in to
...@@ -267,15 +267,15 @@ static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt) ...@@ -267,15 +267,15 @@ static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED; VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED;
VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format ); VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format );
VLC_API void aout_FormatPrint( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ); VLC_API void aout_FormatPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format );
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED; VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
VLC_API mtime_t aout_FifoFirstDate( const aout_fifo_t * ) VLC_USED; VLC_API mtime_t aout_FifoFirstDate( const aout_fifo_t * ) VLC_USED;
VLC_API aout_buffer_t *aout_FifoPop( aout_fifo_t * p_fifo ) VLC_USED; VLC_API aout_buffer_t *aout_FifoPop( aout_fifo_t * p_fifo ) VLC_USED;
/* From intf.c : */ /* From intf.c : */
VLC_API void aout_VolumeSoftInit( aout_instance_t * ); VLC_API void aout_VolumeSoftInit( audio_output_t * );
VLC_API void aout_VolumeNoneInit( aout_instance_t * ); VLC_API void aout_VolumeNoneInit( audio_output_t * );
VLC_API int aout_ChannelsRestart( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ); VLC_API int aout_ChannelsRestart( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * );
/* */ /* */
......
...@@ -261,7 +261,7 @@ typedef struct es_format_t es_format_t; ...@@ -261,7 +261,7 @@ typedef struct es_format_t es_format_t;
typedef struct video_palette_t video_palette_t; typedef struct video_palette_t video_palette_t;
/* Audio */ /* Audio */
typedef struct aout_instance_t aout_instance_t; typedef struct audio_output audio_output_t;
typedef struct aout_sys_t aout_sys_t; typedef struct aout_sys_t aout_sys_t;
typedef struct aout_fifo_t aout_fifo_t; typedef struct aout_fifo_t aout_fifo_t;
typedef struct aout_input_t aout_input_t; typedef struct aout_input_t aout_input_t;
......
...@@ -434,7 +434,7 @@ typedef enum input_event_type_e ...@@ -434,7 +434,7 @@ typedef enum input_event_type_e
/* cache" has changed */ /* cache" has changed */
INPUT_EVENT_CACHE, INPUT_EVENT_CACHE,
/* A aout_instance_t object has been created/deleted by *the input* */ /* A audio_output_t object has been created/deleted by *the input* */
INPUT_EVENT_AOUT, INPUT_EVENT_AOUT,
/* A vout_thread_t object has been created/deleted by *the input* */ /* A vout_thread_t object has been created/deleted by *the input* */
INPUT_EVENT_VOUT, INPUT_EVENT_VOUT,
...@@ -511,9 +511,9 @@ enum input_query_e ...@@ -511,9 +511,9 @@ enum input_query_e
/* Input ressources /* Input ressources
* XXX You must call vlc_object_release as soon as possible */ * XXX You must call vlc_object_release as soon as possible */
INPUT_GET_AOUT, /* arg1=aout_instance_t ** res=can fail */ INPUT_GET_AOUT, /* arg1=audio_output_t ** res=can fail */
INPUT_GET_VOUTS, /* arg1=vout_thread_t ***, size_t * res=can fail */ INPUT_GET_VOUTS, /* arg1=vout_thread_t ***, size_t * res=can fail */
INPUT_GET_ES_OBJECTS, /* arg1=int id, vlc_object_t **dec, vout_thread_t **, aout_instance_t ** */ INPUT_GET_ES_OBJECTS, /* arg1=int id, vlc_object_t **dec, vout_thread_t **, audio_output_t ** */
/* External clock managments */ /* External clock managments */
INPUT_GET_PCR_SYSTEM, /* arg1=mtime_t *, arg2=mtime_t * res=can fail */ INPUT_GET_PCR_SYSTEM, /* arg1=mtime_t *, arg2=mtime_t * res=can fail */
...@@ -603,9 +603,9 @@ static inline vout_thread_t *input_GetVout( input_thread_t *p_input ) ...@@ -603,9 +603,9 @@ static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
* @return NULL on error, or the audio output (which needs to be * @return NULL on error, or the audio output (which needs to be
* released with vlc_object_release()). * released with vlc_object_release()).
*/ */
static inline aout_instance_t *input_GetAout( input_thread_t *p_input ) static inline audio_output_t *input_GetAout( input_thread_t *p_input )
{ {
aout_instance_t *p_aout; audio_output_t *p_aout;
return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout; return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout;
} }
...@@ -617,7 +617,7 @@ static inline aout_instance_t *input_GetAout( input_thread_t *p_input ) ...@@ -617,7 +617,7 @@ static inline aout_instance_t *input_GetAout( input_thread_t *p_input )
*/ */
static inline int input_GetEsObjects( input_thread_t *p_input, int i_id, static inline int input_GetEsObjects( input_thread_t *p_input, int i_id,
vlc_object_t **pp_decoder, vlc_object_t **pp_decoder,
vout_thread_t **pp_vout, aout_instance_t **pp_aout ) vout_thread_t **pp_vout, audio_output_t **pp_aout )
{ {
return input_Control( p_input, INPUT_GET_ES_OBJECTS, i_id, return input_Control( p_input, INPUT_GET_ES_OBJECTS, i_id,
pp_decoder, pp_vout, pp_aout ); pp_decoder, pp_vout, pp_aout );
......
...@@ -92,9 +92,9 @@ struct aout_sys_t ...@@ -92,9 +92,9 @@ struct aout_sys_t
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * ); static void Play ( audio_output_t * );
static void* ALSAThread ( void * ); static void* ALSAThread ( void * );
static void ALSAFill ( aout_instance_t * ); static void ALSAFill ( audio_output_t * );
static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name, static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
vlc_value_t newval, vlc_value_t oldval, void *p_unused ); vlc_value_t newval, vlc_value_t oldval, void *p_unused );
static void GetDevices( vlc_object_t *, module_config_t * ); static void GetDevices( vlc_object_t *, module_config_t * );
...@@ -171,7 +171,7 @@ static void Probe (vlc_object_t *obj) ...@@ -171,7 +171,7 @@ static void Probe (vlc_object_t *obj)
*****************************************************************************/ *****************************************************************************/
static int Open (vlc_object_t *obj) static int Open (vlc_object_t *obj)
{ {
aout_instance_t * p_aout = (aout_instance_t *)obj; audio_output_t * p_aout = (audio_output_t *)obj;
/* Get device name */ /* Get device name */
char *psz_device; char *psz_device;
...@@ -519,7 +519,7 @@ error: ...@@ -519,7 +519,7 @@ error:
return VLC_EGENERIC; return VLC_EGENERIC;
} }
static void PlayIgnore( aout_instance_t *p_aout ) static void PlayIgnore( audio_output_t *p_aout )
{ /* Already playing - nothing to do */ { /* Already playing - nothing to do */
(void) p_aout; (void) p_aout;
} }
...@@ -527,7 +527,7 @@ static void PlayIgnore( aout_instance_t *p_aout ) ...@@ -527,7 +527,7 @@ static void PlayIgnore( aout_instance_t *p_aout )
/***************************************************************************** /*****************************************************************************
* Play: start playback * Play: start playback
*****************************************************************************/ *****************************************************************************/
static void Play( aout_instance_t *p_aout ) static void Play( audio_output_t *p_aout )
{ {
p_aout->pf_play = PlayIgnore; p_aout->pf_play = PlayIgnore;
...@@ -543,7 +543,7 @@ static void Play( aout_instance_t *p_aout ) ...@@ -543,7 +543,7 @@ static void Play( aout_instance_t *p_aout )
*****************************************************************************/ *****************************************************************************/
static void Close (vlc_object_t *obj) static void Close (vlc_object_t *obj)
{ {
aout_instance_t *p_aout = (aout_instance_t *)obj; audio_output_t *p_aout = (audio_output_t *)obj;
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
/* Make sure that the thread will stop once it is waken up */ /* Make sure that the thread will stop once it is waken up */
...@@ -564,7 +564,7 @@ static void Close (vlc_object_t *obj) ...@@ -564,7 +564,7 @@ static void Close (vlc_object_t *obj)
*****************************************************************************/ *****************************************************************************/
static void* ALSAThread( void *data ) static void* ALSAThread( void *data )
{ {
aout_instance_t * p_aout = data; audio_output_t * p_aout = data;
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
/* Wait for the exact time to start playing (avoids resampling) */ /* Wait for the exact time to start playing (avoids resampling) */
...@@ -581,7 +581,7 @@ static void* ALSAThread( void *data ) ...@@ -581,7 +581,7 @@ static void* ALSAThread( void *data )
/***************************************************************************** /*****************************************************************************
* ALSAFill: function used to fill the ALSA buffer as much as possible * ALSAFill: function used to fill the ALSA buffer as much as possible
*****************************************************************************/ *****************************************************************************/
static void ALSAFill( aout_instance_t * p_aout ) static void ALSAFill( audio_output_t * p_aout )
{ {
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
snd_pcm_t *p_pcm = p_sys->p_snd_pcm; snd_pcm_t *p_pcm = p_sys->p_snd_pcm;
......
...@@ -59,7 +59,7 @@ struct aout_sys_t ...@@ -59,7 +59,7 @@ struct aout_sys_t
void (*cleanup) (void *opaque); void (*cleanup) (void *opaque);
}; };
static void Play (aout_instance_t *aout) static void Play (audio_output_t *aout)
{ {
aout_sys_t *sys = aout->sys; aout_sys_t *sys = aout->sys;
block_t *block; block_t *block;
...@@ -72,7 +72,7 @@ static void Play (aout_instance_t *aout) ...@@ -72,7 +72,7 @@ static void Play (aout_instance_t *aout)
} }
} }
static int VolumeSet (aout_instance_t *aout, float vol, bool mute) static int VolumeSet (audio_output_t *aout, float vol, bool mute)
{ {
aout_sys_t *sys = aout->sys; aout_sys_t *sys = aout->sys;
...@@ -83,7 +83,7 @@ typedef int (*vlc_audio_format_cb) (void **, char *, unsigned *, unsigned *); ...@@ -83,7 +83,7 @@ typedef int (*vlc_audio_format_cb) (void **, char *, unsigned *, unsigned *);
static int Open (vlc_object_t *obj) static int Open (vlc_object_t *obj)
{ {
aout_instance_t *aout = (aout_instance_t *)obj; audio_output_t *aout = (audio_output_t *)obj;
aout_sys_t *sys = malloc (sizeof (*sys)); aout_sys_t *sys = malloc (sizeof (*sys));
if (unlikely(sys == NULL)) if (unlikely(sys == NULL))
return VLC_ENOMEM; return VLC_ENOMEM;
...@@ -145,7 +145,7 @@ error: ...@@ -145,7 +145,7 @@ error:
static void Close (vlc_object_t *obj) static void Close (vlc_object_t *obj)
{ {
aout_instance_t *aout = (aout_instance_t *)obj; audio_output_t *aout = (audio_output_t *)obj;
aout_sys_t *sys = aout->sys; aout_sys_t *sys = aout->sys;
if (sys->cleanup != NULL) if (sys->cleanup != NULL)
......
...@@ -54,7 +54,7 @@ struct aout_sys_t ...@@ -54,7 +54,7 @@ struct aout_sys_t
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * ); static void Play ( audio_output_t * );
static void AudioQueueCallback (void *, AudioQueueRef, AudioQueueBufferRef); static void AudioQueueCallback (void *, AudioQueueRef, AudioQueueBufferRef);
/***************************************************************************** /*****************************************************************************
...@@ -76,7 +76,7 @@ vlc_module_end () ...@@ -76,7 +76,7 @@ vlc_module_end ()
static int Open ( vlc_object_t *p_this ) static int Open ( vlc_object_t *p_this )
{ {
aout_instance_t *p_aout = (aout_instance_t *)p_this; audio_output_t *p_aout = (audio_output_t *)p_this;
struct aout_sys_t *p_sys = malloc(sizeof(aout_sys_t)); struct aout_sys_t *p_sys = malloc(sizeof(aout_sys_t));
p_aout->sys = p_sys; p_aout->sys = p_sys;
...@@ -134,7 +134,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -134,7 +134,7 @@ static int Open ( vlc_object_t *p_this )
/***************************************************************************** /*****************************************************************************
* Play: play a sound samples buffer * Play: play a sound samples buffer
*****************************************************************************/ *****************************************************************************/
static void Play( aout_instance_t * p_aout ) static void Play( audio_output_t * p_aout )
{ {
VLC_UNUSED(p_aout); VLC_UNUSED(p_aout);
} }
...@@ -144,7 +144,7 @@ static void Play( aout_instance_t * p_aout ) ...@@ -144,7 +144,7 @@ static void Play( aout_instance_t * p_aout )
*****************************************************************************/ *****************************************************************************/
static void Close ( vlc_object_t *p_this ) static void Close ( vlc_object_t *p_this )
{ {
aout_instance_t *p_aout = (aout_instance_t *)p_this; audio_output_t *p_aout = (audio_output_t *)p_this;
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
msg_Dbg(p_aout, "Stopping AudioQueue"); msg_Dbg(p_aout, "Stopping AudioQueue");
...@@ -155,7 +155,7 @@ static void Close ( vlc_object_t *p_this ) ...@@ -155,7 +155,7 @@ static void Close ( vlc_object_t *p_this )
} }
void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) { void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) {
aout_instance_t * p_aout = (aout_instance_t *)inUserData; audio_output_t * p_aout = (audio_output_t *)inUserData;
aout_buffer_t * p_buffer = NULL; aout_buffer_t * p_buffer = NULL;
if (p_aout) { if (p_aout) {
......
...@@ -108,17 +108,17 @@ struct aout_sys_t ...@@ -108,17 +108,17 @@ struct aout_sys_t
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static int OpenAnalog ( aout_instance_t * ); static int OpenAnalog ( audio_output_t * );
static int OpenSPDIF ( aout_instance_t * ); static int OpenSPDIF ( audio_output_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * ); static void Play ( audio_output_t * );
static void Probe ( aout_instance_t * ); static void Probe ( audio_output_t * );
static int AudioDeviceHasOutput ( AudioDeviceID ); static int AudioDeviceHasOutput ( AudioDeviceID );
static int AudioDeviceSupportsDigital( aout_instance_t *, AudioDeviceID ); static int AudioDeviceSupportsDigital( audio_output_t *, AudioDeviceID );
static int AudioStreamSupportsDigital( aout_instance_t *, AudioStreamID ); static int AudioStreamSupportsDigital( audio_output_t *, AudioStreamID );
static int AudioStreamChangeFormat ( aout_instance_t *, AudioStreamID, AudioStreamBasicDescription ); static int AudioStreamChangeFormat ( audio_output_t *, AudioStreamID, AudioStreamBasicDescription );
static OSStatus RenderCallbackAnalog ( vlc_object_t *, AudioUnitRenderActionFlags *, const AudioTimeStamp *, static OSStatus RenderCallbackAnalog ( vlc_object_t *, AudioUnitRenderActionFlags *, const AudioTimeStamp *,
unsigned int, unsigned int, AudioBufferList *); unsigned int, unsigned int, AudioBufferList *);
...@@ -158,7 +158,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -158,7 +158,7 @@ static int Open( vlc_object_t * p_this )
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
struct aout_sys_t *p_sys = NULL; struct aout_sys_t *p_sys = NULL;
vlc_value_t val; vlc_value_t val;
aout_instance_t *p_aout = (aout_instance_t *)p_this; audio_output_t *p_aout = (audio_output_t *)p_this;
/* Use int here, to match kAudioDevicePropertyDeviceIsAlive /* Use int here, to match kAudioDevicePropertyDeviceIsAlive
* property size */ * property size */
...@@ -290,7 +290,7 @@ error: ...@@ -290,7 +290,7 @@ error:
/***************************************************************************** /*****************************************************************************
* Open: open and setup a HAL AudioUnit to do analog (multichannel) audio output * Open: open and setup a HAL AudioUnit to do analog (multichannel) audio output
*****************************************************************************/ *****************************************************************************/
static int OpenAnalog( aout_instance_t *p_aout ) static int OpenAnalog( audio_output_t *p_aout )
{ {
struct aout_sys_t *p_sys = p_aout->sys; struct aout_sys_t *p_sys = p_aout->sys;
OSStatus err = noErr; OSStatus err = noErr;
...@@ -606,7 +606,7 @@ static int OpenAnalog( aout_instance_t *p_aout ) ...@@ -606,7 +606,7 @@ static int OpenAnalog( aout_instance_t *p_aout )
/***************************************************************************** /*****************************************************************************
* Setup a encoded digital stream (SPDIF) * Setup a encoded digital stream (SPDIF)
*****************************************************************************/ *****************************************************************************/
static int OpenSPDIF( aout_instance_t * p_aout ) static int OpenSPDIF( audio_output_t * p_aout )
{ {
struct aout_sys_t *p_sys = p_aout->sys; struct aout_sys_t *p_sys = p_aout->sys;
OSStatus err = noErr; OSStatus err = noErr;
...@@ -826,7 +826,7 @@ static int OpenSPDIF( aout_instance_t * p_aout ) ...@@ -826,7 +826,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
*****************************************************************************/ *****************************************************************************/
static void Close( vlc_object_t * p_this ) static void Close( vlc_object_t * p_this )
{ {
aout_instance_t *p_aout = (aout_instance_t *)p_this; audio_output_t *p_aout = (audio_output_t *)p_this;
struct aout_sys_t *p_sys = p_aout->sys; struct aout_sys_t *p_sys = p_aout->sys;
OSStatus err = noErr; OSStatus err = noErr;
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
...@@ -909,7 +909,7 @@ static void Close( vlc_object_t * p_this ) ...@@ -909,7 +909,7 @@ static void Close( vlc_object_t * p_this )
/***************************************************************************** /*****************************************************************************
* Play: nothing to do * Play: nothing to do
*****************************************************************************/ *****************************************************************************/
static void Play( aout_instance_t * p_aout ) static void Play( audio_output_t * p_aout )
{ {
VLC_UNUSED(p_aout); VLC_UNUSED(p_aout);
} }
...@@ -918,7 +918,7 @@ static void Play( aout_instance_t * p_aout ) ...@@ -918,7 +918,7 @@ static void Play( aout_instance_t * p_aout )
/***************************************************************************** /*****************************************************************************
* Probe: Check which devices the OS has, and add them to our audio-device menu * Probe: Check which devices the OS has, and add them to our audio-device menu
*****************************************************************************/ *****************************************************************************/
static void Probe( aout_instance_t * p_aout ) static void Probe( audio_output_t * p_aout )
{ {
OSStatus err = noErr; OSStatus err = noErr;
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
...@@ -1074,7 +1074,7 @@ static int AudioDeviceHasOutput( AudioDeviceID i_dev_id ) ...@@ -1074,7 +1074,7 @@ static int AudioDeviceHasOutput( AudioDeviceID i_dev_id )
/***************************************************************************** /*****************************************************************************
* AudioDeviceSupportsDigital: Check i_dev_id for digital stream support. * AudioDeviceSupportsDigital: Check i_dev_id for digital stream support.
*****************************************************************************/ *****************************************************************************/
static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_dev_id ) static int AudioDeviceSupportsDigital( audio_output_t *p_aout, AudioDeviceID i_dev_id )
{ {
OSStatus err = noErr; OSStatus err = noErr;
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
...@@ -1116,7 +1116,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_ ...@@ -1116,7 +1116,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_
/***************************************************************************** /*****************************************************************************
* AudioStreamSupportsDigital: Check i_stream_id for digital stream support. * AudioStreamSupportsDigital: Check i_stream_id for digital stream support.
*****************************************************************************/ *****************************************************************************/
static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_stream_id ) static int AudioStreamSupportsDigital( audio_output_t *p_aout, AudioStreamID i_stream_id )
{ {
OSStatus err = noErr; OSStatus err = noErr;
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
...@@ -1167,7 +1167,7 @@ static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_ ...@@ -1167,7 +1167,7 @@ static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_
/***************************************************************************** /*****************************************************************************
* AudioStreamChangeFormat: Change i_stream_id to change_format * AudioStreamChangeFormat: Change i_stream_id to change_format
*****************************************************************************/ *****************************************************************************/
static int AudioStreamChangeFormat( aout_instance_t *p_aout, AudioStreamID i_stream_id, AudioStreamBasicDescription change_format ) static int AudioStreamChangeFormat( audio_output_t *p_aout, AudioStreamID i_stream_id, AudioStreamBasicDescription change_format )
{ {
OSStatus err = noErr; OSStatus err = noErr;
UInt32 i_param_size = 0; UInt32 i_param_size = 0;
...@@ -1261,7 +1261,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, ...@@ -1261,7 +1261,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
mtime_t current_date = 0; mtime_t current_date = 0;
uint32_t i_mData_bytes = 0; uint32_t i_mData_bytes = 0;
aout_instance_t * p_aout = (aout_instance_t *)_p_aout; audio_output_t * p_aout = (audio_output_t *)_p_aout;
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
VLC_UNUSED(ioActionFlags); VLC_UNUSED(ioActionFlags);
...@@ -1358,7 +1358,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice, ...@@ -1358,7 +1358,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
aout_buffer_t * p_buffer; aout_buffer_t * p_buffer;
mtime_t current_date; mtime_t current_date;
aout_instance_t * p_aout = (aout_instance_t *)threadGlobals; audio_output_t * p_aout = (audio_output_t *)threadGlobals;
struct aout_sys_t * p_sys = p_aout->sys; struct aout_sys_t * p_sys = p_aout->sys;
VLC_UNUSED(inDevice); VLC_UNUSED(inDevice);
...@@ -1401,7 +1401,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice, ...@@ -1401,7 +1401,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
static OSStatus HardwareListener( AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress inAddresses[], void*inClientData) static OSStatus HardwareListener( AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress inAddresses[], void*inClientData)
{ {
OSStatus err = noErr; OSStatus err = noErr;
aout_instance_t *p_aout = (aout_instance_t *)inClientData; audio_output_t *p_aout = (audio_output_t *)inClientData;
VLC_UNUSED(inObjectID); VLC_UNUSED(inObjectID);
for ( unsigned int i = 0; i < inNumberAddresses; i++ ) for ( unsigned int i = 0; i < inNumberAddresses; i++ )
...@@ -1446,7 +1446,7 @@ static OSStatus StreamListener( AudioObjectID inObjectID, UInt32 inNumberAddres ...@@ -1446,7 +1446,7 @@ static OSStatus StreamListener( AudioObjectID inObjectID, UInt32 inNumberAddres
static int AudioDeviceCallback( vlc_object_t *p_this, const char *psz_variable, static int AudioDeviceCallback( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param ) vlc_value_t old_val, vlc_value_t new_val, void *param )
{ {
aout_instance_t *p_aout = (aout_instance_t *)p_this; audio_output_t *p_aout = (audio_output_t *)p_this;
var_Set( p_aout->p_libvlc, "macosx-audio-device", new_val ); var_Set( p_aout->p_libvlc, "macosx-audio-device", new_val );
msg_Dbg( p_aout, "Set Device: %#"PRIx64, new_val.i_int ); msg_Dbg( p_aout, "Set Device: %#"PRIx64, new_val.i_int );
return aout_ChannelsRestart( p_this, psz_variable, old_val, new_val, param ); return aout_ChannelsRestart( p_this, psz_variable, old_val, new_val, param );
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
*****************************************************************************/ *****************************************************************************/
typedef struct notification_thread_t typedef struct notification_thread_t
{ {
aout_instance_t *p_aout; audio_output_t *p_aout;
int i_frame_size; /* size in bytes of one frame */ int i_frame_size; /* size in bytes of one frame */
int i_write_slot; /* current write position in our circular buffer */ int i_write_slot; /* current write position in our circular buffer */
...@@ -94,16 +94,16 @@ struct aout_sys_t ...@@ -94,16 +94,16 @@ struct aout_sys_t
*****************************************************************************/ *****************************************************************************/
static int OpenAudio ( vlc_object_t * ); static int OpenAudio ( vlc_object_t * );
static void CloseAudio ( vlc_object_t * ); static void CloseAudio ( vlc_object_t * );
static void Play ( aout_instance_t * ); static void Play ( audio_output_t * );
/* local functions */ /* local functions */
static void Probe ( aout_instance_t * ); static void Probe ( audio_output_t * );
static int InitDirectSound ( aout_instance_t * ); static int InitDirectSound ( audio_output_t * );
static int CreateDSBuffer ( aout_instance_t *, int, int, int, int, int, bool ); static int CreateDSBuffer ( audio_output_t *, int, int, int, int, int, bool );
static int CreateDSBufferPCM ( aout_instance_t *, vlc_fourcc_t*, int, int, int, bool ); static int CreateDSBufferPCM ( audio_output_t *, vlc_fourcc_t*, int, int, int, bool );
static void DestroyDSBuffer ( aout_instance_t * ); static void DestroyDSBuffer ( audio_output_t * );
static void* DirectSoundThread( void * ); static void* DirectSoundThread( void * );
static int FillBuffer ( aout_instance_t *, int, aout_buffer_t * ); static int FillBuffer ( audio_output_t *, int, aout_buffer_t * );
static int ReloadDirectXDevices( vlc_object_t *, char const *, static int ReloadDirectXDevices( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * ); vlc_value_t, vlc_value_t, void * );
...@@ -153,7 +153,7 @@ vlc_module_end () ...@@ -153,7 +153,7 @@ vlc_module_end ()
*****************************************************************************/ *****************************************************************************/
static int OpenAudio( vlc_object_t *p_this ) static int OpenAudio( vlc_object_t *p_this )
{ {
aout_instance_t * p_aout = (aout_instance_t *)p_this; audio_output_t * p_aout = (audio_output_t *)p_this;
vlc_value_t val; vlc_value_t val;
char * psz_speaker; char * psz_speaker;
int i = 0; int i = 0;
...@@ -332,7 +332,7 @@ static int OpenAudio( vlc_object_t *p_this ) ...@@ -332,7 +332,7 @@ static int OpenAudio( vlc_object_t *p_this )
/***************************************************************************** /*****************************************************************************
* Probe: probe the audio device for available formats and channels * Probe: probe the audio device for available formats and channels
*****************************************************************************/ *****************************************************************************/
static void Probe( aout_instance_t * p_aout ) static void Probe( audio_output_t * p_aout )
{ {
vlc_value_t val, text; vlc_value_t val, text;
vlc_fourcc_t i_format; vlc_fourcc_t i_format;
...@@ -568,7 +568,7 @@ static void Probe( aout_instance_t * p_aout ) ...@@ -568,7 +568,7 @@ static void Probe( aout_instance_t * p_aout )
* we know the first buffer has been put in the aout fifo and we also * we know the first buffer has been put in the aout fifo and we also
* know its date. * know its date.
*****************************************************************************/ *****************************************************************************/
static void Play( aout_instance_t *p_aout ) static void Play( audio_output_t *p_aout )
{ {
if( !p_aout->sys->b_playing ) if( !p_aout->sys->b_playing )
{ {
...@@ -598,7 +598,7 @@ static void Play( aout_instance_t *p_aout ) ...@@ -598,7 +598,7 @@ static void Play( aout_instance_t *p_aout )
*****************************************************************************/ *****************************************************************************/
static void CloseAudio( vlc_object_t *p_this ) static void CloseAudio( vlc_object_t *p_this )
{ {
aout_instance_t * p_aout = (aout_instance_t *)p_this; audio_output_t * p_aout = (audio_output_t *)p_this;
aout_sys_t *p_sys = p_aout->sys; aout_sys_t *p_sys = p_aout->sys;
msg_Dbg( p_aout, "closing audio device" ); msg_Dbg( p_aout, "closing audio device" );
...@@ -635,7 +635,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc, ...@@ -635,7 +635,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc,
{ {
VLC_UNUSED( psz_mod ); VLC_UNUSED( psz_mod );
aout_instance_t *p_aout = (aout_instance_t *)_p_aout; audio_output_t *p_aout = (audio_output_t *)_p_aout;
char *psz_device = FromWide( psz_desc ); char *psz_device = FromWide( psz_desc );
msg_Dbg( p_aout, "found device: %s", psz_device ); msg_Dbg( p_aout, "found device: %s", psz_device );
...@@ -667,7 +667,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc, ...@@ -667,7 +667,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc,
/***************************************************************************** /*****************************************************************************
* InitDirectSound: handle all the gory details of DirectSound initialisation * InitDirectSound: handle all the gory details of DirectSound initialisation
*****************************************************************************/ *****************************************************************************/
static int InitDirectSound( aout_instance_t *p_aout ) static int InitDirectSound( audio_output_t *p_aout )
{ {
HRESULT (WINAPI *OurDirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN); HRESULT (WINAPI *OurDirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
HRESULT (WINAPI *OurDirectSoundEnumerate)(LPDSENUMCALLBACKW, LPVOID); HRESULT (WINAPI *OurDirectSoundEnumerate)(LPDSENUMCALLBACKW, LPVOID);
...@@ -754,7 +754,7 @@ static int InitDirectSound( aout_instance_t *p_aout ) ...@@ -754,7 +754,7 @@ static int InitDirectSound( aout_instance_t *p_aout )
* Once you create a secondary buffer, you cannot change its format anymore so * Once you create a secondary buffer, you cannot change its format anymore so