• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AVAudioPlayerNode scheduleSegment:startingFrame:frameCount:atTime:completionHandler: has no effect?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?

.m file here: http://pastebin.com/hgFaNDJ6


 _______________________________________________
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

  • Prev by Date: AUFilePlayer notify when reached specific time in file
  • Next by Date: Re: Coreaudio-api Digest, Vol 11, Issue 210
  • Previous by thread: AUFilePlayer notify when reached specific time in file
  • Next by thread: Re: Coreaudio-api Digest, Vol 11, Issue 210
  • Index(es):
    • Date
    • Thread