first let me say: thank you for writing a fantastic open source library; ObjectAL is wonderful.
I am running into an issue where sounds I set to loop regularly "click" intermittently, ie. when the loop restarts. (This is on iOS).
Now, I know the standard culprits, I've done my extensive tour of googling and stack-overflow'ing, and I have ruled out the following potential sources below:
- my sound files are correctly looping when played on any other digital audio program (e.g. QuickTime, Audacity, etc.). They should sound fine, but don't.
- I tried setting initial gain to zero, then fade in the gain, to no avail: It keeps clicking.
- I tried not using the loop, but just restarting "source play" whenever the source was found to be stopped. No help.
- I tried stopping the source before hitting play. No help.
- I tried replacing all "malloc" calls in your code with "callocs" to ensure the buffer memory was properly zeroed. No help either.
I'm really stumped as to what could be the cause.
I hope I'm overlooking something fantastically simple, but I fear I might not...
Using XCode 5.02, iOS 7, MacOS 10.8.6, Kobold2D + Cocos2D 2.1, ObjectAL 2.1 (I believe - the last version that came bundled with Kobold 2.1).
The way I'm playing the sounds is by handling them through sources created by ALChannels that were handed my loaded buffers.
I preload my buffers through OALSimpleAudio (I created a subclass of it to manage my sound channels through that subclass).
Any ideas?