I’m having a little problem with the FSOUND_SetVolume function. The setting is as follows: I play a sound like this:
return (FSOUND_PlaySound3DAttrib(FSOUND_FREE, m_pSoundBuffers[in_dwID].m_pSample, -1, in_nInitialVolume , -1, fPos, NULL));
m_pSoundBuffers[in_dwID].m_pSample contains the pointer to the sample, fPos the 3D Position, and in_nInitialVolume the initial volume for that sound. I return the return value from FSOUND_PlaySound3DAttrib and save it for further access to the channel. The sound is a looped one, btw.
In my special case the initial volume is set to 0. I want to increase the volume in relation to the speed of an object (e.g. a car’s engine) and do this by calling
where in_nChannel is the channel number returned by the called to FSOUND_PlaySound3DAttrib.
I’ve reduced the test to constantly setting the volume to 255 (i.e. once per frame) for testing purposes, and this is what happens: the sound’s volume IS increased, and I can hear the sound at full volume, as I’d expect it. BUT there’s also a second noise which distorts the sound (making it sound like a real distortion of the original sound).
I’m using a SBLive.
Any ideas what might causing this problem?
- Anonymous asked 17 years ago
- You must login to post comments