From 1beb671de1d39964ad3453e28fd48a117046a8cb Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Tue, 8 Jan 2013 15:04:53 -0500 Subject: Configurable interrupt interval for the sound timer. Right now, only 22050 Hz audio at 2000-microsecond intervals works. --- source/nds/entry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/nds/entry.cpp') diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index f14c917..a666a0b 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -538,7 +538,7 @@ int sfc_main (int argc, char **argv) Settings.SoundBufferSize); // Start a timer for the sound initTimer(0 /* timer channel, 0 or 1 */, - 2000 /* period in microseconds */, + INTERRUPT_TIME /* period in microseconds */, NDSSFCProduceSound /* timer function, void (unsigned int) */, 0 /* programmer-specified argument to ^ */); runTimer(0 /* timer channel, 0 or 1 */); @@ -1157,6 +1157,8 @@ void NDSSFCProduceSound (unsigned int unused) /* All data sent. */ } + IsSoundGenerated = FALSE; + so.samples_mixed_so_far -= sample_count; } -- cgit v1.2.3