VLC
3.0.18
|
Data Structures | |
struct | aout_dev |
Functions | |
static void | aout_OutputAssertLocked (audio_output_t *aout) |
static void | aout_Destructor (vlc_object_t *obj) |
Destroys the audio output lock used (asynchronously) by interface functions. More... | |
static int | var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev, vlc_value_t value, void *data) |
static int | var_CopyDevice (vlc_object_t *src, const char *name, vlc_value_t prev, vlc_value_t value, void *data) |
static void | aout_VolumeNotify (audio_output_t *aout, float volume) |
Supply or update the current custom ("hardware") volume. More... | |
static void | aout_MuteNotify (audio_output_t *aout, bool mute) |
static void | aout_PolicyNotify (audio_output_t *aout, bool cork) |
static void | aout_DeviceNotify (audio_output_t *aout, const char *id) |
static void | aout_HotplugNotify (audio_output_t *aout, const char *id, const char *name) |
static void | aout_RestartNotify (audio_output_t *aout, unsigned mode) |
static int | aout_GainNotify (audio_output_t *aout, float gain) |
static int | FilterCallback (vlc_object_t *obj, const char *var, vlc_value_t prev, vlc_value_t cur, void *data) |
static int | StereoModeCallback (vlc_object_t *obj, const char *varname, vlc_value_t oldval, vlc_value_t newval, void *data) |
static int | ViewpointCallback (vlc_object_t *obj, const char *var, vlc_value_t prev, vlc_value_t cur, void *data) |
audio_output_t * | aout_New (vlc_object_t *parent) |
Creates an audio output object and initializes an output module. More... | |
void | aout_Destroy (audio_output_t *aout) |
Deinitializes an audio output module and destroys an audio output object. More... | |
static void | aout_PrepareStereoMode (audio_output_t *aout, audio_sample_format_t *restrict fmt, aout_filters_cfg_t *filters_cfg, audio_channel_type_t input_chan_type, unsigned i_nb_input_channels, int i_forced_stereo_mode) |
int | aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt, aout_filters_cfg_t *filters_cfg) |
Starts an audio output stream. More... | |
void | aout_OutputDelete (audio_output_t *aout) |
Stops the audio output stream (undoes aout_OutputNew()). More... | |
int | aout_OutputTimeGet (audio_output_t *aout, mtime_t *delay) |
void | aout_OutputPlay (audio_output_t *aout, block_t *block) |
Plays a decoded audio buffer. More... | |
static void | PauseDefault (audio_output_t *aout, bool pause, mtime_t date) |
void | aout_OutputPause (audio_output_t *aout, bool pause, mtime_t date) |
Notifies the audio output (if any) of pause/resume events. More... | |
void | aout_OutputFlush (audio_output_t *aout, bool wait) |
Flushes or drains the audio output buffers. More... | |
static int | aout_OutputVolumeSet (audio_output_t *aout, float vol) |
static int | aout_OutputMuteSet (audio_output_t *aout, bool mute) |
static int | aout_OutputDeviceSet (audio_output_t *aout, const char *id) |
void | aout_OutputLock (audio_output_t *aout) |
static int | aout_OutputTryLock (audio_output_t *aout) |
void | aout_OutputUnlock (audio_output_t *aout) |
float | aout_VolumeGet (audio_output_t *aout) |
Gets the volume of the audio output stream (independent of mute). More... | |
int | aout_VolumeSet (audio_output_t *aout, float vol) |
Sets the volume of the audio output stream. More... | |
int | aout_VolumeUpdate (audio_output_t *aout, int value, float *volp) |
Raises the volume. More... | |
int | aout_MuteGet (audio_output_t *aout) |
Gets the audio output stream mute flag. More... | |
int | aout_MuteSet (audio_output_t *aout, bool mute) |
Sets the audio output stream mute flag. More... | |
char * | aout_DeviceGet (audio_output_t *aout) |
Gets the currently selected device. More... | |
int | aout_DeviceSet (audio_output_t *aout, const char *id) |
Selects an audio output device. More... | |
int | aout_DevicesList (audio_output_t *aout, char ***ids, char ***names) |
Enumerates possible audio output devices. More... | |
Variables | |
static const char | unset_str [1] = "" |
void aout_Destroy | ( | audio_output_t * | aout | ) |
Deinitializes an audio output module and destroys an audio output object.
References aout_OutputLock(), aout_OutputUnlock(), aout_owner(), audio_output::device_select, FilterCallback(), aout_owner_t::module, module_unneed, audio_output::mute_set, audio_output::obj, vlc_common_members::parent, StereoModeCallback(), var_Copy(), var_CopyDevice(), var_DelCallback, var_SetFloat, ViewpointCallback(), vlc_object_release, and audio_output::volume_set.
|
static |
Destroys the audio output lock used (asynchronously) by interface functions.
References aout_owner(), aout_owner_t::dev, aout_owner_t::device, aout_owner_t::list, aout_owner_t::lock, aout_owner_t::req, unset_str, vlc_mutex_destroy(), and aout_owner_t::vp.
Referenced by aout_New().
|
static |
References var_SetString.
Referenced by aout_New().
|
static |
References aout_OutputAssertLocked(), aout_owner(), aout_volume_SetVolume(), and aout_owner_t::volume.
Referenced by aout_New().
|
static |
References aout_owner(), aout_owner_t::count, aout_owner_t::dev, aout_dev::id, aout_owner_t::list, aout_owner_t::lock, aout_dev::name, name, aout_dev::next, strdup(), unlikely, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by aout_New().
|
static |
References var_SetBool.
Referenced by aout_New().
audio_output_t* aout_New | ( | vlc_object_t * | parent | ) |
Creates an audio output object and initializes an output module.
References _, aout_Destructor(), aout_DeviceNotify(), aout_GainNotify(), aout_HotplugNotify(), aout_MuteNotify(), aout_owner(), aout_PolicyNotify(), aout_RestartNotify(), aout_VolumeNotify(), config_FindConfig(), aout_owner_t::dev, aout_owner_t::device, audio_output::device_report, audio_output::device_select, audio_output::event, FilterCallback(), audio_output::gain_request, audio_output::hotplug_report, aout_owner_t::initial_stereo_mode, likely, module_config_t::list, module_config_t::list_count, module_config_t::list_text, aout_owner_t::lock, aout_owner_t::module, module_exists(), module_need, msg_Err, aout_owner_t::mute, audio_output::mute_report, audio_output::mute_set, audio_output::policy_report, module_config_t::psz, vlc_value_t::psz_string, aout_owner_t::req, audio_output::restart_request, audio_output::start, StereoModeCallback(), audio_output::stop, unlikely, unset_str, aout_owner_t::update, aout_owner_t::value, var_AddCallback, var_Change, var_Copy(), var_CopyDevice(), var_Create, var_GetInteger, var_GetNonEmptyString, var_SetString, ViewpointCallback(), vlc_custom_create, vlc_gettext(), vlc_mutex_init(), vlc_object_release, vlc_object_set_destructor, VLC_VAR_ADDCHOICE, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_SETTEXT, VLC_VAR_STRING, vlc_viewpoint_init(), aout_owner_t::volume, audio_output::volume_report, audio_output::volume_set, and aout_owner_t::vp.
|
static |
void aout_OutputDelete | ( | audio_output_t * | aout | ) |
Stops the audio output stream (undoes aout_OutputNew()).
References aout_OutputAssertLocked(), and audio_output::stop.
Referenced by aout_CheckReady(), aout_DecDelete(), and aout_DecNew().
|
static |
References aout_OutputAssertLocked(), and audio_output::device_select.
Referenced by aout_OutputUnlock().
void aout_OutputFlush | ( | audio_output_t * | aout, |
bool | wait | ||
) |
Flushes or drains the audio output buffers.
This enables the output to expedite seek and stop.
wait | if true, wait for buffer playback (i.e. drain), if false, discard the buffers immediately (i.e. flush) |
References aout_OutputAssertLocked(), and audio_output::flush.
Referenced by aout_DecFlush(), aout_DecSynchronize(), and PauseDefault().
void aout_OutputLock | ( | audio_output_t * | aout | ) |
References aout_owner(), aout_owner_t::lock, and vlc_mutex_lock().
Referenced by aout_DecChangePause(), aout_DecDelete(), aout_DecFlush(), aout_DecNew(), aout_DecPlay(), and aout_Destroy().
|
static |
References aout_OutputAssertLocked(), and audio_output::mute_set.
Referenced by aout_OutputUnlock().
int aout_OutputNew | ( | audio_output_t * | aout, |
audio_sample_format_t *restrict | fmt, | ||
aout_filters_cfg_t * | filters_cfg | ||
) |
Starts an audio output stream.
fmt | audio output stream format [IN/OUT] |
References AOUT_CHAN_CENTER, AOUT_CHANS_7_1, AOUT_CHANS_STEREO, AOUT_FMT_LINEAR, aout_FormatNbChannels(), aout_FormatPrepare(), aout_FormatPrint, aout_OutputAssertLocked(), aout_PrepareStereoMode(), aout_SetWavePhysicalChannels(), AOUT_VAR_CHAN_LEFT, AOUT_VAR_CHAN_RIGHT, AOUT_VAR_CHAN_UNSET, AUDIO_CHANNEL_TYPE_AMBISONICS, AUDIO_CHANNEL_TYPE_BITMAP, audio_output::current_sink_info, audio_output::headphones, msg_Err, audio_output::start, var_GetInteger, VLC_CODEC_FL32, and VLC_CODEC_S16N.
void aout_OutputPause | ( | audio_output_t * | aout, |
bool | pause, | ||
mtime_t | date | ||
) |
Notifies the audio output (if any) of pause/resume events.
This enables the output to expedite pause, instead of waiting for its buffers to drain.
References aout_OutputAssertLocked(), audio_output::pause, and PauseDefault().
Referenced by aout_DecChangePause().
void aout_OutputPlay | ( | audio_output_t * | aout, |
block_t * | block | ||
) |
Plays a decoded audio buffer.
References aout_OutputAssertLocked(), aout_owner(), block_t::i_buffer, audio_format_t::i_bytes_per_frame, audio_format_t::i_frame_length, block_t::i_nb_samples, aout_owner_t::mixer_format, and audio_output::play.
Referenced by aout_DecFlush(), aout_DecPlay(), and aout_DecSilence().
int aout_OutputTimeGet | ( | audio_output_t * | aout, |
mtime_t * | delay | ||
) |
References aout_OutputAssertLocked(), and audio_output::time_get.
Referenced by aout_DecSynchronize().
|
static |
References aout_owner(), aout_owner_t::lock, and vlc_mutex_trylock().
Referenced by aout_DeviceSet(), aout_MuteSet(), and aout_VolumeSet().
void aout_OutputUnlock | ( | audio_output_t * | aout | ) |
References aout_OutputDeviceSet(), aout_OutputMuteSet(), aout_OutputVolumeSet(), aout_owner(), aout_owner_t::device, aout_owner_t::lock, aout_owner_t::mute, aout_owner_t::req, unset_str, vlc_assert_locked(), vlc_mutex_lock(), vlc_mutex_unlock(), and aout_owner_t::volume.
Referenced by aout_DecChangePause(), aout_DecDelete(), aout_DecFlush(), aout_DecNew(), aout_DecPlay(), aout_Destroy(), aout_DeviceSet(), aout_MuteSet(), and aout_VolumeSet().
|
static |
References aout_OutputAssertLocked(), and audio_output::volume_set.
Referenced by aout_OutputUnlock().
|
static |
References audio_output::obj, vlc_common_members::parent, var_DecInteger, and var_IncInteger.
Referenced by aout_New().
|
static |
References _, AOUT_CHANIDX_DISABLE, AOUT_CHANIDX_LEFT, AOUT_CHANIDX_MAX, AOUT_CHANIDX_RIGHT, AOUT_CHANMODE_DOLBYSTEREO, AOUT_CHANMODE_DUALMONO, AOUT_FMT_LINEAR, AOUT_VAR_CHAN_DOLBYS, AOUT_VAR_CHAN_HEADPHONES, AOUT_VAR_CHAN_LEFT, AOUT_VAR_CHAN_MONO, AOUT_VAR_CHAN_RIGHT, AOUT_VAR_CHAN_RSTEREO, AOUT_VAR_CHAN_STEREO, AOUT_VAR_CHAN_UNSET, AUDIO_CHANNEL_TYPE_AMBISONICS, audio_output::current_sink_info, audio_output::headphones, aout_filters_cfg_t::headphones, vlc_value_t::i_int, vlc_value_t::psz_string, aout_filters_cfg_t::remap, var_Change, VLC_VAR_ADDCHOICE, VLC_VAR_CLEARCHOICES, and VLC_VAR_SETVALUE.
Referenced by aout_OutputNew().
|
static |
References aout_RequestRestart().
Referenced by aout_New().
|
static |
Supply or update the current custom ("hardware") volume.
volume | current custom volume |
References var_SetFloat.
Referenced by aout_New().
|
static |
< No error
References aout_InputRequestRestart(), vlc_value_t::psz_string, and VLC_SUCCESS.
Referenced by aout_Destroy(), and aout_New().
|
static |
References aout_OutputFlush().
Referenced by aout_OutputPause().
|
static |
References AOUT_RESTART_STEREOMODE, and aout_RestartRequest().
Referenced by aout_Destroy(), and aout_New().
|
static |
Referenced by aout_Destroy(), and aout_New().
|
static |
Referenced by aout_Destroy(), and aout_New().
|
static |
< No error
References aout_ChangeViewpoint(), vlc_value_t::p_address, and VLC_SUCCESS.
Referenced by aout_Destroy(), and aout_New().
|
static |
Referenced by aout_Destructor(), aout_DeviceSet(), aout_New(), and aout_OutputUnlock().