mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
[GX] fix audio stuttering on exit/low fps
This commit is contained in:
parent
9f592f1905
commit
160b609862
@ -44,6 +44,9 @@ static gx_audio_t *g_audio;
|
||||
|
||||
static void dma_callback(void)
|
||||
{
|
||||
// erase last chunk to avoid repeating audio
|
||||
memset(g_audio->data[g_audio->dma_busy], 0, CHUNK_SIZE);
|
||||
|
||||
g_audio->dma_busy = g_audio->dma_next;
|
||||
g_audio->dma_next = (g_audio->dma_next + 1) & (BLOCKS - 1);
|
||||
|
||||
@ -140,6 +143,8 @@ static bool gx_audio_stop(void *data)
|
||||
{
|
||||
(void)data;
|
||||
AUDIO_StopDMA();
|
||||
memset(g_audio->data, 0, sizeof(g_audio->data));
|
||||
DCFlushRange(g_audio->data, sizeof(g_audio->data));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user