[OpenAL] Status of OpenAL 1.1 on OS X
George Warner
geowar at apple.com
Tue Dec 12 13:40:54 PST 2006
on 12/12/06 1:24 PM, Jim Wrenholt at <reader at nordicsoftware.com> wrote:
> I tried implementing the following code but discovered a small
> problem. Sometimes the lengths of totalAudioFrames and
> tFSCatalogInfo.dataLogicalSize are not the same. (I was loading 8-
> bit mono WAV files). The result is some noise at the end of each
> buffer.
>
>> // allocate a buffer to read it into
>> tABL.mBuffers[0].mData = calloc( totalAudioFrames, sizeof
>> ( char ) );
>
>> // load the file's data into our OpenAL buffer
>> ALsizei size = tFSCatalogInfo.dataLogicalSize;
>
> I changed that last line to
> ALsizei size = totalAudioFrames;
>
> and now the noise is gone. Again, I am using 8-bit mono WAV files,
> so whether this works as a general solution is not clear to me.
I had the same problem; I've enclosed the latest version of my routines.
--
Enjoy,
George Warner,
Schizophrenic Optimization Scientist
Apple Developer Technical Support (DTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Archive.zip
Type: application/octet-stream
Size: 5904 bytes
Desc: not available
Url : http://opensource.creative.com/pipermail/openal/attachments/20061212/e6b8ff88/Archive.obj
More information about the Openal
mailing list