decoder/adplug: move the buffer into the loop
This commit is contained in:
parent
ead034e638
commit
5d89aa06f7
@ -64,14 +64,14 @@ adplug_file_decode(Decoder &decoder, Path path_fs)
|
|||||||
decoder_initialized(decoder, audio_format, false,
|
decoder_initialized(decoder, audio_format, false,
|
||||||
SongTime::FromMS(player->songlength()));
|
SongTime::FromMS(player->songlength()));
|
||||||
|
|
||||||
int16_t buffer[2048];
|
|
||||||
const unsigned frames_per_buffer = ARRAY_SIZE(buffer) / 2;
|
|
||||||
DecoderCommand cmd;
|
DecoderCommand cmd;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!player->update())
|
if (!player->update())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
int16_t buffer[2048];
|
||||||
|
constexpr unsigned frames_per_buffer = ARRAY_SIZE(buffer) / 2;
|
||||||
opl.update(buffer, frames_per_buffer);
|
opl.update(buffer, frames_per_buffer);
|
||||||
cmd = decoder_data(decoder, nullptr,
|
cmd = decoder_data(decoder, nullptr,
|
||||||
buffer, sizeof(buffer),
|
buffer, sizeof(buffer),
|
||||||
|
Loading…
Reference in New Issue
Block a user