mirror of https://github.com/mgba-emu/mgba.git
SDL: Set higher number of audio samples if the obtained audio spec is more samples than requested
This commit is contained in:
parent
e10d28918d
commit
7c8401e7f8
|
@ -93,6 +93,9 @@ int main(int argc, char** argv) {
|
|||
|
||||
renderer.audio.samples = context.audioBuffers;
|
||||
GBASDLInitAudio(&renderer.audio);
|
||||
if (renderer.audio.samples > context.audioBuffers) {
|
||||
context.audioBuffers = renderer.audio.samples * 2;
|
||||
}
|
||||
|
||||
renderer.events.bindings = &inputMap;
|
||||
GBASDLInitindings(&inputMap);
|
||||
|
|
|
@ -26,6 +26,7 @@ bool GBASDLInitAudio(struct GBASDLAudio* context) {
|
|||
GBALog(0, GBA_LOG_ERROR, "Could not open SDL sound system");
|
||||
return false;
|
||||
}
|
||||
context->samples = context->obtainedSpec.samples;
|
||||
SDL_PauseAudio(0);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue