[Csnd] Killing an instrument using the Android API
Date | 2014-05-08 16:50 |
From | hcenteno |
Subject | [Csnd] Killing an instrument using the Android API |
Hello, In an Android app I'm trying to programatically kill an instrument in a running performance. After browsing the API docs (It was great to discover the new github API docs, thank you!) and checking the JNI generated Java classes, I came up with this: csnd.csoundKillInstance(mCsound.GetCsound(), 2, "", 1, 0); Where mCsound is the instance of Csound that contains the running performance. I'm trying to kill the nameless instrument number 2. Instead of the expected behaviour, what I'm getting is Csound freezing (constantly looping of the last audio sample) without any messages in logcat. My main question is: is this the proper way of killing an instrument programatically? The alternative I guess is to trigger a second instrument that kills the intended instrument using a turnoff2 opcode. Best, Hector -- View this message in context: http://csound.1045644.n5.nabble.com/Killing-an-instrument-using-the-Android-API-tp5735046.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2014-05-08 17:08 |
From | hcenteno |
Subject | [Csnd] Re: Killing an instrument using the Android API |
Ah! My bad. It works now. I had to use null instead of "" for instrument name: csnd.csoundKillInstance(mCsound.GetCsound(), 2, null, 1, 0); Sorry for the noise. At least I hope this helps someone in the future. Best, Hector -- View this message in context: http://csound.1045644.n5.nabble.com/Killing-an-instrument-using-the-Android-API-tp5735046p5735047.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2014-05-08 17:17 |
From | Andres Cabrera |
Subject | Re: [Csnd] Re: Killing an instrument using the Android API |
But maybe it shouldn't hang, but print a warning. Can you file a bug in the tracker? Cheers, Andrés On Thu, May 8, 2014 at 9:08 AM, hcenteno <hcengar@gmail.com> wrote: Ah! My bad. It works now. I had to use null instead of "" for instrument |