VLC 4.0.0-dev
Collaboration diagram for Audio output modules:

Data Structures

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

Macros

#define AOUT_RESTART_FILTERS   0x1
 
#define AOUT_RESTART_OUTPUT   (AOUT_RESTART_FILTERS|0x2)
 
#define AOUT_RESTART_STEREOMODE   (AOUT_RESTART_OUTPUT|0x4)
 

Functions

static void aout_TimingReport (audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_ts)
 Report a new timing point. More...
 
static void aout_DrainedReport (audio_output_t *aout)
 Report than the stream is drained (after a call to aout->drain_async) 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 void aout_PauseDefault (audio_output_t *aout, bool paused, vlc_tick_t date)
 Default implementation for audio_output_t.pause. More...
 

Detailed Description

Macro Definition Documentation

◆ 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)

Function Documentation

◆ 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 audio_output::events.

◆ aout_DrainedReport()

static void aout_DrainedReport ( audio_output_t aout)
inlinestatic

Report than the stream is drained (after a call to aout->drain_async)

References vlc_audio_output_events::drained_report, and audio_output::events.

◆ 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 audio_output::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 audio_output::events, vlc_audio_output_events::hotplug_report, and name.

◆ aout_MuteReport()

static void aout_MuteReport ( audio_output_t aout,
bool  mute 
)
inlinestatic

Report change of muted flag to the core and UI.

References audio_output::events, and vlc_audio_output_events::mute_report.

◆ 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 audio_output::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 audio_output::events, and vlc_audio_output_events::policy_report.

◆ aout_RestartRequest()

static void aout_RestartRequest ( audio_output_t aout,
unsigned  mode 
)
inlinestatic

◆ aout_TimingReport()

static void aout_TimingReport ( audio_output_t aout,
vlc_tick_t  system_ts,
vlc_tick_t  audio_ts 
)
inlinestatic

Report a new timing point.

system_ts doesn't have to be close to vlc_tick_now(). Any valid { system_ts, audio_ts } points in the past are sufficient to update the clock.

Note
audio_ts starts at 0 and should not take the block PTS into account.

It is important to report the first point as soon as possible (and the following points if the audio delay take some time to be stabilized). Once the audio is stabilized, it is recommended to report timing points every few seconds.

References audio_output::events, and vlc_audio_output_events::timing_report.

◆ 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 audio_output::events, and vlc_audio_output_events::volume_report.