MPD  0.20.6
Public Member Functions
AudioOutputSource Class Reference

Source of audio data to be played by an AudioOutput. More...

#include <Source.hxx>

Public Member Functions

void SetReplayGainMode (ReplayGainMode _mode)
 
bool IsOpen () const
 
const AudioFormatGetInputAudioFormat () const
 
AudioFormat Open (AudioFormat audio_format, const MusicPipe &_pipe, PreparedFilter *prepared_replay_gain_filter, PreparedFilter *prepared_other_replay_gain_filter, PreparedFilter *prepared_filter)
 
void Close ()
 
void Cancel ()
 
bool Fill (Mutex &mutex)
 Ensure that ReadTag() or PeekData() return any input. More...
 
const TagReadTag () noexcept
 Reads the Tag to be processed. More...
 
ConstBuffer< void > PeekData () const noexcept
 Returns the remaining filtered PCM data be played. More...
 
void ConsumeData (size_t nbytes) noexcept
 Mark portions of the PeekData() return value as "consumed". More...
 
bool IsChunkConsumed (const MusicChunk &chunk) const
 
void ClearTailChunk (const MusicChunk &chunk)
 

Detailed Description

Source of audio data to be played by an AudioOutput.

It receives MusicChunk instances from a MusicPipe (via SharedPipeConsumer). It applies configured filters, ReplayGain and returns plain PCM data.

Definition at line 49 of file Source.hxx.

Member Function Documentation

void AudioOutputSource::Cancel ( )
void AudioOutputSource::ClearTailChunk ( const MusicChunk chunk)
inline

Definition at line 190 of file Source.hxx.

void AudioOutputSource::Close ( )
void AudioOutputSource::ConsumeData ( size_t  nbytes)
noexcept

Mark portions of the PeekData() return value as "consumed".

bool AudioOutputSource::Fill ( Mutex mutex)

Ensure that ReadTag() or PeekData() return any input.

Throws std::runtime_error on error

Parameters
mutexthe Mutex which protects the SharedPipeConsumer; it is locked by the caller, and may be unlocked temporarily by this method
Returns
true if any input is available, false if the source has (temporarily?) run empty
const AudioFormat& AudioOutputSource::GetInputAudioFormat ( ) const
inline

Definition at line 130 of file Source.hxx.

bool AudioOutputSource::IsChunkConsumed ( const MusicChunk chunk) const
inline

Definition at line 184 of file Source.hxx.

bool AudioOutputSource::IsOpen ( ) const
inline

Definition at line 126 of file Source.hxx.

AudioFormat AudioOutputSource::Open ( AudioFormat  audio_format,
const MusicPipe _pipe,
PreparedFilter prepared_replay_gain_filter,
PreparedFilter prepared_other_replay_gain_filter,
PreparedFilter prepared_filter 
)
ConstBuffer<void> AudioOutputSource::PeekData ( ) const
inlinenoexcept

Returns the remaining filtered PCM data be played.

The caller shall use ConsumeData() to mark portions of the return value as "consumed".

Be sure to call Fill() successfully before calling this metohd.

Definition at line 175 of file Source.hxx.

const Tag* AudioOutputSource::ReadTag ( )
inlinenoexcept

Reads the Tag to be processed.

Be sure to call Fill() successfully before calling this metohd.

Definition at line 161 of file Source.hxx.

void AudioOutputSource::SetReplayGainMode ( ReplayGainMode  _mode)
inline

Definition at line 122 of file Source.hxx.


The documentation for this class was generated from the following file: