Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
2516061e
Commit
2516061e
authored
Jul 25, 2011
by
Rémi Denis-Courmont
Browse files
Rename aout_instance_t to audio_output_t
parent
d809a3fb
Changes
45
Hide whitespace changes
Inline
Side-by-side
extras/analyser/vlc.vim
View file @
2516061e
...
...
@@ -52,7 +52,7 @@ function VlcSyntax()
syn
keyword cType audio_format_t video_format_t subs_format_t
syn
keyword cType es_format_t video_palette_t
" Aout
syn
keyword cType a
out_instance
_t aout_sys_t
syn
keyword cType a
udio_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_mixer_sys_t aout_filter_sys_t audio_volume_t
syn
keyword cType aout_mixer_t aout_output_t audio_date_t
...
...
include/vlc_aout.h
View file @
2516061e
...
...
@@ -167,7 +167,7 @@ struct aout_fifo_t
struct
aout_mixer_t
;
/** Audio output object */
struct
a
out_instance_
t
struct
a
udio_outpu
t
{
VLC_COMMON_MEMBERS
...
...
@@ -198,10 +198,10 @@ struct aout_instance_t
struct
module_t
*
module
;
/**< Output plugin */
struct
aout_sys_t
*
sys
;
/**< Output plugin private data */
void
(
*
pf_play
)(
a
out_instance
_t
*
);
/**< Audio buffer callback */
void
(
*
pf_pause
)(
a
out_instance
_t
*
,
bool
,
mtime_t
);
/**< Pause/resume
void
(
*
pf_play
)(
a
udio_output
_t
*
);
/**< Audio buffer callback */
void
(
*
pf_pause
)(
a
udio_output
_t
*
,
bool
,
mtime_t
);
/**< Pause/resume
callback (optional, may be NULL) */
int
(
*
pf_volume_set
)(
a
out_instance
_t
*
,
float
,
bool
);
/**< Volume setter
int
(
*
pf_volume_set
)(
a
udio_output
_t
*
,
float
,
bool
);
/**< Volume setter
(optional, may be NULL) */
int
i_nb_samples
;
};
...
...
@@ -221,7 +221,7 @@ static const uint32_t pi_vlc_chan_order_wg4[] =
* Prototypes
*****************************************************************************/
VLC_API
aout_buffer_t
*
aout_OutputNextBuffer
(
a
out_instance
_t
*
,
mtime_t
,
bool
)
VLC_USED
;
VLC_API
aout_buffer_t
*
aout_OutputNextBuffer
(
a
udio_output
_t
*
,
mtime_t
,
bool
)
VLC_USED
;
/**
* 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)
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_FormatPrint
(
a
out_instance
_t
*
p_aout
,
const
char
*
psz_text
,
const
audio_sample_format_t
*
p_format
);
VLC_API
void
aout_FormatPrint
(
a
udio_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
mtime_t
aout_FifoFirstDate
(
const
aout_fifo_t
*
)
VLC_USED
;
VLC_API
aout_buffer_t
*
aout_FifoPop
(
aout_fifo_t
*
p_fifo
)
VLC_USED
;
/* From intf.c : */
VLC_API
void
aout_VolumeSoftInit
(
a
out_instance
_t
*
);
VLC_API
void
aout_VolumeNoneInit
(
a
out_instance
_t
*
);
VLC_API
void
aout_VolumeSoftInit
(
a
udio_output
_t
*
);
VLC_API
void
aout_VolumeNoneInit
(
a
udio_output
_t
*
);
VLC_API
int
aout_ChannelsRestart
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
/* */
...
...
include/vlc_common.h
View file @
2516061e
...
...
@@ -261,7 +261,7 @@ typedef struct es_format_t es_format_t;
typedef
struct
video_palette_t
video_palette_t
;
/* Audio */
typedef
struct
a
out_instance_t
aout_instance
_t
;
typedef
struct
a
udio_output
audio_output
_t
;
typedef
struct
aout_sys_t
aout_sys_t
;
typedef
struct
aout_fifo_t
aout_fifo_t
;
typedef
struct
aout_input_t
aout_input_t
;
...
...
include/vlc_input.h
View file @
2516061e
...
...
@@ -434,7 +434,7 @@ typedef enum input_event_type_e
/* cache" has changed */
INPUT_EVENT_CACHE
,
/* A a
out_instance
_t object has been created/deleted by *the input* */
/* A a
udio_output
_t object has been created/deleted by *the input* */
INPUT_EVENT_AOUT
,
/* A vout_thread_t object has been created/deleted by *the input* */
INPUT_EVENT_VOUT
,
...
...
@@ -511,9 +511,9 @@ enum input_query_e
/* Input ressources
* XXX You must call vlc_object_release as soon as possible */
INPUT_GET_AOUT
,
/* arg1=a
out_instance
_t ** res=can fail */
INPUT_GET_AOUT
,
/* arg1=a
udio_output
_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 **, a
out_instance
_t ** */
INPUT_GET_ES_OBJECTS
,
/* arg1=int id, vlc_object_t **dec, vout_thread_t **, a
udio_output
_t ** */
/* External clock managments */
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 )
* @return NULL on error, or the audio output (which needs to be
* released with vlc_object_release()).
*/
static
inline
a
out_instance
_t
*
input_GetAout
(
input_thread_t
*
p_input
)
static
inline
a
udio_output
_t
*
input_GetAout
(
input_thread_t
*
p_input
)
{
a
out_instance
_t
*
p_aout
;
a
udio_output
_t
*
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 )
*/
static
inline
int
input_GetEsObjects
(
input_thread_t
*
p_input
,
int
i_id
,
vlc_object_t
**
pp_decoder
,
vout_thread_t
**
pp_vout
,
a
out_instance
_t
**
pp_aout
)
vout_thread_t
**
pp_vout
,
a
udio_output
_t
**
pp_aout
)
{
return
input_Control
(
p_input
,
INPUT_GET_ES_OBJECTS
,
i_id
,
pp_decoder
,
pp_vout
,
pp_aout
);
...
...
modules/audio_output/alsa.c
View file @
2516061e
...
...
@@ -92,9 +92,9 @@ struct aout_sys_t
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
static
void
*
ALSAThread
(
void
*
);
static
void
ALSAFill
(
a
out_instance
_t
*
);
static
void
ALSAFill
(
a
udio_output
_t
*
);
static
int
FindDevicesCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_name
,
vlc_value_t
newval
,
vlc_value_t
oldval
,
void
*
p_unused
);
static
void
GetDevices
(
vlc_object_t
*
,
module_config_t
*
);
...
...
@@ -171,7 +171,7 @@ static void Probe (vlc_object_t *obj)
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
obj
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
obj
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
obj
;
/* Get device name */
char
*
psz_device
;
...
...
@@ -519,7 +519,7 @@ error:
return
VLC_EGENERIC
;
}
static
void
PlayIgnore
(
a
out_instance
_t
*
p_aout
)
static
void
PlayIgnore
(
a
udio_output
_t
*
p_aout
)
{
/* Already playing - nothing to do */
(
void
)
p_aout
;
}
...
...
@@ -527,7 +527,7 @@ static void PlayIgnore( aout_instance_t *p_aout )
/*****************************************************************************
* Play: start playback
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
p_aout
->
pf_play
=
PlayIgnore
;
...
...
@@ -543,7 +543,7 @@ static void Play( aout_instance_t *p_aout )
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
obj
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
obj
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
obj
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
/* Make sure that the thread will stop once it is waken up */
...
...
@@ -564,7 +564,7 @@ static void Close (vlc_object_t *obj)
*****************************************************************************/
static
void
*
ALSAThread
(
void
*
data
)
{
a
out_instance
_t
*
p_aout
=
data
;
a
udio_output
_t
*
p_aout
=
data
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
/* Wait for the exact time to start playing (avoids resampling) */
...
...
@@ -581,7 +581,7 @@ static void* ALSAThread( void *data )
/*****************************************************************************
* ALSAFill: function used to fill the ALSA buffer as much as possible
*****************************************************************************/
static
void
ALSAFill
(
a
out_instance
_t
*
p_aout
)
static
void
ALSAFill
(
a
udio_output
_t
*
p_aout
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
snd_pcm_t
*
p_pcm
=
p_sys
->
p_snd_pcm
;
...
...
modules/audio_output/amem.c
View file @
2516061e
...
...
@@ -59,7 +59,7 @@ struct aout_sys_t
void
(
*
cleanup
)
(
void
*
opaque
);
};
static
void
Play
(
a
out_instance
_t
*
aout
)
static
void
Play
(
a
udio_output
_t
*
aout
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
block_t
*
block
;
...
...
@@ -72,7 +72,7 @@ static void Play (aout_instance_t *aout)
}
}
static
int
VolumeSet
(
a
out_instance
_t
*
aout
,
float
vol
,
bool
mute
)
static
int
VolumeSet
(
a
udio_output
_t
*
aout
,
float
vol
,
bool
mute
)
{
aout_sys_t
*
sys
=
aout
->
sys
;
...
...
@@ -83,7 +83,7 @@ typedef int (*vlc_audio_format_cb) (void **, char *, unsigned *, unsigned *);
static
int
Open
(
vlc_object_t
*
obj
)
{
a
out_instance
_t
*
aout
=
(
a
out_instance
_t
*
)
obj
;
a
udio_output
_t
*
aout
=
(
a
udio_output
_t
*
)
obj
;
aout_sys_t
*
sys
=
malloc
(
sizeof
(
*
sys
));
if
(
unlikely
(
sys
==
NULL
))
return
VLC_ENOMEM
;
...
...
@@ -145,7 +145,7 @@ error:
static
void
Close
(
vlc_object_t
*
obj
)
{
a
out_instance
_t
*
aout
=
(
a
out_instance
_t
*
)
obj
;
a
udio_output
_t
*
aout
=
(
a
udio_output
_t
*
)
obj
;
aout_sys_t
*
sys
=
aout
->
sys
;
if
(
sys
->
cleanup
!=
NULL
)
...
...
modules/audio_output/audioqueue.c
View file @
2516061e
...
...
@@ -54,7 +54,7 @@ struct aout_sys_t
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
static
void
AudioQueueCallback
(
void
*
,
AudioQueueRef
,
AudioQueueBufferRef
);
/*****************************************************************************
...
...
@@ -76,7 +76,7 @@ vlc_module_end ()
static
int
Open
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
malloc
(
sizeof
(
aout_sys_t
));
p_aout
->
sys
=
p_sys
;
...
...
@@ -134,7 +134,7 @@ static int Open ( vlc_object_t *p_this )
/*****************************************************************************
* Play: play a sound samples buffer
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
VLC_UNUSED
(
p_aout
);
}
...
...
@@ -144,7 +144,7 @@ static void Play( aout_instance_t * p_aout )
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
msg_Dbg
(
p_aout
,
"Stopping AudioQueue"
);
...
...
@@ -155,7 +155,7 @@ static void Close ( vlc_object_t *p_this )
}
void
AudioQueueCallback
(
void
*
inUserData
,
AudioQueueRef
inAQ
,
AudioQueueBufferRef
inBuffer
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
inUserData
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
inUserData
;
aout_buffer_t
*
p_buffer
=
NULL
;
if
(
p_aout
)
{
...
...
modules/audio_output/auhal.c
View file @
2516061e
...
...
@@ -108,17 +108,17 @@ struct aout_sys_t
* Local prototypes.
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
int
OpenAnalog
(
a
out_instance
_t
*
);
static
int
OpenSPDIF
(
a
out_instance
_t
*
);
static
int
OpenAnalog
(
a
udio_output
_t
*
);
static
int
OpenSPDIF
(
a
udio_output
_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Probe
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
static
void
Probe
(
a
udio_output
_t
*
);
static
int
AudioDeviceHasOutput
(
AudioDeviceID
);
static
int
AudioDeviceSupportsDigital
(
a
out_instance
_t
*
,
AudioDeviceID
);
static
int
AudioStreamSupportsDigital
(
a
out_instance
_t
*
,
AudioStreamID
);
static
int
AudioStreamChangeFormat
(
a
out_instance
_t
*
,
AudioStreamID
,
AudioStreamBasicDescription
);
static
int
AudioDeviceSupportsDigital
(
a
udio_output
_t
*
,
AudioDeviceID
);
static
int
AudioStreamSupportsDigital
(
a
udio_output
_t
*
,
AudioStreamID
);
static
int
AudioStreamChangeFormat
(
a
udio_output
_t
*
,
AudioStreamID
,
AudioStreamBasicDescription
);
static
OSStatus
RenderCallbackAnalog
(
vlc_object_t
*
,
AudioUnitRenderActionFlags
*
,
const
AudioTimeStamp
*
,
unsigned
int
,
unsigned
int
,
AudioBufferList
*
);
...
...
@@ -158,7 +158,7 @@ static int Open( vlc_object_t * p_this )
UInt32
i_param_size
=
0
;
struct
aout_sys_t
*
p_sys
=
NULL
;
vlc_value_t
val
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
/* Use int here, to match kAudioDevicePropertyDeviceIsAlive
* property size */
...
...
@@ -290,7 +290,7 @@ error:
/*****************************************************************************
* Open: open and setup a HAL AudioUnit to do analog (multichannel) audio output
*****************************************************************************/
static
int
OpenAnalog
(
a
out_instance
_t
*
p_aout
)
static
int
OpenAnalog
(
a
udio_output
_t
*
p_aout
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
err
=
noErr
;
...
...
@@ -606,7 +606,7 @@ static int OpenAnalog( aout_instance_t *p_aout )
/*****************************************************************************
* Setup a encoded digital stream (SPDIF)
*****************************************************************************/
static
int
OpenSPDIF
(
a
out_instance
_t
*
p_aout
)
static
int
OpenSPDIF
(
a
udio_output
_t
*
p_aout
)
{
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
err
=
noErr
;
...
...
@@ -826,7 +826,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
OSStatus
err
=
noErr
;
UInt32
i_param_size
=
0
;
...
...
@@ -909,7 +909,7 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Play: nothing to do
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
VLC_UNUSED
(
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
*****************************************************************************/
static
void
Probe
(
a
out_instance
_t
*
p_aout
)
static
void
Probe
(
a
udio_output
_t
*
p_aout
)
{
OSStatus
err
=
noErr
;
UInt32
i_param_size
=
0
;
...
...
@@ -1074,7 +1074,7 @@ static int AudioDeviceHasOutput( AudioDeviceID i_dev_id )
/*****************************************************************************
* AudioDeviceSupportsDigital: Check i_dev_id for digital stream support.
*****************************************************************************/
static
int
AudioDeviceSupportsDigital
(
a
out_instance
_t
*
p_aout
,
AudioDeviceID
i_dev_id
)
static
int
AudioDeviceSupportsDigital
(
a
udio_output
_t
*
p_aout
,
AudioDeviceID
i_dev_id
)
{
OSStatus
err
=
noErr
;
UInt32
i_param_size
=
0
;
...
...
@@ -1116,7 +1116,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_
/*****************************************************************************
* AudioStreamSupportsDigital: Check i_stream_id for digital stream support.
*****************************************************************************/
static
int
AudioStreamSupportsDigital
(
a
out_instance
_t
*
p_aout
,
AudioStreamID
i_stream_id
)
static
int
AudioStreamSupportsDigital
(
a
udio_output
_t
*
p_aout
,
AudioStreamID
i_stream_id
)
{
OSStatus
err
=
noErr
;
UInt32
i_param_size
=
0
;
...
...
@@ -1167,7 +1167,7 @@ static int AudioStreamSupportsDigital( aout_instance_t *p_aout, AudioStreamID i_
/*****************************************************************************
* AudioStreamChangeFormat: Change i_stream_id to change_format
*****************************************************************************/
static
int
AudioStreamChangeFormat
(
a
out_instance
_t
*
p_aout
,
AudioStreamID
i_stream_id
,
AudioStreamBasicDescription
change_format
)
static
int
AudioStreamChangeFormat
(
a
udio_output
_t
*
p_aout
,
AudioStreamID
i_stream_id
,
AudioStreamBasicDescription
change_format
)
{
OSStatus
err
=
noErr
;
UInt32
i_param_size
=
0
;
...
...
@@ -1261,7 +1261,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
mtime_t
current_date
=
0
;
uint32_t
i_mData_bytes
=
0
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
_p_aout
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
_p_aout
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
VLC_UNUSED
(
ioActionFlags
);
...
...
@@ -1358,7 +1358,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
aout_buffer_t
*
p_buffer
;
mtime_t
current_date
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
threadGlobals
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
threadGlobals
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
VLC_UNUSED
(
inDevice
);
...
...
@@ -1401,7 +1401,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
static
OSStatus
HardwareListener
(
AudioObjectID
inObjectID
,
UInt32
inNumberAddresses
,
const
AudioObjectPropertyAddress
inAddresses
[],
void
*
inClientData
)
{
OSStatus
err
=
noErr
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
inClientData
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
inClientData
;
VLC_UNUSED
(
inObjectID
);
for
(
unsigned
int
i
=
0
;
i
<
inNumberAddresses
;
i
++
)
...
...
@@ -1446,7 +1446,7 @@ static OSStatus StreamListener( AudioObjectID inObjectID, UInt32 inNumberAddres
static
int
AudioDeviceCallback
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
var_Set
(
p_aout
->
p_libvlc
,
"macosx-audio-device"
,
new_val
);
msg_Dbg
(
p_aout
,
"Set Device: %#"
PRIx64
,
new_val
.
i_int
);
return
aout_ChannelsRestart
(
p_this
,
psz_variable
,
old_val
,
new_val
,
param
);
...
...
modules/audio_output/directx.c
View file @
2516061e
...
...
@@ -44,7 +44,7 @@
*****************************************************************************/
typedef
struct
notification_thread_t
{
a
out_instance
_t
*
p_aout
;
a
udio_output
_t
*
p_aout
;
int
i_frame_size
;
/* size in bytes of one frame */
int
i_write_slot
;
/* current write position in our circular buffer */
...
...
@@ -94,16 +94,16 @@ struct aout_sys_t
*****************************************************************************/
static
int
OpenAudio
(
vlc_object_t
*
);
static
void
CloseAudio
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
/* local functions */
static
void
Probe
(
a
out_instance
_t
*
);
static
int
InitDirectSound
(
a
out_instance
_t
*
);
static
int
CreateDSBuffer
(
a
out_instance
_t
*
,
int
,
int
,
int
,
int
,
int
,
bool
);
static
int
CreateDSBufferPCM
(
a
out_instance
_t
*
,
vlc_fourcc_t
*
,
int
,
int
,
int
,
bool
);
static
void
DestroyDSBuffer
(
a
out_instance
_t
*
);
static
void
Probe
(
a
udio_output
_t
*
);
static
int
InitDirectSound
(
a
udio_output
_t
*
);
static
int
CreateDSBuffer
(
a
udio_output
_t
*
,
int
,
int
,
int
,
int
,
int
,
bool
);
static
int
CreateDSBufferPCM
(
a
udio_output
_t
*
,
vlc_fourcc_t
*
,
int
,
int
,
int
,
bool
);
static
void
DestroyDSBuffer
(
a
udio_output
_t
*
);
static
void
*
DirectSoundThread
(
void
*
);
static
int
FillBuffer
(
a
out_instance
_t
*
,
int
,
aout_buffer_t
*
);
static
int
FillBuffer
(
a
udio_output
_t
*
,
int
,
aout_buffer_t
*
);
static
int
ReloadDirectXDevices
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -153,7 +153,7 @@ vlc_module_end ()
*****************************************************************************/
static
int
OpenAudio
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
vlc_value_t
val
;
char
*
psz_speaker
;
int
i
=
0
;
...
...
@@ -332,7 +332,7 @@ static int OpenAudio( vlc_object_t *p_this )
/*****************************************************************************
* Probe: probe the audio device for available formats and channels
*****************************************************************************/
static
void
Probe
(
a
out_instance
_t
*
p_aout
)
static
void
Probe
(
a
udio_output
_t
*
p_aout
)
{
vlc_value_t
val
,
text
;
vlc_fourcc_t
i_format
;
...
...
@@ -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
* know its date.
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
if
(
!
p_aout
->
sys
->
b_playing
)
{
...
...
@@ -598,7 +598,7 @@ static void Play( aout_instance_t *p_aout )
*****************************************************************************/
static
void
CloseAudio
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
msg_Dbg
(
p_aout
,
"closing audio device"
);
...
...
@@ -635,7 +635,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc,
{
VLC_UNUSED
(
psz_mod
);
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
_p_aout
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
_p_aout
;
char
*
psz_device
=
FromWide
(
psz_desc
);
msg_Dbg
(
p_aout
,
"found device: %s"
,
psz_device
);
...
...
@@ -667,7 +667,7 @@ static int CALLBACK CallBackDirectSoundEnum( LPGUID p_guid, LPCWSTR psz_desc,
/*****************************************************************************
* InitDirectSound: handle all the gory details of DirectSound initialisation
*****************************************************************************/
static
int
InitDirectSound
(
a
out_instance
_t
*
p_aout
)
static
int
InitDirectSound
(
a
udio_output
_t
*
p_aout
)
{
HRESULT
(
WINAPI
*
OurDirectSoundCreate
)(
LPGUID
,
LPDIRECTSOUND
*
,
LPUNKNOWN
);
HRESULT
(
WINAPI
*
OurDirectSoundEnumerate
)(
LPDSENUMCALLBACKW
,
LPVOID
);
...
...
@@ -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
* you have to release the current one and create another.
*****************************************************************************/
static
int
CreateDSBuffer
(
a
out_instance
_t
*
p_aout
,
int
i_format
,
static
int
CreateDSBuffer
(
a
udio_output
_t
*
p_aout
,
int
i_format
,
int
i_channels
,
int
i_nb_channels
,
int
i_rate
,
int
i_bytes_per_frame
,
bool
b_probe
)
{
...
...
@@ -886,7 +886,7 @@ static int CreateDSBuffer( aout_instance_t *p_aout, int i_format,
* We first try to create a WAVE_FORMAT_IEEE_FLOAT buffer if supported by
* the hardware, otherwise we create a WAVE_FORMAT_PCM buffer.
****************************************************************************/
static
int
CreateDSBufferPCM
(
a
out_instance
_t
*
p_aout
,
vlc_fourcc_t
*
i_format
,
static
int
CreateDSBufferPCM
(
a
udio_output
_t
*
p_aout
,
vlc_fourcc_t
*
i_format
,
int
i_channels
,
int
i_nb_channels
,
int
i_rate
,
bool
b_probe
)
{
...
...
@@ -923,7 +923,7 @@ static int CreateDSBufferPCM( aout_instance_t *p_aout, vlc_fourcc_t *i_format,
*****************************************************************************
* This function destroys the secondary buffer.
*****************************************************************************/
static
void
DestroyDSBuffer
(
a
out_instance
_t
*
p_aout
)
static
void
DestroyDSBuffer
(
a
udio_output
_t
*
p_aout
)
{
if
(
p_aout
->
sys
->
p_dsbuffer
)
{
...
...
@@ -937,7 +937,7 @@ static void DestroyDSBuffer( aout_instance_t *p_aout )
*****************************************************************************
* Returns VLC_SUCCESS on success.
*****************************************************************************/
static
int
FillBuffer
(
a
out_instance
_t
*
p_aout
,
int
i_frame
,
static
int
FillBuffer
(
a
udio_output
_t
*
p_aout
,
int
i_frame
,
aout_buffer_t
*
p_buffer
)
{
notification_thread_t
*
p_notif
=
p_aout
->
sys
->
p_notif
;
...
...
@@ -1011,7 +1011,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame,
static
void
*
DirectSoundThread
(
void
*
data
)
{
notification_thread_t
*
p_notif
=
(
notification_thread_t
*
)
data
;
a
out_instance
_t
*
p_aout
=
p_notif
->
p_aout
;
a
udio_output
_t
*
p_aout
=
p_notif
->
p_aout
;
mtime_t
last_time
;
int
canc
=
vlc_savecancel
();
...
...
modules/audio_output/file.c
View file @
2516061e
...
...
@@ -73,7 +73,7 @@ static const int pi_channels_maps[CHANNELS_MAX+1] =
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -132,7 +132,7 @@ vlc_module_end ()
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
char
*
psz_name
,
*
psz_format
;
const
char
*
const
*
ppsz_compare
=
format_list
;
int
i_channels
,
i
=
0
;
...
...
@@ -278,7 +278,7 @@ static int Open( vlc_object_t * p_this )
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
msg_Dbg
(
p_aout
,
"closing audio file"
);
...
...
@@ -315,7 +315,7 @@ static void Close( vlc_object_t * p_this )
/*****************************************************************************
* Play: pretend to play a sound
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
aout_buffer_t
*
p_buffer
;
...
...
modules/audio_output/jack.c
View file @
2516061e
...
...
@@ -62,7 +62,7 @@ struct aout_sys_t
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
static
int
Process
(
jack_nframes_t
i_frames
,
void
*
p_arg
);
static
int
GraphChange
(
void
*
p_arg
);
...
...
@@ -100,7 +100,7 @@ vlc_module_end ()
static
int
Open
(
vlc_object_t
*
p_this
)
{
char
psz_name
[
32
];
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
NULL
;
int
status
=
VLC_SUCCESS
;
unsigned
int
i
;
...
...
@@ -250,7 +250,7 @@ error_out:
int
Process
(
jack_nframes_t
i_frames
,
void
*
p_arg
)
{
unsigned
int
i
,
j
,
i_nb_samples
=
0
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_arg
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_arg
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
jack_sample_t
*
p_src
=
NULL
;
...
...
@@ -311,7 +311,7 @@ int Process( jack_nframes_t i_frames, void *p_arg )
static
int
GraphChange
(
void
*
p_arg
)
{
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_arg
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_arg
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
unsigned
int
i
;
jack_nframes_t
port_latency
;
...
...
@@ -333,7 +333,7 @@ static int GraphChange( void *p_arg )
/*****************************************************************************
* Play: nothing to do
*****************************************************************************/
static
void
Play
(
a
out_instance
_t
*
p_aout
)
static
void
Play
(
a
udio_output
_t
*
p_aout
)
{
VLC_UNUSED
(
p_aout
);
}
...
...
@@ -344,7 +344,7 @@ static void Play( aout_instance_t *p_aout )
static
void
Close
(
vlc_object_t
*
p_this
)
{
int
i_error
;
a
out_instance
_t
*
p_aout
=
(
a
out_instance
_t
*
)
p_this
;
a
udio_output
_t
*
p_aout
=
(
a
udio_output
_t
*
)
p_this
;
struct
aout_sys_t
*
p_sys
=
p_aout
->
sys
;
i_error
=
jack_deactivate
(
p_sys
->
p_jack_client
);
...
...
modules/audio_output/opensles_android.c
View file @
2516061e
...
...
@@ -75,7 +75,7 @@ typedef SLresult (*slCreateEngine_t)(
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Play
(
a
out_instance
_t
*
);
static
void
Play
(
a
udio_output
_t
*
);
static
void
PlayedCallback
(
SLAndroidSimpleBufferQueueItf
caller
,
void