kstenerud/ObjectAL-for-iPhone

Latency/Overhead of OALAudioTrack::playFileAsync compared to playFile and overhead of OALSimpleAudio ?

Opened this issue · 0 comments

I need to play one or two samples at a time along with background music. I'm using iPod for background music and want to use Object-AL for the samples/effects, and have a few questions:

  1. When using playFileAsync instead of playFile, what are latency differences between the two (ie. from when the call is made to when the sound is heard), and is there higher CPU/RAM usage for either method ?

  2. I have a need for low'ish latency short sound sample playback, but also need to be able to loop some samples completely a specific number of times. As OALSimpleAudio doesn't support looping a specific number of times, I have tried OALAudioTrack::playFile:loops which works perfectly.

I'm wondering whether it would be better to just use OALAudioTrack for all my playback needs (most of my samples are LPCM uncompressed and seem to play with low enough latency WITHOUT preloading - ie. streaming), or use both OALAudioTrack (for looping) and OALSimpleAudio (for other samples) ?

How much extra overhead (RAM/CPU) is incurred from using both, compared to just using OALAudioTrack for everything ?

Thanks for this great library and open-sourcing it!