VLC  4.0.0-dev
Modules | Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Collaboration diagram for Audio output:

Modules

 Audio output volume
 

Files

file  vlc_aout.h
 

Data Structures

struct  vlc_audio_output_events
 
struct  audio_output
 Audio output object. More...
 
struct  aout_filters_cfg_t
 

Macros

#define AOUT_MAX_ADVANCE_TIME   (AOUT_MAX_PREPARE_TIME + VLC_TICK_FROM_SEC(1))
 
#define AOUT_MAX_PREPARE_TIME   VLC_TICK_FROM_SEC(2)
 
#define AOUT_MIN_PREPARE_TIME   AOUT_MAX_PTS_ADVANCE
 
#define AOUT_MAX_PTS_ADVANCE   VLC_TICK_FROM_MS(40)
 Maximum advance of actual audio playback time to coded PTS, above which downsampling will be performed. More...
 
#define AOUT_MAX_PTS_DELAY   VLC_TICK_FROM_MS(60)
 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_MONO   7
 
#define AOUT_MIX_MODE_UNSET   0
 
#define AOUT_MIX_MODE_STEREO   1
 
#define AOUT_MIX_MODE_BINAURAL   2
 
#define AOUT_MIX_MODE_4_0   3
 
#define AOUT_MIX_MODE_5_1   4
 
#define AOUT_MIX_MODE_7_1   5
 
#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, remap)   aout_FiltersNew(VLC_OBJECT(o),inf,outf,remap)
 
#define aout_FiltersDelete(o, f)   aout_FiltersDelete(VLC_OBJECT(o),f)
 

Typedefs

typedef struct aout_filters aout_filters_t
 

Enumerations

enum  vlc_chan_order_idx_t {
  AOUT_CHANIDX_DISABLE = -1, AOUT_CHANIDX_LEFT, AOUT_CHANIDX_RIGHT, AOUT_CHANIDX_MIDDLELEFT,
  AOUT_CHANIDX_MIDDLERIGHT, AOUT_CHANIDX_REARLEFT, AOUT_CHANIDX_REARRIGHT, AOUT_CHANIDX_REARCENTER,
  AOUT_CHANIDX_CENTER, AOUT_CHANIDX_LFE, AOUT_CHANIDX_MAX
}
 

Functions

VLC_EXPORT 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...
 
VLC_EXPORT void aout_ChannelReorder (void *, size_t, uint8_t, const uint8_t *, vlc_fourcc_t)
 
VLC_EXPORT void aout_Interleave (void *dst, const void *const *planes, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
 
VLC_EXPORT void aout_Deinterleave (void *dst, const void *src, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
 
VLC_EXPORT 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...
 
VLC_EXPORT 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)
 
VLC_EXPORT unsigned int aout_BitsPerSample (vlc_fourcc_t i_format)
 
VLC_EXPORT void aout_FormatPrepare (audio_sample_format_t *p_format)
 
VLC_EXPORT 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 VLC_EXPORT char * aout_FormatPrintChannels (const audio_sample_format_t *)
 
VLC_EXPORT float aout_VolumeGet (audio_output_t *)
 Gets the volume of the audio output stream (independent of mute). More...
 
VLC_EXPORT int aout_VolumeSet (audio_output_t *, float)
 Sets the volume of the audio output stream. More...
 
VLC_EXPORT int aout_VolumeUpdate (audio_output_t *, int, float *)
 Raises the volume. More...
 
VLC_EXPORT int aout_MuteGet (audio_output_t *)
 Gets the audio output stream mute flag. More...
 
VLC_EXPORT int aout_MuteSet (audio_output_t *, bool)
 Sets the audio output stream mute flag. More...
 
VLC_EXPORT char * aout_DeviceGet (audio_output_t *)
 Gets the currently selected device. More...
 
VLC_EXPORT int aout_DeviceSet (audio_output_t *, const char *)
 Selects an audio output device. More...
 
VLC_EXPORT 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)
 
static int aout_TimeGetDefault (audio_output_t *aout, vlc_tick_t *restrict delay)
 Default implementation for audio_output_t.time_get. More...
 
static void aout_PauseDefault (audio_output_t *aout, bool paused, vlc_tick_t date)
 Default implementation for audio_output_t.pause. More...
 
VLC_EXPORT int aout_EnableFilter (audio_output_t *aout, const char *name, bool add)
 Enable or disable an audio filter ("audio-filter") More...
 
VLC_EXPORT aout_filters_taout_FiltersNew (vlc_object_t *, const audio_sample_format_t *, const audio_sample_format_t *, const aout_filters_cfg_t *cfg)
 
VLC_EXPORT void aout_FiltersDelete (vlc_object_t *, aout_filters_t *)
 Destroys a chain of audio filters. More...
 
VLC_EXPORT bool aout_FiltersAdjustResampling (aout_filters_t *, int)
 
VLC_EXPORT block_taout_FiltersPlay (aout_filters_t *, block_t *, float rate)
 
VLC_EXPORT block_taout_FiltersDrain (aout_filters_t *)
 
VLC_EXPORT void aout_FiltersFlush (aout_filters_t *)
 
VLC_EXPORT void aout_FiltersChangeViewpoint (aout_filters_t *, const vlc_viewpoint_t *vp)
 
VLC_EXPORT vout_thread_taout_filter_GetVout (filter_t *, const video_format_t *)
 
static int aout_TimeGet (audio_output_t *aout, vlc_tick_t *delay)
 

Variables

static const uint32_t pi_vlc_chan_order_wg4 []
 It describes the audio channel order VLC expect. More...
 

Detailed Description

Macro Definition Documentation

◆ A52_FRAME_NB

#define A52_FRAME_NB   1536

◆ AOUT_CHAN_REMAP_INIT

#define AOUT_CHAN_REMAP_INIT
Value:
{ \
AOUT_CHANIDX_LEFT, \
AOUT_CHANIDX_RIGHT, \
AOUT_CHANIDX_MIDDLELEFT, \
AOUT_CHANIDX_MIDDLERIGHT, \
AOUT_CHANIDX_REARLEFT, \
AOUT_CHANIDX_REARRIGHT, \
AOUT_CHANIDX_REARCENTER, \
AOUT_CHANIDX_CENTER, \
AOUT_CHANIDX_LFE, \
}

◆ AOUT_FILTERS_CFG_INIT

#define AOUT_FILTERS_CFG_INIT
Value:
{ .remap = AOUT_CHAN_REMAP_INIT, \
.headphones = false, \
};

◆ aout_FiltersDelete

#define aout_FiltersDelete (   o,
 
)    aout_FiltersDelete(VLC_OBJECT(o),f)

◆ aout_FiltersNew

#define aout_FiltersNew (   o,
  inf,
  outf,
  remap 
)    aout_FiltersNew(VLC_OBJECT(o),inf,outf,remap)

◆ AOUT_FMT_HDMI

#define AOUT_FMT_HDMI (   p_format)
Value:
( (p_format)->i_format == VLC_CODEC_EAC3 \
||(p_format)->i_format == VLC_CODEC_DTSHD \
||(p_format)->i_format == VLC_CODEC_TRUEHD \
||(p_format)->i_format == VLC_CODEC_MLP \
)

◆ AOUT_FMT_LINEAR

#define AOUT_FMT_LINEAR (   p_format)    (aout_BitsPerSample((p_format)->i_format) != 0)

◆ AOUT_FMT_SPDIF

#define AOUT_FMT_SPDIF (   p_format)
Value:
( ((p_format)->i_format == VLC_CODEC_SPDIFL) \
|| ((p_format)->i_format == VLC_CODEC_SPDIFB) \
|| ((p_format)->i_format == VLC_CODEC_A52) \
|| ((p_format)->i_format == VLC_CODEC_DTS) )

◆ AOUT_FMTS_IDENTICAL

#define AOUT_FMTS_IDENTICAL (   p_first,
  p_second 
)
Value:
( \
((p_first)->i_format == (p_second)->i_format) \
&& AOUT_FMTS_SIMILAR(p_first, p_second) )

◆ AOUT_FMTS_SIMILAR

#define AOUT_FMTS_SIMILAR (   p_first,
  p_second 
)
Value:
( \
((p_first)->i_rate == (p_second)->i_rate) \
&& ((p_first)->channel_type == (p_second)->channel_type) \
&& ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
&& ((p_first)->i_chan_mode == (p_second)->i_chan_mode) )

◆ aout_FormatPrint

#define aout_FormatPrint (   o,
  t,
 
)    aout_FormatPrint(VLC_OBJECT(o), t, f)

◆ AOUT_MAX_ADVANCE_TIME

#define AOUT_MAX_ADVANCE_TIME   (AOUT_MAX_PREPARE_TIME + VLC_TICK_FROM_SEC(1))

◆ AOUT_MAX_PREPARE_TIME

#define AOUT_MAX_PREPARE_TIME   VLC_TICK_FROM_SEC(2)

◆ AOUT_MAX_PTS_ADVANCE

#define AOUT_MAX_PTS_ADVANCE   VLC_TICK_FROM_MS(40)

Maximum advance of actual audio playback time to coded PTS, above which downsampling will be performed.

◆ AOUT_MAX_PTS_DELAY

#define AOUT_MAX_PTS_DELAY   VLC_TICK_FROM_MS(60)

Maximum delay of actual audio playback time from coded PTS, above which upsampling will be performed.

◆ AOUT_MAX_RESAMPLING

#define AOUT_MAX_RESAMPLING   10

◆ AOUT_MIN_PREPARE_TIME

#define AOUT_MIN_PREPARE_TIME   AOUT_MAX_PTS_ADVANCE

◆ AOUT_MIX_MODE_4_0

#define AOUT_MIX_MODE_4_0   3

◆ AOUT_MIX_MODE_5_1

#define AOUT_MIX_MODE_5_1   4

◆ AOUT_MIX_MODE_7_1

#define AOUT_MIX_MODE_7_1   5

◆ AOUT_MIX_MODE_BINAURAL

#define AOUT_MIX_MODE_BINAURAL   2

◆ AOUT_MIX_MODE_STEREO

#define AOUT_MIX_MODE_STEREO   1

◆ AOUT_MIX_MODE_UNSET

#define AOUT_MIX_MODE_UNSET   0

◆ AOUT_RESTART_FILTERS

#define AOUT_RESTART_FILTERS   0x1

◆ AOUT_RESTART_OUTPUT

#define AOUT_RESTART_OUTPUT   (AOUT_RESTART_FILTERS|0x2)

◆ AOUT_RESTART_STEREOMODE

#define AOUT_RESTART_STEREOMODE   (AOUT_RESTART_OUTPUT|0x4)

◆ AOUT_SPDIF_SIZE

#define AOUT_SPDIF_SIZE   6144

◆ AOUT_VAR_CHAN_DOLBYS

#define AOUT_VAR_CHAN_DOLBYS   5

◆ AOUT_VAR_CHAN_LEFT

#define AOUT_VAR_CHAN_LEFT   3

◆ AOUT_VAR_CHAN_MONO

#define AOUT_VAR_CHAN_MONO   7

◆ AOUT_VAR_CHAN_RIGHT

#define AOUT_VAR_CHAN_RIGHT   4

◆ AOUT_VAR_CHAN_RSTEREO

#define AOUT_VAR_CHAN_RSTEREO   2

◆ AOUT_VAR_CHAN_STEREO

#define AOUT_VAR_CHAN_STEREO   1

◆ AOUT_VAR_CHAN_UNSET

#define AOUT_VAR_CHAN_UNSET   0 /* must be zero */

◆ AOUT_VOLUME_DEFAULT

#define AOUT_VOLUME_DEFAULT   256

◆ AOUT_VOLUME_MAX

#define AOUT_VOLUME_MAX   512

◆ VLC_CODEC_SPDIFB

#define VLC_CODEC_SPDIFB   VLC_FOURCC('s','p','d','b')

◆ VLC_CODEC_SPDIFL

#define VLC_CODEC_SPDIFL   VLC_FOURCC('s','p','d','i')

Typedef Documentation

◆ aout_filters_t

typedef struct aout_filters aout_filters_t

Enumeration Type Documentation

◆ vlc_chan_order_idx_t

Enumerator
AOUT_CHANIDX_DISABLE 
AOUT_CHANIDX_LEFT 
AOUT_CHANIDX_RIGHT 
AOUT_CHANIDX_MIDDLELEFT 
AOUT_CHANIDX_MIDDLERIGHT 
AOUT_CHANIDX_REARLEFT 
AOUT_CHANIDX_REARRIGHT 
AOUT_CHANIDX_REARCENTER 
AOUT_CHANIDX_CENTER 
AOUT_CHANIDX_LFE 
AOUT_CHANIDX_MAX 

Function Documentation

◆ aout_BitsPerSample()

VLC_EXPORT unsigned int aout_BitsPerSample ( vlc_fourcc_t  i_format)

◆ aout_ChannelExtract()

VLC_EXPORT 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.

References ExtractChannel().

◆ aout_ChannelReorder()

VLC_EXPORT void aout_ChannelReorder ( void *  ,
size_t  ,
uint8_t  ,
const uint8_t *  ,
vlc_fourcc_t   
)

◆ aout_CheckChannelExtraction()

VLC_EXPORT 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 :

  • *pi_channels as the number of channels that will be extracted which is lower (in case of non understood channels type) or equal to i_channels.
  • the layout of the channels (*pi_layout).

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.

References AOUT_CHAN_MAX, pi_vlc_chan_order_wg4, and static_assert.

◆ aout_CheckChannelReorder()

VLC_EXPORT 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.

◆ aout_Deinterleave()

VLC_EXPORT void aout_Deinterleave ( void *  dst,
const void *  src,
unsigned  samples,
unsigned  channels,
vlc_fourcc_t  fourcc 
)

◆ aout_DeviceGet()

VLC_EXPORT char* aout_DeviceGet ( audio_output_t aout)

Gets the currently selected device.

Returns
the selected device ID (caller must free() it) NULL if no device is selected or in case of error.

References var_GetNonEmptyString().

◆ aout_DeviceReport()

static void aout_DeviceReport ( audio_output_t aout,
const char *  id 
)
inlinestatic

Report change of output device.

References vlc_audio_output_events::device_report, and events.

◆ aout_DeviceSet()

VLC_EXPORT int aout_DeviceSet ( audio_output_t aout,
const char *  id 
)

Selects an audio output device.

Parameters
iddevice ID to select, or NULL for the default device
Returns
zero on success, non-zero on error.

References aout_owner(), device_select, aout_owner_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().

◆ aout_DevicesList()

VLC_EXPORT 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.

Parameters
idspointer to a table of device identifiers [OUT]
namespointer to a table of device human-readable descriptions [OUT]
Returns
the number of devices, or negative on error.
Note
In case of error, *ids and *names are undefined.

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, strdup(), unlikely, vlc_alloc(), vlc_list_foreach, vlc_mutex_lock(), and vlc_mutex_unlock().

◆ aout_EnableFilter()

VLC_EXPORT int aout_EnableFilter ( audio_output_t aout,
const char *  name,
bool  add 
)

Enable or disable an audio filter ("audio-filter")

Parameters
aouta valid audio output
namea valid filter name
addtrue to add the filter, false to remove it
Returns
0 on success, non-zero on failure.

References FilterOrder(), p, psz_name, unlikely, var_GetString(), var_SetString(), VLC_EGENERIC, VLC_ENOMEM, and VLC_SUCCESS.

Referenced by vlc_player_aout_EnableFilter().

◆ aout_filter_GetVout()

VLC_EXPORT vout_thread_t* aout_filter_GetVout ( filter_t ,
const video_format_t  
)

◆ aout_FiltersAdjustResampling()

VLC_EXPORT bool aout_FiltersAdjustResampling ( aout_filters_t ,
int   
)

◆ aout_FiltersChangeViewpoint()

VLC_EXPORT void aout_FiltersChangeViewpoint ( aout_filters_t ,
const vlc_viewpoint_t vp 
)

◆ aout_FiltersDelete()

VLC_EXPORT void aout_FiltersDelete ( vlc_object_t obj,
aout_filters_t filters 
)

Destroys a chain of audio filters.

Parameters
objobject used with aout_FiltersNew()
filterschain to be destroyed

References aout_FiltersPipelineDestroy(), aout_filters::clock, aout_filters::count, aout_filters::resampler, aout_filters::tab, var_DelCallback(), VisualizationCallback(), and vlc_clock_Delete().

◆ aout_FiltersDrain()

VLC_EXPORT block_t* aout_FiltersDrain ( aout_filters_t )

◆ aout_FiltersFlush()

VLC_EXPORT void aout_FiltersFlush ( aout_filters_t )

◆ aout_FiltersNew()

VLC_EXPORT aout_filters_t* aout_FiltersNew ( vlc_object_t ,
const audio_sample_format_t ,
const audio_sample_format_t ,
const aout_filters_cfg_t cfg 
)

◆ aout_FiltersPlay()

VLC_EXPORT block_t* aout_FiltersPlay ( aout_filters_t ,
block_t ,
float  rate 
)

◆ aout_FormatNbChannels()

static unsigned aout_FormatNbChannels ( const audio_sample_format_t fmt)
inlinestatic

◆ aout_FormatPrepare()

VLC_EXPORT void aout_FormatPrepare ( audio_sample_format_t p_format)

◆ aout_FormatPrint()

VLC_EXPORT void aout_FormatPrint ( vlc_object_t ,
const char *  ,
const audio_sample_format_t  
)

◆ aout_FormatPrintChannels()

const VLC_EXPORT char* aout_FormatPrintChannels ( const audio_sample_format_t )

◆ aout_GainRequest()

static int aout_GainRequest ( audio_output_t aout,
float  gain 
)
inlinestatic

Request a change of software audio amplification.

Parameters
gainlinear amplitude gain (must be positive)
Warning
Values in excess 1.0 may cause overflow and distorsion.

References events, and vlc_audio_output_events::gain_request.

◆ aout_HotplugReport()

static void aout_HotplugReport ( audio_output_t aout,
const char *  id,
const char *  name 
)
inlinestatic

Report a device hot-plug event.

Parameters
iddevice ID
namehuman-readable device name (NULL for hot unplug)

References events, vlc_audio_output_events::hotplug_report, and name.

◆ aout_Interleave()

VLC_EXPORT void aout_Interleave ( void *  dst,
const void *const *  planes,
unsigned  samples,
unsigned  channels,
vlc_fourcc_t  fourcc 
)

◆ aout_MuteGet()

VLC_EXPORT int aout_MuteGet ( audio_output_t aout)

Gets the audio output stream mute flag.

Returns
0 if not muted, 1 if muted, -1 if undefined.

References var_InheritBool().

Referenced by vlc_player_aout_IsMuted().

◆ aout_MuteReport()

static void aout_MuteReport ( audio_output_t aout,
bool  mute 
)
inlinestatic

Report change of muted flag to the core and UI.

References events, and vlc_audio_output_events::mute_report.

◆ aout_MuteSet()

VLC_EXPORT int aout_MuteSet ( audio_output_t aout,
bool  mute 
)

Sets the audio output stream mute flag.

Returns
0 on success, -1 on failure.

References aout_owner(), aout_owner_t::lock, mute_set, vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by vlc_player_aout_Mute().

◆ aout_PauseDefault()

static void aout_PauseDefault ( audio_output_t aout,
bool  paused,
vlc_tick_t  date 
)
inlinestatic

Default implementation for audio_output_t.pause.

Warning
This default callback implementation is suboptimal as it will discard some audio samples. Do not use this unless there are really no possible better alternatives.

References flush.

◆ aout_PolicyReport()

static void aout_PolicyReport ( audio_output_t aout,
bool  cork 
)
inlinestatic

Report audio policy status.

Parameters
corktrue to request a cork, false to undo any pending cork.

References events, and vlc_audio_output_events::policy_report.

◆ aout_RestartRequest()

static void aout_RestartRequest ( audio_output_t aout,
unsigned  mode 
)
inlinestatic

◆ aout_TimeGet()

static int aout_TimeGet ( audio_output_t aout,
vlc_tick_t delay 
)
inlinestatic

References time_get.

Referenced by aout_DecSynchronize(), and aout_Drain().

◆ aout_TimeGetDefault()

static int aout_TimeGetDefault ( audio_output_t aout,
vlc_tick_t *restrict  delay 
)
inlinestatic

Default implementation for audio_output_t.time_get.

◆ aout_VolumeGet()

VLC_EXPORT float aout_VolumeGet ( audio_output_t aout)

Gets the volume of the audio output stream (independent of mute).

Returns
Current audio volume (0. = silent, 1. = nominal), or a strictly negative value if undefined.

References var_GetFloat().

Referenced by aout_VolumeUpdate(), vlc_player_aout_GetVolume(), and vlc_strfplayer().

◆ aout_VolumeReport()

static void aout_VolumeReport ( audio_output_t aout,
float  volume 
)
inlinestatic

Report change of configured audio volume to the core and UI.

References events, and vlc_audio_output_events::volume_report.

◆ aout_VolumeSet()

VLC_EXPORT int aout_VolumeSet ( audio_output_t aout,
float  vol 
)

Sets the volume of the audio output stream.

Note
The mute status is not changed.
Returns
0 on success, -1 on failure.

References aout_owner(), aout_owner_t::lock, vlc_mutex_lock(), vlc_mutex_unlock(), and volume_set.

Referenced by aout_VolumeUpdate(), and vlc_player_aout_SetVolume().

◆ aout_VolumeUpdate()

VLC_EXPORT int aout_VolumeUpdate ( audio_output_t aout,
int  value,
float *  volp 
)

Raises the volume.

Parameters
valuehow much to increase (> 0) or decrease (< 0) the volume
volpif non-NULL, will contain contain the resulting volume

References AOUT_VOLUME_DEFAULT, aout_VolumeGet(), aout_VolumeSet(), and var_InheritFloat().

Referenced by ControlNav(), and vlc_player_aout_IncrementVolume().

Variable Documentation

◆ pi_vlc_chan_order_wg4

const uint32_t pi_vlc_chan_order_wg4[]
static
Initial value:
=
{
0x2 , 0x4 ,
0x100 , 0x200 ,
0x20 , 0x40 , 0x10 ,
0x1 , 0x1000 , 0
}

It describes the audio channel order VLC expect.

Referenced by aout_CheckChannelExtraction(), and aout_CheckChannelReorder().

VLC_CODEC_SPDIFB
#define VLC_CODEC_SPDIFB
Definition: vlc_aout.h:79
VLC_CODEC_MLP
#define VLC_CODEC_MLP
Definition: vlc_fourcc.h:475
AOUT_CHAN_REMAP_INIT
#define AOUT_CHAN_REMAP_INIT
Definition: vlc_aout.h:309
VLC_CODEC_TRUEHD
#define VLC_CODEC_TRUEHD
Definition: vlc_fourcc.h:476
AOUT_FMTS_SIMILAR
#define AOUT_FMTS_SIMILAR(p_first, p_second)
Definition: vlc_aout.h:69
VLC_CODEC_DTS
#define VLC_CODEC_DTS
Definition: vlc_fourcc.h:466
VLC_CODEC_DTSHD
#define VLC_CODEC_DTSHD
Definition: vlc_fourcc.h:468
VLC_CODEC_SPDIFL
#define VLC_CODEC_SPDIFL
Definition: vlc_aout.h:78
VLC_CODEC_A52
#define VLC_CODEC_A52
Definition: vlc_fourcc.h:463
aout_filters_cfg_t
Definition: vlc_aout.h:504
VLC_CODEC_EAC3
#define VLC_CODEC_EAC3
Definition: vlc_fourcc.h:464