20 #ifndef MPD_MUSIC_CHUNK_HXX 21 #define MPD_MUSIC_CHUNK_HXX
The meta information about a song file.
A time stamp within a song.
gcc_pure bool CheckFormat(AudioFormat audio_format) const noexcept
Checks if the audio format if the chunk is equal to the specified audio_format.
bool Expand(AudioFormat af, size_t length) noexcept
Increases the length of the chunk after the caller has written to the buffer returned by Write()...
Tag * tag
An optional tag associated with this chunk (and the following chunks); appears at song boundaries...
float mix_ratio
The current mix ratio for cross-fading: 1.0 means play 100% of this chunk, 0.0 means play 100% of the...
uint16_t length
number of bytes stored in this chunk
MusicChunk * other
An optional chunk which should be mixed into this chunk.
unsigned replay_gain_serial
A serial number for checking if replay gain info has changed since the last chunk.
static constexpr size_t CHUNK_SIZE
static constexpr unsigned IGNORE_REPLAY_GAIN
A magic value for replay_gain_serial which omits updating the #ReplayGainFilter.
uint8_t data[CHUNK_SIZE]
the data (probably PCM)
SignedSongTime time
the time stamp within the song
ReplayGainInfo replay_gain_info
Replay gain information associated with this chunk.
A variant of SongTime that is based on a signed integer.
MusicChunk * next
the next chunk in a linked list
MusicChunk & operator=(const MusicChunk &)=delete
uint16_t bit_rate
current bit rate of the source file
WritableBuffer< void > Write(AudioFormat af, SongTime data_time, uint16_t bit_rate) noexcept
Prepares appending to the music chunk.