[Cs-dev] Android message logging hints, anyone?
Date | 2013-05-31 03:40 |
From | Michael Gogins |
Subject | [Cs-dev] Android message logging hints, anyone? |
Attachments | None None |
I've uploaded Csound 6 for Android to SourceForge at http://sourceforge.net/projects/csound/files/csound6/csound6.0rc2/CsoundApp.apk/download.
Be warned, there is an issue with message logging. The logging of Csound messages to the user interface of the CSDPlayer app is still not reliable. The behavior is precisely as follows:
Sometimes, on the first run, the logging occurs perfectly. If so, it does not happen on the next performance.
This cycle can be repeated by killing the app. If the logging doesn't happen, sometimes it can be made to happen by repeatedly clicking on the start button. Setting a breakpoint in the CsoundCallbackWrapper's message callback shows that in cases when logging does not occur, it is because the callback is, in fact, not being called. This implies that the problem is in the interaction between the CsoundObj and the CsoundCallbackWrapper. Probably, the wrapper is being initialized at the wrong time and in effect clearing the actual, low-level callback.
Any ideas? I'm about to throw the CsoundCallbackWrapper out (metaphorically, not actually) and use the message buffer in a timer thread instead. In spite of this, I have placed the .apk on SourceForge. I'd be interested in your experiences.
Also, still no Lua, the message logging thing is killing me here. By the way, I tried a menu and reverted to the buttons, which are (at least for me) much easier to use.
Regards, Mike Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2013-05-31 12:29 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android message logging hints, anyone? |
Attachments | None None |
OK, this message logging problem is solved, and a new .apk is up on SourceForge. The solution is to push the instance of CsoundCallbackWrapper that is used to log Csound's runtime messages to the app GUI down into CsoundObj by creating a CsoundObj.MessagePoster interface that CsoundObj declares but CsoundAppActivity actually defines. Works every time. I think this problem was caused by the timing of setting/unsetting the actual low level callback being indeterminate between CsoundObj and CsoundAppActivity, which are running in different threads.
Next up is adding LuaCsound (which uses and includes LuaJIT) and some of the other loadable opcodes. Regards, Mike On Thu, May 30, 2013 at 10:40 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2013-05-31 12:44 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Android message logging hints, anyone? |
Attachments | None None |
Well I see two things: 1) AndroidCsound::SetOpenSLCallbacks() sets the message callback (in the C++ code) 2) The callback is set again in CsoubdObj.java (runOpenSL()) So maybe that is the root of the problem. Victor On 31 May 2013, at 03:40, Michael Gogins wrote:
Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-05-31 12:47 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Android message logging hints, anyone? |
Attachments | None None |
Yes, but it looks like my solution solves that problem too. Thanks, Mike On Fri, May 31, 2013 at 7:44 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |