Fix gambatte core bindings

If gambatte returned over 35112 samples, resampled sound buffer could
overrun. Fix this.
This commit is contained in:
Ilari Liusvaara 2012-09-26 01:10:25 +03:00
parent 3fee799670
commit 039c85bb5f

View file

@ -365,7 +365,7 @@ void core_emulate_frame()
}
uint32_t samplebuffer[SAMPLES_PER_FRAME + 2064];
while(true) {
int16_t soundbuf[(SAMPLES_PER_FRAME + 63) / 32];
int16_t soundbuf[(SAMPLES_PER_FRAME + 63) / 32 + 66];
size_t emitted = 0;
unsigned samples_emitted = SAMPLES_PER_FRAME - frame_overflow;
long ret = instance->runFor(primary_framebuffer, 160, samplebuffer, samples_emitted);