MusicChunk: move functions to methods

This commit is contained in:
Max Kellermann
2013-01-04 21:38:46 +01:00
parent efbfe66f21
commit e9b71a0d28
8 changed files with 90 additions and 105 deletions

View File

@@ -429,10 +429,10 @@ decoder_data(struct decoder *decoder,
return dc->command;
}
void *dest = music_chunk_write(chunk, &dc->out_audio_format,
decoder->timestamp -
dc->song->start_ms / 1000.0,
kbit_rate, &nbytes);
void *dest = chunk->Write(dc->out_audio_format,
decoder->timestamp -
dc->song->start_ms / 1000.0,
kbit_rate, &nbytes);
if (dest == NULL) {
/* the chunk is full, flush it */
decoder_flush_chunk(decoder);
@@ -451,7 +451,7 @@ decoder_data(struct decoder *decoder,
/* expand the music pipe chunk */
full = music_chunk_expand(chunk, &dc->out_audio_format, nbytes);
full = chunk->Expand(dc->out_audio_format, nbytes);
if (full) {
/* the chunk is full, flush it */
decoder_flush_chunk(decoder);