aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 09:57:15 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 09:57:15 +0200
commit6566038df99530bfb0785cc3d30afe611e40bc96 (patch)
tree5167f558a020329c95f6e69fd99a0360012f5e4b /src/decoder
parentf0faf00320e66b30fa00b2e935698c3612abf76b (diff)
downloadmpd-6566038df99530bfb0785cc3d30afe611e40bc96.tar.gz
mpd-6566038df99530bfb0785cc3d30afe611e40bc96.tar.xz
mpd-6566038df99530bfb0785cc3d30afe611e40bc96.zip
decoder/gme: pass the whole buffer to decoder_data()
Pass sizeof(buf) to decoder_data(), not the number of samples (which is half the size). At the same time, pass GME_BUF_SIZE to gme_play() - libgme really wants to get the number of samples, not the number of stereo frames. Previously, this plugin had been using only the first half of the buffer.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/gme_decoder_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/gme_decoder_plugin.c b/src/decoder/gme_decoder_plugin.c
index cdabd36a6..336fcb87f 100644
--- a/src/decoder/gme_decoder_plugin.c
+++ b/src/decoder/gme_decoder_plugin.c
@@ -56,11 +56,11 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
/* play */
do {
- if((gme_err = gme_play(emu, GME_BUF_SIZE>>1, buf)) != NULL){
+ if((gme_err = gme_play(emu, GME_BUF_SIZE, buf)) != NULL){
g_warning("%s", gme_err);
return;
}
- cmd = decoder_data(decoder, NULL, buf, GME_BUF_SIZE, 0);
+ cmd = decoder_data(decoder, NULL, buf, sizeof(buf), 0);
if(cmd == DECODE_COMMAND_SEEK) {
float where = decoder_seek_where(decoder);