summaryrefslogtreecommitdiff
path: root/sound.c
diff options
context:
space:
mode:
authorneonloop2021-03-21 16:41:44 +0000
committerneonloop2021-03-21 16:41:44 +0000
commit4c26780f101a12d455ffe900e6a0d5238d1c9552 (patch)
tree8913a7229c15e1ed597b5a128a08aa554150f674 /sound.c
parent5ef784ab8af08b9629b573b3cfd25f21384771af (diff)
downloadpicogpsp-4c26780f101a12d455ffe900e6a0d5238d1c9552.tar.gz
picogpsp-4c26780f101a12d455ffe900e6a0d5238d1c9552.tar.bz2
picogpsp-4c26780f101a12d455ffe900e6a0d5238d1c9552.zip
Adds a libpicofe frontend and menus
Implements: - fast-forward (toggle) - audio-buffer-based frameskip and frame limiting - color-correction (using the libretro code) - lcd ghosting (using the libretro code) - FPS display - input rebinding - emulator key rebinding - scaling (with the old gpsp filters and drowsnug's scaled-nofilter) - saving and savestates - game-specific configuration Not yet implemented: - cheats - fast-forward (hold)
Diffstat (limited to 'sound.c')
-rw-r--r--sound.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound.c b/sound.c
index 10a3261..70a04d5 100644
--- a/sound.c
+++ b/sound.c
@@ -19,7 +19,12 @@
#include "common.h"
+#ifndef __LIBRETRO__
+#include "frontend/plat.h"
+#endif
+
u32 global_enable_audio = 1;
+u32 global_process_audio = 1;
direct_sound_struct direct_sound_channel[2];
gbc_sound_struct gbc_sound_channel[4];
@@ -658,7 +663,12 @@ void render_audio(void)
stream_base[i] = current_sample << 4;
source[i] = 0;
}
+#ifdef __LIBRETRO__
audio_batch_cb(stream_base, 256);
+#else
+ if (global_process_audio)
+ plat_sound_write(stream_base, 1024);
+#endif
sound_buffer_base += 512;
sound_buffer_base &= BUFFER_SIZE_MASK;
}