I'm trying to play from the beginning of a file and schedule playback for a
duration of seconds_ :
AVAudioFrameCount count = (_file.fileFormat.sampleRate *
seconds_);
[_player scheduleSegment:_file startingFrame:0 frameCount:count
atTime:[[AVAudioTime alloc] initWithSampleTime:(AVAudioFramePosition)0
atRate:_file.fileFormat.sampleRate] completionHandler:^{
NSLog(@"done");
}];
[_player play];
The result is that playback continues and does not stop past the expected
time(tried 1 second).
for the atTime: parameter I've also passed-in nil but no change.
Any idea what I'm doing wrong?
.m file here: http://pastebin.com/hgFaNDJ6
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com
This email sent to [email protected]