aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/AdPlugDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-09-21 13:20:30 +0200
committerMax Kellermann <max@duempel.org>2014-09-21 13:20:30 +0200
commit5d89aa06f786e549f4db6591eaa2800f471f8868 (patch)
tree78f4168600e3b68684726c45fe8a0ac509d3c4b1 /src/decoder/plugins/AdPlugDecoderPlugin.cxx
parentead034e638d6d50b5c8999a22414fda454336747 (diff)
downloadmpd-5d89aa06f786e549f4db6591eaa2800f471f8868.tar.gz
mpd-5d89aa06f786e549f4db6591eaa2800f471f8868.tar.xz
mpd-5d89aa06f786e549f4db6591eaa2800f471f8868.zip
decoder/adplug: move the buffer into the loop
Diffstat (limited to '')
-rw-r--r--src/decoder/plugins/AdPlugDecoderPlugin.cxx4
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),