[GME Input] Fix decoder output sample count
The output has been assigning twice as many samples as it was supposed
to ever since commit 8d851e5bda
, which
ended up generating the correct 1024 samples (2048 per GME parameter),
but assigned 2048 to the AudioChunk, which resulted in over-reading the
audio buffer, and thankfully not crashing, but instead causing an awful
sound distortion effect as random memory contents were played as PCM
audio.
Fixes #320
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
parent
4480eeefbe
commit
5ac279e289
|
@ -198,7 +198,7 @@ gme_err_t readCallback(void *data, void *out, int count) {
|
||||||
//(From gme.txt) If track length, then use it. If loop length, play for intro + loop * 2. Otherwise, default to 2.5 minutes
|
//(From gme.txt) If track length, then use it. If loop length, play for intro + loop * 2. Otherwise, default to 2.5 minutes
|
||||||
// GME will always generate samples. There's no real EOS.
|
// GME will always generate samples. There's no real EOS.
|
||||||
|
|
||||||
[chunk assignSamples:sampleBuffer frameCount:numSamples];
|
[chunk assignSamples:sampleBuffer frameCount:frames];
|
||||||
|
|
||||||
return chunk;
|
return chunk;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue