I have a requirement for perfect gapless loop audio in a BlackBerry 10 application. My loops are stored as WAV files. The method I use to play them:
- Create a buffer for the WAV file using
alutCreateBufferFromFile , which returns bufferID - Create a sound source using
alGenSources - Attach the buffer to the source using
alSourcei(source, AL_BUFFER, bufferID) - Set loop loop property to true using
alSourcei(source, AL_LOOPING, AL_TRUE) - Play the source using
alSourcePlay(source)
Sound is reproduced in most cases, but during interface transitions (for example, when the backlight turns off or when the application is minimized) the sound stutters.
Any ideas how I can ensure that the sound is smooth all the time?
donturner
source share