Functions

output.c File Reference

Include dependency graph for output.c:

Functions

int aout_OutputNew (audio_output_t *p_aout, const audio_sample_format_t *p_format)
void aout_OutputDelete (audio_output_t *aout)
 Destroys the audio output plug-in instance.
void aout_OutputPlay (audio_output_t *aout, block_t *block)
 Plays a decoded audio buffer.
void aout_OutputPause (audio_output_t *aout, bool pause, mtime_t date)
 Notifies the audio output (if any) of pause/resume events.
void aout_OutputFlush (audio_output_t *aout, bool wait)
 Flushes or drains the audio output buffers.
static int aout_VolumeNoneSet (audio_output_t *aout, float volume, bool mute)
 Dummy volume setter.
void aout_VolumeNoneInit (audio_output_t *aout)
 Configures the dummy volume setter.
static int aout_VolumeSoftSet (audio_output_t *aout, float volume, bool mute)
 Volume setter for software volume.
void aout_VolumeSoftInit (audio_output_t *aout)
 Configures the volume setter for software mixing and apply the default volume.
void aout_VolumeHardInit (audio_output_t *aout, aout_volume_cb setter)
 Configures a custom volume setter.
void aout_VolumeHardSet (audio_output_t *aout, float volume, bool mute)
 Supply or update the current custom ("hardware") volume.

Function Documentation

void aout_OutputDelete ( audio_output_t aout  ) 
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.

Parameters:
wait if true, wait for buffer playback (i.e. drain), if false, discard the buffers immediately (i.e. flush)

References aout_assert_locked, and audio_output::pf_flush.

Referenced by aout_DecFlush(), aout_DecIsEmpty(), and aout_InputPlay().

int aout_OutputNew ( audio_output_t p_aout,
const audio_sample_format_t p_format 
)
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_assert_locked, and audio_output::pf_pause.

Referenced by aout_DecChangePause().

void aout_OutputPlay ( audio_output_t aout,
block_t block 
)
void aout_VolumeHardInit ( audio_output_t aout,
aout_volume_cb  setter 
)

Configures a custom volume setter.

This is used by audio outputs that can control the hardware volume directly and/or emulate it internally.

Parameters:
setter volume setter callback

References aout_assert_locked, audio_output::pf_volume_set, var_Create, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, and VLC_VAR_INTEGER.

void aout_VolumeHardSet ( audio_output_t aout,
float  volume,
bool  mute 
)

Supply or update the current custom ("hardware") volume.

Note:
This only makes sense after calling aout_VolumeHardInit().
Parameters:
setter volume setter callback
volume current custom volume
mute current mute flag
Warning:
The caller (i.e. the audio output plug-in) is responsible for interlocking and synchronizing call to this function and to the audio_output_t.pf_volume_set callback. This ensures that VLC gets correct volume information (possibly with a latency).

References AOUT_VOLUME_DEFAULT, var_SetBool, var_SetInteger, and var_TriggerCallback.

void aout_VolumeNoneInit ( audio_output_t aout  ) 

Configures the dummy volume setter.

Note:
Audio output plugins for which volume is irrelevant should call this function during activation.

References audio_output::pf_volume_set, and var_Destroy.

Referenced by aout_New(), and aout_OutputDelete().

static int aout_VolumeNoneSet ( audio_output_t aout,
float  volume,
bool  mute 
) [static]

Dummy volume setter.

This is the default volume setter.

void aout_VolumeSoftInit ( audio_output_t aout  ) 

Configures the volume setter for software mixing and apply the default volume.

Note:
Audio output plugins that cannot apply the volume should call this function during activation.

References aout_assert_locked, AOUT_VOLUME_DEFAULT, aout_VolumeSoftSet(), audio_output::pf_volume_set, var_InheritBool, and var_InheritInteger.

static int aout_VolumeSoftSet ( audio_output_t aout,
float  volume,
bool  mute 
) [static]

Volume setter for software volume.

References aout_assert_locked, aout_owner(), aout_owner_t::multiplier, and aout_owner_t::volume.

Referenced by aout_VolumeSoftInit().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines