[Csnd] Android Csound lib question
Date | 2012-06-05 01:58 |
From | Roger Kelly |
Subject | [Csnd] Android Csound lib question |
I am building an app with two Csound instances enabled at one time. On Android 4.0 it works fine, however on 2.3.4 I get this error back from OpenSL after the second startCsound 06-04 19:53:36.734: E/libOpenSLES(12114): slCreateEngine while another engine 0x206560 is active
Any ideas about how many instances of a Csound object can be open? Obviously 4.0 is fine, but anyone know what gives on 2.3.4? |
Date | 2012-06-05 20:24 |
From | Steven Yi |
Subject | Re: [Csnd] Android Csound lib question |
Hi Roger, I don't think we've tried this scenario during development. It might just be a limitation with OpenSL on 2.3.4? I can see some options here for the short-term: 1. Depending on your signal flow paths, you could possibly feed one csound's output into the other's input, with the first one having no audio output set. 2. You could try using AudioTrack instead of OpenSL for both instances ("csoundObj.useAudioTrack = true", or "new CsoundObj(true)"). 3. Have both Csound instances not output directly, and handle writing to a single AudioTrack from the Java-side. I'd try #2 to start and see if that will do it. It's still not an optimal solution in that you'll have to AudioTrack's open, but may be a workaround for now. Otherwise, someone will have to dig around into OpenSL to see about opening multiple engines. Thanks! steven On Mon, Jun 4, 2012 at 8:58 PM, Roger Kelly |