I am new to ObjectAL. I use it to play mp3 with changed pitch.
I cannot figure out how to "properly" play a loaded buffer in ObjectAL. When I call [source play:buffer] the sound only comes a fraction of a second. To constantly "play" a buffer I can embed it in infinite loop and then the buffer is played correctly. I assume I miss some fundamental point, can you point me in the right direction?
My code:
[OALSimpleAudio sharedInstance].reservedSources = 0;
ALSource *source = [ALSource source];
ALBuffer *buffer = [[OpenALManager sharedInstance] bufferFromFile:@"video.mp3" reduceToMono:YES];
source.pitch = 1;
for (;;) { // infinite loop because otherwise only a millisecond of buffer is played
[source play:buffer];
}
--
You received this message because you are subscribed to the Google Groups "ObjectAL-for-iPhone" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectal-for-ip...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.