-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ABLLinkRequestBeatAtTime seemingly not working with ABLLinkCommitAppTimeline #39
Comments
I just did a test changing lines 160 and 207 of Is it possible you are committing a timeline from another thread that overwrites your intended change? What is Let me know if that helps. If not, do you have more information that might help me to reproduce the problem? |
I found that I was not committing to the timeline from a different thread, but I was using ABLLinkCaptureAudioTimeline in a method that was sometimes called on the main thread and sometimes in my own thread. My app is related to timing rather than producing audio. At first I used the audio thread, but eventually I I created a THREAD_TIME_CONSTRAINT_POLICY (real-time constraint) thread that's scheduled every 50ms to be independent of the audio thread buffer size. I'm therefore sometimes calling link-related methods from the main thread and sometimes from my independent thread. On the basis that the audio thread is realtime and so my independent thread, I guessed at generally using ABLLinkCaptureAudioTimeline in my thread and ABLLinkCaptureAppTimeline from the main thread. However because of the way I'd structured the app, some methods were written as plain C but could be called from either my thread or the main thread. In those cases I'd gone with ABLLinkCaptureAudioTimeline on the basis they're perhaps better behaved with regards to locks. I'd love a clearer understanding of the difference between ABLLinkCaptureAudioTimeline and ABLLinkCaptureAppTimeline particularly when it comes to their use in a thread other than main or audio. With a better understanding, I can rearchitect my app :) Thanks for the speedy response. |
I have tracked down my problem and my mistake and it indeed was that I was sometimes using the wrong capture/commit from the wrong thread. |
Add discussion to SetTempo comment
I'm converting my app from pre-2.x to use 2.1.1
My original working code was:
However when I convert to the new format, I'm seeing something strange. From the main thread, the following code does not change the beat time:
but if I use:
it does work.
Of course, I'm not supposed to use the ABLLinkCaptureAudioTimeline in the main thread and I am certain I'm in the main thread.
Anyone seen anything similar?
The text was updated successfully, but these errors were encountered: