TheAmazingAudioEngine / TheAmazingAudioEngine2

The Amazing Audio Engine is a sophisticated framework for iOS audio applications, built so you don't have to.
http://theamazingaudioengine.com/doc2
Other
544 stars 87 forks source link

Add DEBUG check that |AEManagedValue setValue| is called on main thread #51

Closed jackpal closed 7 years ago

jackpal commented 7 years ago

I know |AEManagedValue setValue| is documented as having to be called on the main thread, but I mistakenly called it on a GCD background thread.

...it turns out that if you do that, AEManagedValue pollTimer doesn't work, and so old values never get released.

It would be nice for users if |AEManagedValue setValue| checked that it was on the main thread. You could limit the check to when poolTimer is created, to minimize runtime overhead.