• 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: Slow seeking in MP3 files using ExtAudioFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow seeking in MP3 files using ExtAudioFile


  • Subject: Re: Slow seeking in MP3 files using ExtAudioFile
  • From: Christopher Atlan <email@hidden>
  • Date: Fri, 23 Jan 2009 01:10:24 +0100

Hi Hamish,

My problem is that AudioQueue still plays some buffers before it starts
playing from the new position.

Are you sure it's playing some buffers, rather than just some packets from the buffer you had previously been filling? That was what bit me on my first attempt at this: I didn't clear the buffer I had been writing to when the seek occurred, so the first thing I heard when the queue started again was a little audio from the old position.

I checked my AudioQueueOutputCallback which clears all buffers after AudioQueueReset is called.


I try it with this sequence:

AudioQueuePause();
AudioQueueReset();
AudioFileStreamSeek();
AudioQueueStart();

I just use AudioQueueStop (synchronously) and AudioQueueStart and, other than a small delay while the pipeline is filled, that seems to work fine. Do your buffers get recycled when you call AudioQueueReset()?

I just tested it again, and now I think my problem is maybe just a glitch form time to time some seconds after the seeking.


But by playing around I notified a longer delay by using AudioQueueStop.

From the AudioQueueStop documentation:
"This function resets an audio queue, stops the audio hardware associated with the queue if it is not in use by other audio services, and stops the audio queue."


Stopping the audio hardware seems overkill, so I think AudioQueuePause and AudioQueueReset are the way to go. Can you give it a try and verify this?

Christopher




_______________________________________________ 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: 
 >Slow seeking in MP3 files using ExtAudioFile (From: Jens Alfke <email@hidden>)
 >Re: Slow seeking in MP3 files using ExtAudioFile (From: Jeff Moore <email@hidden>)
 >Re: Slow seeking in MP3 files using ExtAudioFile (From: Hamish Allan <email@hidden>)
 >Re: Slow seeking in MP3 files using ExtAudioFile (From: Christopher Atlan <email@hidden>)
 >Re: Slow seeking in MP3 files using ExtAudioFile (From: Hamish Allan <email@hidden>)

  • Prev by Date: Re: Slow seeking in MP3 files using ExtAudioFile
  • Next by Date: AudioQueueOfflineRender: how do I know when I'm done?
  • Previous by thread: Re: Slow seeking in MP3 files using ExtAudioFile
  • Next by thread: Re: Slow seeking in MP3 files using ExtAudioFile
  • Index(es):
    • Date
    • Thread