I am playing an audio file named 'myTrack.mp3' with SimpleAudioEngine as:
[[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"myTrack.mp3" loop:NO];
The audio if of the length of 00:17 seconds, and my plays the whole file. But now I need to play only the portion between time 00:08 and 00:14. Is it is possible in Cocos2d?
Thanks.
I am not familiar with SimpleAudioEngine but with the standard AVQueuePlayer you can do:
1) seekToTime. e.g. (
[_player seekToTime:CMTimeMakeWithSeconds(8.0, 1.0)])2) then add time observer to the player: