ExtAudioFileRead lengthInFrames issue
ExtAudioFileRead lengthInFrames issue
- Subject: ExtAudioFileRead lengthInFrames issue
- From: Mark Sibly <email@hidden>
- Date: Mon, 18 Apr 2011 11:37:12 +1200
Hi,
I'm trying to use ExtAudioFileRead to load a WAV file for use with
OpenAL. The code is based on the 'MyGetOpenALAudioData' sample code
that is in wide use.
The problem is that the loaded sample ends up with 'noise' in it,
resulting in a noticeable 'pop' when I try to loop the sound. The same
sample loops fine in Audactity, and using my own custom WAV loader.
Upon closer examination, it seems that ExtAudioFileRead is modifying
the 'lengthInFrames' parameter you pass it, which was found using
ExtAudioFileGetProperty.
I tried 'truncating' the loaded sound using the returned
lengthInFrames but the pop is still there.
I'm therefore guessing that the noise is at the start of the sound,
which kind of makes sense if ExtAudioFileRead uses the buffer you give
to also load the WAV 'header', and perhaps lengthInFrames includes
this header?
But in this case, where do the actual audio samples start within the buffer?
Does this affect other filetypes too?
Bye!
Mark
_______________________________________________
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