Re: ExtAudioFileSeek doesn't seek properly in m4a file
Re: ExtAudioFileSeek doesn't seek properly in m4a file
- Subject: Re: ExtAudioFileSeek doesn't seek properly in m4a file
- From: Wil Macaulay <email@hidden>
- Date: Thu, 7 Jan 2010 10:49:27 -0500
I have exactly the same experience.
wil
2010/1/7 水鳥 敬満 <email@hidden>:
> 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
>
_______________________________________________
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