AVAudioPlayerNode scheduleSegment:startingFrame:frameCount:atTime:completionHandler: has no effect?
AVAudioPlayerNode scheduleSegment:startingFrame:frameCount:atTime:completionHandler: has no effect?
- Subject: AVAudioPlayerNode scheduleSegment:startingFrame:frameCount:atTime:completionHandler: has no effect?
- From: "Mazzaroth M." <email@hidden>
- Date: Fri, 14 Nov 2014 22:20:28 -0500
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?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden