mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
Do not allow audio to be initialized twice.
This commit is contained in:
parent
235244e438
commit
31dc256e19
4
driver.c
4
driver.c
@ -356,6 +356,10 @@ static void deinit_dsp_plugin(void)
|
||||
|
||||
void init_audio(void)
|
||||
{
|
||||
// Resource leaks will follow if audio is initialized twice.
|
||||
if (driver.audio_data)
|
||||
return;
|
||||
|
||||
// Accomodate rewind since at some point we might have two full buffers.
|
||||
size_t max_bufsamples = AUDIO_CHUNK_SIZE_NONBLOCKING * 2;
|
||||
size_t outsamples_max = max_bufsamples * AUDIO_MAX_RATIO * g_settings.slowmotion_ratio;
|
||||
|
Loading…
Reference in New Issue
Block a user