• 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: AudioQueue and seeking through file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioQueue and seeking through file


  • Subject: Re: AudioQueue and seeking through file
  • From: Thomas Clement <email@hidden>
  • Date: Sat, 10 May 2008 16:01:19 +0200

Matthew Leon Grinshpun wrote :

I use the following code and it works just fine...  (mStartPacket is
just a value used to calculate elapsed time, you can ignore it). This
way when AudioQueueStop is run, it fills the buffer with audio data
from the location we want to seek to.

-Matthew

- (void)seekToPacket:(NSNumber *)packet
{.
self.track.state = kMLTrackSeeking;
aqData.mCurrentPacket = packet.longLongValue;
aqData.mStartPacket = aqData.mCurrentPacket;
NSLog(@"%s Attempting to seek to packet %qi", _cmd, aqData.mStartPacket);


  [self logError:AudioQueueStop(aqData.mQueue, true)];

  self.track.state = kMLTrackPlaying;
  [self logError:AudioQueueStart(aqData.mQueue, NULL)];
}

You're right, the result is a lot better if I change the packet offset before calling AudioQueueStop.
I didn't though AudioQueueStop would fill the buffers. I should have tried exactly what you told me in your first e-mail.


Thanks a lot!
Thomas

_______________________________________________
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: 
 >AudioQueue and seeking through file (From: Thomas Clement <email@hidden>)
 >Re: AudioQueue and seeking through file (From: Jens Alfke <email@hidden>)
 >Re: AudioQueue and seeking through file (From: Thomas Clement <email@hidden>)
 >Re: AudioQueue and seeking through file (From: "Matthew Leon Grinshpun" <email@hidden>)
 >Re: AudioQueue and seeking through file (From: Thomas Clement <email@hidden>)
 >Re: AudioQueue and seeking through file (From: "Matthew Leon Grinshpun" <email@hidden>)

  • Prev by Date: Re: AudioQueue and seeking through file
  • Next by Date: Re: Cocoa View available, but loading default View
  • Previous by thread: Re: AudioQueue and seeking through file
  • Next by thread: Stereo panning with the HAL
  • Index(es):
    • Date
    • Thread