20 #ifndef MPD_MUSIC_CHUNK_HXX
21 #define MPD_MUSIC_CHUNK_HXX
105 return length == 0 && tag ==
nullptr;
The meta information about a song file.
A time stamp within a song.
gcc_pure bool CheckFormat(AudioFormat audio_format) const
Checks if the audio format if the chunk is equal to the specified audio_format.
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
uint8_t data[CHUNK_SIZE]
the data (probably PCM)
bool Expand(AudioFormat af, size_t length)
Increases the length of the chunk after the caller has written to the buffer returned by Write()...
SignedSongTime time
the time stamp within the song
ReplayGainInfo replay_gain_info
Replay gain information associated with this chunk.
WritableBuffer< void > Write(AudioFormat af, SongTime data_time, uint16_t bit_rate)
Prepares appending to the music 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