tags:

views:

20

answers:

1

Hello!

Does anyone knows how to play a portion of a sound file on the iPhone? Using the SDK, or any other library (Cocos Desnhion...).

I know how to play an entire sound, but not an exact portion of it (eg. from 2,5ms to 6ms).

Thanks!

Vincent

+1  A: 

AVAudioPlayer has a currentTime property. Set it to start playing the file at a specific time mark and then watch its progress to stop playing when it reaches a desired mark.

TechZen
Thanks! I didn't see that property was actually readwrite...
Vincent