From 635117a0a97816444d3300820ed3e458e94565be Mon Sep 17 00:00:00 2001 From: James Sanford Date: Fri, 10 Aug 2012 17:38:29 -0700 Subject: [PATCH] Try adding OG mods to sound.c --- jni/sound.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jni/sound.c b/jni/sound.c index 1b60ffc..83cce2b 100644 --- a/jni/sound.c +++ b/jni/sound.c @@ -1543,7 +1543,12 @@ doc_write_ctl_reg(int osc, int val, double dsamps) if(old_halt != 0) { /* start sound */ DOC_LOG("ctl_sound_play", osc, eff_dsamps, val); +#ifdef __ANDROID__ + // OG If the sound_play is executed, it may restart a oscillo we thought was stopped at time, + // hence crashing the start_sound function +#else sound_play(eff_dsamps); +#endif g_doc_regs[osc].ctl = val; start_sound(osc, eff_dsamps, dsamps); @@ -1894,6 +1899,12 @@ doc_write_c03d(int val, double dcycs) g_doc_num_osc_en = tmp; UPDATE_G_DCYCS_PER_DOC_UPDATE(tmp); +#ifdef __ANDROID__ + // OG Update any oscs that were running to take care of the new numbers of oscillo + for(i = 0; i