Comments (3)
I just did a test changing lines 160 and 207 of AudioEngine.m
of the example App to use the App versions of capture...
and commit...
and could not see any issue.
Is it possible you are committing a timeline from another thread that overwrites your intended change?
If you commit a change on the app thread it will not immediately propagate to the audio thread. So changing the timeline from multiple threads can lead to race conditions.
What is self.quantum
set to? Maybe having it set to 0
will not give you the desired result. But if that is the same for both versions that is probably not the cause of the problem.
Let me know if that helps. If not, do you have more information that might help me to reproduce the problem?
from linkkit.
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.
from linkkit.
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.
from linkkit.
Related Issues (20)
- Crash when attempting to enable or disable Link, possible race condition? HOT 7
- Ver 3.0.2 presenting viewcontroller audio dropouts HOT 4
- Crashes when calling ABLLinkDelete because layoutMargins observer is not removed in ABLSettingsViewController.mm. HOT 4
- Are the hostTimeAtOutput argument of the ABLLinkSetTempo method has any restrictions? HOT 2
- Polyrhythm HOT 5
- LinkKit for Catalyst/UIKitForMac HOT 18
- Localization Support HOT 7
- Support for Scenes on iPad OS HOT 3
- [3.1.0] Tempo callback not called if new tempo matches old tempo HOT 2
- iOS 14 Unexpected Behavior HOT 26
- Compiling against iOS 12 SDK βΒ does not find devices on local network HOT 6
- Cocoapod or SPM support
- ARM Mac - Cannot link when building with LinkKit to target (ARM based...) iOS Emulator HOT 23
- Apple Privacy HOT 1
- WatchOS build HOT 11
- are Callbacks from Link guaranteed to execute in specific order? HOT 6
- Minor header documentation error, causing build warnings HOT 2
- Crashes in ABLLinkNew() on older iPad HOT 4
- Latest release not compatible with Xcode 14 HOT 5
- Update to Xcode 14 new error: libABLLink.a building for iOS, but linking in object file built for iOS Simulator ..."architecture arm64" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linkkit.