0
0

I’ve been getting this sharp transition in volume when using the set3DPanLevel, and have observed the following behaviour in-game. If I have some streaming audio positioned at same location as listener, and call set3DPanLevel(0.0f) and set3DPanLevel(0.01f), there is a noticeable difference in volume coming out the left speaker (perhaps 1 dB?). There is no change in the right speaker. I have a configuration where it keeps alternating between these pan levels on a 0.5 second cycle, with no other properties changing.
I’ve tried for ages to reproduce this problem in FMOD Designer and the FMOD examples, but have been unable to do so (no volume difference). Can anyone suggest what could be causing this artefact? It’s driving me nuts.. I’ll get to the bottom of it eventually, continuing to strip down our game runtime until it matches the FMOD example precisely, but that could take a while.

  • You must to post comments
0
0

I am convinced this issue has something to do with either the encoding of the streaming data (format), or the fact we’re using a subsound (through use of getSubSound). If I create a stream directly from a wave file using createStream, everything works fine. If I instead create a stream from an FSB file, and use getSubSound to acquire the child stream, it suddenly has this attenuation issue. Should set3DPanLevel behave differently for different wave formats (or subsounds)?
If I query getFormat on the two sounds that are responding differently to set3DPanLevel, they have the same format (PCM16) and number of channels (1), only difference is one is AIFF and the other is FSB.

  • You must to post comments
0
0

OK, I can now reproduce it in FMOD samples. Load up the fsb sample project, change it to compile the main.cpp (properties..’excluded from build’ set to No), instead of main.c (exclude from build) and add in the following..
Before the main do loop, add in a state
[code:htum4bhy]bool panLevelToggle = false;[/code:htum4bhy]
Then within khhit() condition, at end of this conditional block add
[code:htum4bhy]
if (key == ‘ ‘)
{
panLevelToggle = !panLevelToggle;
printf("Inverted\n");
}
[/code:htum4bhy]
Then the line before the system->update() call add the block
[code:htum4bhy]
if (channel)
{
if (panLevelToggle)
{
result = channel->set3DPanLevel(0.0f);
}
else
{
result = channel->set3DPanLevel(0.01f);
}
ERRCHECK(result);
}
[/code:htum4bhy]

Now if you run this sample (choose to play back sample ‘2’), and hold down the space bar (causing it to toggle back and forth between pan levels), you should be able to clearly hear the issue I’ve discussed above. If you hit space once off, it’s a bit harder to notice, but certain sound samples make the change more pronounced. It would appear that high frequency tones are being affected (background ‘hiss’ is toggling on and off).
I tested the above with latest stable branch 4.06.08.

  • You must to post comments
0
0

Latest stable branch is actually 4.06.20, is this what you mean? 4.06.08 is from the 8th of February. There’s been quite a few changes and fixes since then.

  • You must to post comments
0
0

Sorry I meant to say latest 4.06.20 ("5/06/07 4.06.20 – Stable release update"), with getVersion returning 263712

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.