• 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
ExtAudioFileRead
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtAudioFileRead


  • Subject: ExtAudioFileRead
  • From: Aran Mulholland <email@hidden>
  • Date: Wed, 8 Sep 2010 21:09:54 +1000

Hello all,

I am reading audio data from a wav file to populate a ring buffer and
I have some issues when I get to the end of the file and want to start
reading from back at the beginning.

I am reading in 4096 frames at a time with the line

                       result =
ExtAudioFileRead(mSoundBuffer->fileReference, &numPackets, bufList); -
where numPackets is 4096.

Audio plays correctly.

when i near the end of the file I cannot read 4096 frames as I have
less than that left in the file. So I calculate the number to be read
and read that number.

                       result =
ExtAudioFileRead(mSoundBuffer->fileReference, &numPackets, bufList); -
where numPackets is say 544.

Then i reset the read pointer using

			SInt64 position = 0;
			result = ExtAudioFileSeek(mSoundBuffer->fileReference, position);

After this point, whenever I do an ExtAudioFileRead the numPackets is
always 544 - the number it was to get me to the end of the file.

Anyone have a similar experience, or know what i might be doing wrong?

Thanks

Aran
 _______________________________________________
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: ExtAudioFileRead
      • From: Ethan Funk <email@hidden>
  • Prev by Date: inexplicable SIGABRT
  • Next by Date: Re: ExtAudioFileRead
  • Previous by thread: Re: inexplicable SIGABRT
  • Next by thread: Re: ExtAudioFileRead
  • Index(es):
    • Date
    • Thread