• 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
ExtAudioFileSeek doesn't seek properly in m4a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileSeek doesn't seek properly in m4a file


  • Subject: ExtAudioFileSeek doesn't seek properly in m4a file
  • From: 水鳥 敬満 <email@hidden>
  • Date: Thu, 07 Jan 2010 22:01:28 +0900

Hi

While I'm seeking m4a file with ExtAudioFileSeek, I found strange behavior.
I seek m4a file of 44.1kHz sample rate and I set the sample rate of client format 22.05kHz.
According to Ext Audio Service reference, I should give the frame index of "original file data format"  to
ExtAudioFileSeek, so I multiply 2 to client frame index since client data sample rate is half of the 44.1kHz.
So code looks like below.

ExtAudioFileSeek(xafref, 2 * clientFrameIndex)

This works perfectly on mp3 file, I can seek to exact position I want and following ExtAudioFileRead load audio data from the position I seeked.
But when I do the same things on m4a file, subsequent ExtAudioFileRead works only until the half of the audio file.
If I seeked beyond the half of the audio file length, ExtAudioFileRead doesn't load any frames.
Since this frame index (i.e. the half of the file) is the end of the file in client data format (since sample rate is half), I guess something is misunderstood inside ExtAudioFileSeek or ExtAudioFileRead.
(When I try to set client data format's frame index (i.e. doesn't multiply 2) in ExtAudioFileSeek, the seeked position is not correct.)

Does any have similar experience ?
I really appreciate any advice on this topic.

Best regards.
Taka
 _______________________________________________
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

  • Follow-Ups:
    • Re: ExtAudioFileSeek doesn't seek properly in m4a file
      • From: Doug Wyatt <email@hidden>
    • Re: ExtAudioFileSeek doesn't seek properly in m4a file
      • From: Wil Macaulay <email@hidden>
  • Prev by Date: Re: how to calculate latency?
  • Next by Date: Re: ExtAudioFileSeek doesn't seek properly in m4a file
  • Previous by thread: Re: how to calculate latency?
  • Next by thread: Re: ExtAudioFileSeek doesn't seek properly in m4a file
  • Index(es):
    • Date
    • Thread