• 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
Re: Stutter when playing audio clips using AV
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stutter when playing audio clips using AV


  • Subject: Re: Stutter when playing audio clips using AV
  • From: William Stewart <email@hidden>
  • Date: Tue, 6 Jul 2010 14:38:41 -0700

Can't tell from your description, but the behaviour is certainly not expected. If you can write a bug report and attach some code, we can have a look

Bill

On Jul 6, 2010, at 1:01 PM, Will Archer wrote:

> Hi guys, I'm running into a strange glitch in AVAudioPlayer and I'm wondering what I'm doing wrong.  I'm running an app which uses offline rendering to play background music (with a little processing) and play instructional audio clips on top using AVAudioPlayer.  This all works as I'd like it to.  The trouble I'm running into is AVAudioPlayer occasionally introducing a stutter in the instructional clips.  For example, if the original clip was "Ok, go for five minutes", it plays back as "Ok, go for five minutesminutes".  I have also heard instances where a minor portion of the audio is omitted.  The audio is not distorted or phased in such a way as to suggest that the clip is being played twice in rapid succession, and AVAudioPlayer doesn't return any errors when initiate playback.
>
> My code for playing audio clips follows: (edited for brevity)
>
> - (BOOL)playURL:(NSURL *)url{
>
>         NSError *error;
> 	AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
> 	if (error) {
> 		NSLog(@"Couldn't init url: %@", [url absoluteString]);
> 		return NO;
> 	}
> 	player.delegate = self;
> 	if (![player prepareToPlay]) {
> 		NSLog(@"Error could not prepare %@ for playing", [url description]);
> 		return NO;
> 	}
> 	player.volume = 1.0;
> 	@synchronized(self) {
> 		if (queueStatus == PLAYING) {
> 			AudioSessionSetActive(YES);
> 			[player play];
> 		}
>         }
>         return YES;
> }
>
> _______________________________________________
> 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

 _______________________________________________
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

References: 
 >Stutter when playing audio clips using AV (From: Will Archer <email@hidden>)

  • Prev by Date: Re: 2 AUCocoaView implementation questions: How to deal with uninitialized AU, and restrict Host to single view.
  • Next by Date: Re: QuickTime GM Synth for iPad?
  • Previous by thread: Stutter when playing audio clips using AV
  • Next by thread: QuickTime GM Synth for iPad?
  • Index(es):
    • Date
    • Thread