Fix gambatte core bindings
If gambatte returned over 35112 samples, resampled sound buffer could overrun. Fix this.
This commit is contained in:
parent
3fee799670
commit
039c85bb5f
1 changed files with 1 additions and 1 deletions
|
@ -365,7 +365,7 @@ void core_emulate_frame()
|
||||||
}
|
}
|
||||||
uint32_t samplebuffer[SAMPLES_PER_FRAME + 2064];
|
uint32_t samplebuffer[SAMPLES_PER_FRAME + 2064];
|
||||||
while(true) {
|
while(true) {
|
||||||
int16_t soundbuf[(SAMPLES_PER_FRAME + 63) / 32];
|
int16_t soundbuf[(SAMPLES_PER_FRAME + 63) / 32 + 66];
|
||||||
size_t emitted = 0;
|
size_t emitted = 0;
|
||||||
unsigned samples_emitted = SAMPLES_PER_FRAME - frame_overflow;
|
unsigned samples_emitted = SAMPLES_PER_FRAME - frame_overflow;
|
||||||
long ret = instance->runFor(primary_framebuffer, 160, samplebuffer, samples_emitted);
|
long ret = instance->runFor(primary_framebuffer, 160, samplebuffer, samples_emitted);
|
||||||
|
|
Loading…
Add table
Reference in a new issue