diff options
author | Max Kellermann <max@duempel.org> | 2014-09-21 13:20:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-21 13:20:30 +0200 |
commit | 5d89aa06f786e549f4db6591eaa2800f471f8868 (patch) | |
tree | 78f4168600e3b68684726c45fe8a0ac509d3c4b1 | |
parent | ead034e638d6d50b5c8999a22414fda454336747 (diff) |
decoder/adplug: move the buffer into the loop
-rw-r--r-- | src/decoder/plugins/AdPlugDecoderPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/AdPlugDecoderPlugin.cxx b/src/decoder/plugins/AdPlugDecoderPlugin.cxx index 2d7ce696e..7551f92c2 100644 --- a/src/decoder/plugins/AdPlugDecoderPlugin.cxx +++ b/src/decoder/plugins/AdPlugDecoderPlugin.cxx @@ -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), |