From b7e8b634595445325d10f8fcddcb7d6cdaa8a922 Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 3 Aug 2021 20:26:23 +0000 Subject: First attempt at sound --- source/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/main.c') diff --git a/source/main.c b/source/main.c index 46eccfe..b7d3318 100644 --- a/source/main.c +++ b/source/main.c @@ -235,8 +235,16 @@ int main(int argc, char *argv[]) { Z80 *z80; int quit = FALSE; + float mix[12] = {1.0, 1.0}; gfxInit(GSP_RGB565_OES, GSP_RGB565_OES, FALSE); + ndspInit(); + + ndspSetOutputMode(NDSP_OUTPUT_MONO); + ndspChnSetInterp(0, NDSP_INTERP_NONE); + ndspChnSetRate(0, SAMPLE_RATE); + ndspChnSetFormat(0, NDSP_FORMAT_MONO_PCM8); + ndspChnSetMix(0, mix); FB_Init(); @@ -352,6 +360,7 @@ int main(int argc, char *argv[]) } } + ndspExit(); gfxExit(); return 0; -- cgit v1.2.3