Hi,
I'm new to BASS, but not new to developing audio software. I've been asked to debug a CocoaTouch app which uses BASS. There's an issue with concurrent execution in the app which exhibits similar to this:
http://www.un4seen.com/forum/?topic=12872.msg89534#msg89534in that multiple threads deadlock within BASS calls. One of of those threads is the UI thread. This makes the app unusable. MIDI playback also halts. Other threads are still active at this time. There's also a memory smasher, so the debugger goes out the window. I've searched the forum, and have seen that some calls/mutations should not be made from the callbacks. Having worked with audio and complex threading problems before, I'm also wondering how multithreading is *supposed* to be handled with BASS at a fundamental level - what is and what is not threadsafe?
- What constraints I should adhere to in concurrent contexts?
- What constraints I should adhere to while in callbacks?
The app is currently using BASS from multiple threads, and is locking in the callbacks. Are the callbacks being made from the realtime thread?
Perhaps I've missed an introductory article which goes over this. The samples I've seen so far are comparably primitive in these regards - they do a good job demonstrating specific features, but there's really not a nontrivial threading example from what I have seen…
Thanks for your help!