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.
This commit is contained in:
parent
f0faf00320
commit
6566038df9
|
@ -56,11 +56,11 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
|
||||||
|
|
||||||
/* play */
|
/* play */
|
||||||
do {
|
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);
|
g_warning("%s", gme_err);
|
||||||
return;
|
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) {
|
if(cmd == DECODE_COMMAND_SEEK) {
|
||||||
float where = decoder_seek_where(decoder);
|
float where = decoder_seek_where(decoder);
|
||||||
|
|
Loading…
Reference in New Issue