On Mon, May 4, 2009 at 9:06 PM, Michael Buckley <
thebuckley@...> wrote:
> On Sun, Apr 26, 2009 at 11:36 PM, Chris Robinson <
chris.kcat@...> wrote:
>> On Sunday 26 April 2009 12:40:18 pm Michael Buckley wrote:
>>> The first problem is that there is popping and chirping when the 3
>>> shortest sound effects play. These sound effects are loaded from WAV
>>> files, and all of them fade out over the length of the sound. That is,
>>> I am not using OpenAL to fade the sounds out, but that the amplitude
>>> of the sound wave decreases.
>>>
>>> One of these sounds is 0.2 seconds long. This sound has less problems
>>> than the other two. There is merely an audible pop or click when the
>>> sound finishes.
>>
>> Hi.
>>
>> How are the sound files loaded into memory? The only things I can think of to
>> cause the noise is either if:
>>
>> It's part of the sound; either by junk at the end, or the waveform not ending
>> "cleanly", or..
>> It's being loaded incorrectly; sometimes .wav files will have extra chunks
>> after the sample data, so if care isn't taken to not read beyond the data
>> chunk, you can inadvertently read this errant data, or..
>> The specified size being given to alBufferData is too large; make sure the
>> size given is the size of the data chunk.
>>
>> If you can, it may help if you can provide source for a small program that
>> shows the problem (along with the offending .wav files).
>> _______________________________________________
>> Openal mailing list
>>
Openal@...
>>
http://opensource.creative.com/mailman/listinfo/openal>>
>
> Hi, thank you for your prompt reply. I'm sorry I have not responded
> until now. In preparing some source code to respond to your message, I
> found that I was calling fread once after reaching the end of the
> file. I wasn't actually doing anything with the buffer I was storing
> the fread in, but, so I removed it. It eliminated the chirping, but
> not the popping.
>
> Considering that I was having some problems with fread on Windows
> before, I'm going to continue investigating to see if it's not
> OpenAL-related. If I can definitely rule out other possibilities, I
> will reply again with some source code illustrating the problem.
> Meanwhile, I have uploaded the problematic WAV files to
>
http://angrymen.org/wav for anyone who is curious.
>
> I am still having troubles with sound cutting out when the window is
> moved. I next plan to move all my OpenAL calls to another thread to
> see if that fixes the problem.
>
> Thanks.
>
> -Michael Buckley
>
_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal