| VLC
    3.0.18
    | 

| Modules | |
| Audio output volume | |
| Files | |
| file | vlc_aout.h | 
| Data Structures | |
| struct | audio_output | 
| Audio output object.  More... | |
| struct | aout_filters_cfg_t | 
| Macros | |
| #define | AOUT_MAX_ADVANCE_TIME (AOUT_MAX_PREPARE_TIME + CLOCK_FREQ) | 
| #define | AOUT_MAX_PREPARE_TIME (2 * CLOCK_FREQ) | 
| #define | AOUT_MIN_PREPARE_TIME AOUT_MAX_PTS_ADVANCE | 
| #define | AOUT_MAX_PTS_ADVANCE (CLOCK_FREQ / 25) | 
| Maximum advance of actual audio playback time to coded PTS, above which downsampling will be performed.  More... | |
| #define | AOUT_MAX_PTS_DELAY (3 * CLOCK_FREQ / 50) | 
| Maximum delay of actual audio playback time from coded PTS, above which upsampling will be performed.  More... | |
| #define | AOUT_MAX_RESAMPLING 10 | 
| #define | AOUT_FMTS_IDENTICAL(p_first, p_second) | 
| #define | AOUT_FMTS_SIMILAR(p_first, p_second) | 
| #define | AOUT_FMT_LINEAR(p_format) (aout_BitsPerSample((p_format)->i_format) != 0) | 
| #define | VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i') | 
| #define | VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b') | 
| #define | AOUT_FMT_SPDIF(p_format) | 
| #define | AOUT_FMT_HDMI(p_format) | 
| #define | AOUT_VAR_CHAN_UNSET 0 /* must be zero */ | 
| #define | AOUT_VAR_CHAN_STEREO 1 | 
| #define | AOUT_VAR_CHAN_RSTEREO 2 | 
| #define | AOUT_VAR_CHAN_LEFT 3 | 
| #define | AOUT_VAR_CHAN_RIGHT 4 | 
| #define | AOUT_VAR_CHAN_DOLBYS 5 | 
| #define | AOUT_VAR_CHAN_HEADPHONES 6 | 
| #define | AOUT_VAR_CHAN_MONO 7 | 
| #define | AOUT_SPDIF_SIZE 6144 | 
| #define | A52_FRAME_NB 1536 | 
| #define | AOUT_CHAN_REMAP_INIT | 
| #define | AOUT_RESTART_FILTERS 0x1 | 
| #define | AOUT_RESTART_OUTPUT (AOUT_RESTART_FILTERS|0x2) | 
| #define | AOUT_RESTART_STEREOMODE (AOUT_RESTART_OUTPUT|0x4) | 
| #define | aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f) | 
| #define | AOUT_VOLUME_DEFAULT 256 | 
| #define | AOUT_VOLUME_MAX 512 | 
| #define | AOUT_FILTERS_CFG_INIT | 
| #define | aout_FiltersNew(o, inf, outf, rv, remap) aout_FiltersNew(VLC_OBJECT(o),inf,outf,rv,remap) | 
| #define | aout_FiltersDelete(o, f) aout_FiltersDelete(VLC_OBJECT(o),f) | 
| Typedefs | |
| typedef struct aout_filters | aout_filters_t | 
| typedef struct aout_request_vout | aout_request_vout_t | 
| Functions | |
| unsigned | aout_CheckChannelReorder (const uint32_t *, const uint32_t *, uint32_t mask, uint8_t *table) | 
| This function computes the reordering needed to go from pi_chan_order_in to pi_chan_order_out.  More... | |
| void | aout_ChannelReorder (void *, size_t, uint8_t, const uint8_t *, vlc_fourcc_t) | 
| void | aout_Interleave (void *dst, const void *const *planes, unsigned samples, unsigned channels, vlc_fourcc_t fourcc) | 
| void | aout_Deinterleave (void *dst, const void *src, unsigned samples, unsigned channels, vlc_fourcc_t fourcc) | 
| bool | aout_CheckChannelExtraction (int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[9], const uint32_t *pi_order_src, int i_channels) | 
| This function will compute the extraction parameter into pi_selection to go from i_channels with their type given by pi_order_src[] into the order describe by pi_order_dst.  More... | |
| void | aout_ChannelExtract (void *p_dst, int i_dst_channels, const void *p_src, int i_src_channels, int i_sample_count, const int *pi_selection, int i_bits_per_sample) | 
| Do the actual channels extraction using the parameters created by aout_CheckChannelExtraction.  More... | |
| static unsigned | aout_FormatNbChannels (const audio_sample_format_t *fmt) | 
| unsigned int | aout_BitsPerSample (vlc_fourcc_t i_format) | 
| void | aout_FormatPrepare (audio_sample_format_t *p_format) | 
| void | aout_FormatPrint (vlc_object_t *, const char *, const audio_sample_format_t *) | 
| Prints an audio sample format in a human-readable form.  More... | |
| const char * | aout_FormatPrintChannels (const audio_sample_format_t *) | 
| float | aout_VolumeGet (audio_output_t *) | 
| Gets the volume of the audio output stream (independent of mute).  More... | |
| int | aout_VolumeSet (audio_output_t *, float) | 
| Sets the volume of the audio output stream.  More... | |
| int | aout_VolumeUpdate (audio_output_t *, int, float *) | 
| Raises the volume.  More... | |
| int | aout_MuteGet (audio_output_t *) | 
| Gets the audio output stream mute flag.  More... | |
| int | aout_MuteSet (audio_output_t *, bool) | 
| Sets the audio output stream mute flag.  More... | |
| char * | aout_DeviceGet (audio_output_t *) | 
| Gets the currently selected device.  More... | |
| int | aout_DeviceSet (audio_output_t *, const char *) | 
| Selects an audio output device.  More... | |
| int | aout_DevicesList (audio_output_t *, char ***, char ***) | 
| Enumerates possible audio output devices.  More... | |
| static void | aout_VolumeReport (audio_output_t *aout, float volume) | 
| Report change of configured audio volume to the core and UI.  More... | |
| static void | aout_MuteReport (audio_output_t *aout, bool mute) | 
| Report change of muted flag to the core and UI.  More... | |
| static void | aout_PolicyReport (audio_output_t *aout, bool cork) | 
| Report audio policy status.  More... | |
| static void | aout_DeviceReport (audio_output_t *aout, const char *id) | 
| Report change of output device.  More... | |
| static void | aout_HotplugReport (audio_output_t *aout, const char *id, const char *name) | 
| Report a device hot-plug event.  More... | |
| static int | aout_GainRequest (audio_output_t *aout, float gain) | 
| Request a change of software audio amplification.  More... | |
| static void | aout_RestartRequest (audio_output_t *aout, unsigned mode) | 
| aout_filters_t * | aout_FiltersNew (vlc_object_t *, const audio_sample_format_t *, const audio_sample_format_t *, const aout_request_vout_t *, const aout_filters_cfg_t *cfg) | 
| void | aout_FiltersDelete (vlc_object_t *, aout_filters_t *) | 
| Destroys a chain of audio filters.  More... | |
| bool | aout_FiltersAdjustResampling (aout_filters_t *, int) | 
| block_t * | aout_FiltersPlay (aout_filters_t *, block_t *, int rate) | 
| block_t * | aout_FiltersDrain (aout_filters_t *) | 
| void | aout_FiltersFlush (aout_filters_t *) | 
| void | aout_FiltersChangeViewpoint (aout_filters_t *, const vlc_viewpoint_t *vp) | 
| vout_thread_t * | aout_filter_RequestVout (filter_t *, vout_thread_t *p_vout, const video_format_t *p_fmt) | 
| Variables | |
| static const uint32_t | pi_vlc_chan_order_wg4 [] | 
| It describes the audio channel order VLC expect.  More... | |
| #define A52_FRAME_NB 1536 | 
| #define AOUT_CHAN_REMAP_INIT | 
| #define AOUT_FILTERS_CFG_INIT | 
| #define aout_FiltersDelete | ( | o, | |
| f | |||
| ) | aout_FiltersDelete(VLC_OBJECT(o),f) | 
| #define aout_FiltersNew | ( | o, | |
| inf, | |||
| outf, | |||
| rv, | |||
| remap | |||
| ) | aout_FiltersNew(VLC_OBJECT(o),inf,outf,rv,remap) | 
| #define AOUT_FMT_HDMI | ( | p_format | ) | 
| #define AOUT_FMT_LINEAR | ( | p_format | ) | (aout_BitsPerSample((p_format)->i_format) != 0) | 
| #define AOUT_FMT_SPDIF | ( | p_format | ) | 
| #define AOUT_FMTS_IDENTICAL | ( | p_first, | |
| p_second | |||
| ) | 
| #define AOUT_FMTS_SIMILAR | ( | p_first, | |
| p_second | |||
| ) | 
| #define aout_FormatPrint | ( | o, | |
| t, | |||
| f | |||
| ) | aout_FormatPrint(VLC_OBJECT(o), t, f) | 
| #define AOUT_MAX_ADVANCE_TIME (AOUT_MAX_PREPARE_TIME + CLOCK_FREQ) | 
| #define AOUT_MAX_PREPARE_TIME (2 * CLOCK_FREQ) | 
| #define AOUT_MAX_PTS_ADVANCE (CLOCK_FREQ / 25) | 
Maximum advance of actual audio playback time to coded PTS, above which downsampling will be performed.
| #define AOUT_MAX_PTS_DELAY (3 * CLOCK_FREQ / 50) | 
Maximum delay of actual audio playback time from coded PTS, above which upsampling will be performed.
| #define AOUT_MAX_RESAMPLING 10 | 
| #define AOUT_MIN_PREPARE_TIME AOUT_MAX_PTS_ADVANCE | 
| #define AOUT_RESTART_FILTERS 0x1 | 
| #define AOUT_RESTART_OUTPUT (AOUT_RESTART_FILTERS|0x2) | 
| #define AOUT_RESTART_STEREOMODE (AOUT_RESTART_OUTPUT|0x4) | 
| #define AOUT_SPDIF_SIZE 6144 | 
| #define AOUT_VAR_CHAN_DOLBYS 5 | 
| #define AOUT_VAR_CHAN_HEADPHONES 6 | 
| #define AOUT_VAR_CHAN_LEFT 3 | 
| #define AOUT_VAR_CHAN_MONO 7 | 
| #define AOUT_VAR_CHAN_RIGHT 4 | 
| #define AOUT_VAR_CHAN_RSTEREO 2 | 
| #define AOUT_VAR_CHAN_STEREO 1 | 
| #define AOUT_VAR_CHAN_UNSET 0 /* must be zero */ | 
| #define AOUT_VOLUME_DEFAULT 256 | 
| #define AOUT_VOLUME_MAX 512 | 
| #define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b') | 
| #define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i') | 
| typedef struct aout_filters aout_filters_t | 
| typedef struct aout_request_vout aout_request_vout_t | 
| enum vlc_chan_order_idx_t | 
| unsigned int aout_BitsPerSample | ( | vlc_fourcc_t | i_format | ) | 
References AUDIO_ES, VLC_CODEC_ALAW, VLC_CODEC_F32B, VLC_CODEC_F32L, VLC_CODEC_F64B, VLC_CODEC_F64L, VLC_CODEC_MULAW, VLC_CODEC_S16B, VLC_CODEC_S16L, VLC_CODEC_S24B, VLC_CODEC_S24B32, VLC_CODEC_S24L, VLC_CODEC_S24L32, VLC_CODEC_S32B, VLC_CODEC_S32L, VLC_CODEC_S8, VLC_CODEC_U16B, VLC_CODEC_U16L, VLC_CODEC_U24B, VLC_CODEC_U24L, VLC_CODEC_U32B, VLC_CODEC_U32L, VLC_CODEC_U8, and vlc_fourcc_GetCodec().
Referenced by aout_ChannelReorder(), and aout_FormatPrepare().
| void aout_ChannelExtract | ( | void * | p_dst, | 
| int | i_dst_channels, | ||
| const void * | p_src, | ||
| int | i_src_channels, | ||
| int | i_sample_count, | ||
| const int * | pi_selection, | ||
| int | i_bits_per_sample | ||
| ) | 
Do the actual channels extraction using the parameters created by aout_CheckChannelExtraction.
XXX this function does not work in place (p_dst and p_src must not overlap). XXX Only 8, 16, 32, 64 bits per sample are supported.
| void aout_ChannelReorder | ( | void * | , | 
| size_t | , | ||
| uint8_t | , | ||
| const uint8_t * | , | ||
| vlc_fourcc_t | |||
| ) | 
| bool aout_CheckChannelExtraction | ( | int * | pi_selection, | 
| uint32_t * | pi_layout, | ||
| int * | pi_channels, | ||
| const uint32_t | pi_order_dst[9], | ||
| const uint32_t * | pi_order_src, | ||
| int | i_channels | ||
| ) | 
This function will compute the extraction parameter into pi_selection to go from i_channels with their type given by pi_order_src[] into the order describe by pi_order_dst.
It will also set :
It will return true if channel extraction is really needed, in which case aout_ChannelExtract must be used
XXX It must be used when the source may have channel type not understood by VLC. In this case the channel type pi_order_src[] must be set to 0. XXX It must also be used if multiple channels have the same type.
| unsigned aout_CheckChannelReorder | ( | const uint32_t * | , | 
| const uint32_t * | , | ||
| uint32_t | mask, | ||
| uint8_t * | table | ||
| ) | 
This function computes the reordering needed to go from pi_chan_order_in to pi_chan_order_out.
If pi_chan_order_in or pi_chan_order_out is NULL, it will assume that vlc internal (WG4) order is requested.
| void aout_Deinterleave | ( | void * | dst, | 
| const void * | src, | ||
| unsigned | samples, | ||
| unsigned | channels, | ||
| vlc_fourcc_t | fourcc | ||
| ) | 
| char* aout_DeviceGet | ( | audio_output_t * | aout | ) | 
Gets the currently selected device.
References var_GetNonEmptyString.
| 
 | inlinestatic | 
Report change of output device.
References device_report, and event.
| int aout_DeviceSet | ( | audio_output_t * | aout, | 
| const char * | id | ||
| ) | 
Selects an audio output device.
| id | device ID to select, or NULL for the default device | 
References aout_OutputTryLock(), aout_OutputUnlock(), aout_owner(), aout_owner_t::device, aout_owner_t::lock, aout_owner_t::req, strdup(), unlikely, unset_str, vlc_mutex_lock(), and vlc_mutex_unlock().
| int aout_DevicesList | ( | audio_output_t * | aout, | 
| char *** | ids, | ||
| char *** | names | ||
| ) | 
Enumerates possible audio output devices.
The function will heap-allocate two tables of heap-allocated strings; the caller is responsible for freeing all strings and both tables.
| ids | pointer to a table of device identifiers [OUT] | 
| names | pointer to a table of device human-readable descriptions [OUT] | 
References aout_owner(), aout_owner_t::count, aout_owner_t::dev, aout_owner_t::list, aout_owner_t::lock, aout_dev::next, strdup(), unlikely, vlc_alloc(), vlc_mutex_lock(), and vlc_mutex_unlock().
| vout_thread_t* aout_filter_RequestVout | ( | filter_t * | , | 
| vout_thread_t * | p_vout, | ||
| const video_format_t * | p_fmt | ||
| ) | 
| bool aout_FiltersAdjustResampling | ( | aout_filters_t * | , | 
| int | |||
| ) | 
References aout_filters::resampler, and aout_filters::resampling.
Referenced by aout_DecSynchronize(), and aout_StopResampling().
| void aout_FiltersChangeViewpoint | ( | aout_filters_t * | , | 
| const vlc_viewpoint_t * | vp | ||
| ) | 
References aout_FiltersPipelineChangeViewpoint(), aout_filters::count, and aout_filters::tab.
Referenced by aout_DecPlay().
| void aout_FiltersDelete | ( | vlc_object_t * | obj, | 
| aout_filters_t * | filters | ||
| ) | 
Destroys a chain of audio filters.
| obj | object used with aout_FiltersNew() | 
| filters | chain to be destroyed | 
References aout_FiltersPipelineDestroy(), aout_filters::count, aout_filters::resampler, aout_filters::tab, var_DelCallback, and VisualizationCallback().
| block_t* aout_FiltersDrain | ( | aout_filters_t * | ) | 
| void aout_FiltersFlush | ( | aout_filters_t * | ) | 
References aout_FiltersPipelineFlush(), aout_filters::count, aout_filters::resampler, and aout_filters::tab.
Referenced by aout_DecFlush().
| aout_filters_t* aout_FiltersNew | ( | vlc_object_t * | , | 
| const audio_sample_format_t * | , | ||
| const audio_sample_format_t * | , | ||
| const aout_request_vout_t * | , | ||
| const aout_filters_cfg_t * | cfg | ||
| ) | 
| block_t* aout_FiltersPlay | ( | aout_filters_t * | , | 
| block_t * | , | ||
| int | rate | ||
| ) | 
| 
 | inlinestatic | 
Referenced by aout_DecNew(), aout_FiltersNew(), aout_FormatPrepare(), aout_OutputNew(), and CreateFilter().
| void aout_FormatPrepare | ( | audio_sample_format_t * | p_format | ) | 
References aout_BitsPerSample(), aout_FormatNbChannels(), audio_format_t::i_bitspersample, audio_format_t::i_bytes_per_frame, audio_format_t::i_channels, audio_format_t::i_format, and audio_format_t::i_frame_length.
Referenced by aout_FiltersNew(), aout_FiltersPipelineCreate(), aout_OutputNew(), aout_SetWavePhysicalChannels(), aout_update_format(), and TryFormat().
| void aout_FormatPrint | ( | vlc_object_t * | , | 
| const char * | , | ||
| const audio_sample_format_t * | |||
| ) | 
Prints an audio sample format in a human-readable form.
References aout_FormatPrintChannels(), audio_format_t::i_bytes_per_frame, audio_format_t::i_format, audio_format_t::i_frame_length, audio_format_t::i_rate, and msg_Dbg.
| const char* aout_FormatPrintChannels | ( | const audio_sample_format_t * | ) | 
References AOUT_CHAN_CENTER, AOUT_CHAN_LEFT, AOUT_CHAN_LFE, AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT, AOUT_CHAN_REARCENTER, AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_RIGHT, AOUT_CHANMODE_DOLBYSTEREO, AOUT_CHANMODE_DUALMONO, AUDIO_CHANNEL_TYPE_AMBISONICS, audio_format_t::channel_type, audio_format_t::i_chan_mode, and audio_format_t::i_physical_channels.
Referenced by aout_FormatPrint(), and aout_FormatsPrint().
| 
 | inlinestatic | 
Request a change of software audio amplification.
| gain | linear amplitude gain (must be positive) | 
| 
 | inlinestatic | 
Report a device hot-plug event.
| id | device ID | 
| name | human-readable device name (NULL for hot unplug) | 
References event, hotplug_report, and name.
| void aout_Interleave | ( | void * | dst, | 
| const void *const * | planes, | ||
| unsigned | samples, | ||
| unsigned | channels, | ||
| vlc_fourcc_t | fourcc | ||
| ) | 
| int aout_MuteGet | ( | audio_output_t * | aout | ) | 
Gets the audio output stream mute flag.
References var_InheritBool.
Referenced by playlist_MuteGet().
| 
 | inlinestatic | 
Report change of muted flag to the core and UI.
References event, and mute_report.
| int aout_MuteSet | ( | audio_output_t * | aout, | 
| bool | mute | ||
| ) | 
Sets the audio output stream mute flag.
References aout_OutputTryLock(), aout_OutputUnlock(), aout_owner(), aout_owner_t::lock, aout_owner_t::mute, aout_owner_t::req, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by playlist_MuteSet().
| 
 | inlinestatic | 
Report audio policy status.
| cork | true to request a cork, false to undo any pending cork. | 
References event, and policy_report.
| 
 | inlinestatic | 
Referenced by StereoModeCallback().
| float aout_VolumeGet | ( | audio_output_t * | aout | ) | 
Gets the volume of the audio output stream (independent of mute).
References var_GetFloat.
Referenced by aout_VolumeUpdate(), and playlist_VolumeGet().
| 
 | inlinestatic | 
Report change of configured audio volume to the core and UI.
References event, and volume_report.
| int aout_VolumeSet | ( | audio_output_t * | aout, | 
| float | vol | ||
| ) | 
Sets the volume of the audio output stream.
References aout_OutputTryLock(), aout_OutputUnlock(), aout_owner(), aout_owner_t::lock, aout_owner_t::req, vlc_mutex_lock(), vlc_mutex_unlock(), and aout_owner_t::volume.
Referenced by aout_VolumeUpdate(), and playlist_VolumeSet().
| int aout_VolumeUpdate | ( | audio_output_t * | aout, | 
| int | value, | ||
| float * | volp | ||
| ) | 
Raises the volume.
| value | how much to increase (> 0) or decrease (< 0) the volume | 
| volp | if non-NULL, will contain contain the resulting volume | 
References AOUT_VOLUME_DEFAULT, aout_VolumeGet(), aout_VolumeSet(), and var_InheritFloat.
Referenced by playlist_VolumeUp().
| 
 | static | 
It describes the audio channel order VLC expect.
Referenced by aout_CheckChannelReorder().
 1.8.16
 1.8.16