aboutsummaryrefslogtreecommitdiff
path: root/plat_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat_sdl.c')
-rw-r--r--plat_sdl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plat_sdl.c b/plat_sdl.c
index ec5b683..395227a 100644
--- a/plat_sdl.c
+++ b/plat_sdl.c
@@ -273,6 +273,9 @@ float plat_sound_capacity(void)
void plat_sound_write(const struct audio_frame *data, int frames)
{
int consumed = 0;
+ if (audio.buf_len == 0)
+ return;
+
SDL_LockAudio();
while (frames > 0) {