Commit 5d89aa06 authored by Max Kellermann's avatar Max Kellermann

decoder/adplug: move the buffer into the loop

parent ead034e6
......@@ -64,14 +64,14 @@ adplug_file_decode(Decoder &decoder, Path path_fs)
decoder_initialized(decoder, audio_format, false,
SongTime::FromMS(player->songlength()));
int16_t buffer[2048];
const unsigned frames_per_buffer = ARRAY_SIZE(buffer) / 2;
DecoderCommand cmd;
do {
if (!player->update())
break;
int16_t buffer[2048];
constexpr unsigned frames_per_buffer = ARRAY_SIZE(buffer) / 2;
opl.update(buffer, frames_per_buffer);
cmd = decoder_data(decoder, nullptr,
buffer, sizeof(buffer),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment