I’m trying to get occlusion to work on Win32 platform, FMOD 3.7 for a HW3D custom stream (synthesised car engine sound which I want to muffle for in-car view). OS is Windows 2000 and soundcard is Soundblaster Live Value. I’m using DirectSound as the output mode. EAX reverb works, I can set the reverb parameters just fine, I can 3D position the sound just fine, but none of the reverb channel properties seem to work (occlusion, obstruction, etc.). Here’s my code:
cprops.Occlusion = -10000;
This should pretty much mute the sound completely, shouldn’t it? But it doesn’t change the sound in any way. Neither does obstruction, or any other channel properties for that matter.
I know I have the right channel for the stream because setting the volume for that channel and 3D positioning it works. Besides, using FSOUND_ALL as the channel parameter also has no effect on any of the sounds that are playing. Also, I know it’s not my drivers because occlusion works just fine for me in the EAX2.0 SDK sample apps.
What am I doing wrong?
Also, when I upgraded to FMOD 3.7 from 3.61 another sound (11025 Hz 16bit mono looped HW3D transmission gear whine) now doesn’t go below a certain frequency, something like 5000 Hz I think. When I try to set its frequency below that, it doesn’t change. I can change it higher than that just fine, though. And all that changed was upgrading to 3.7. How can that be?
- V8Pete asked 15 years ago
Unless you have told EAX not to, the channel properties are affected by the global stuff (such as DistanceToListener and EnvironmentSize). This means you should be getting the current reverb properties before making any changes. I myself have it working perfectly. Occlusion is not just that single property, but a combination of “occlusion, occlusionLFRatio, occlusionRoomRatio, and occlusionDirectRatio”, perhaps you should try some of them too (this is what MaterialPresets do).
Occlusion is an EAX 2 property, and works just fine on an SB-Live (Exclusion is EAX 3). You should download the EAX 2 SDK, and look up “Material Presets” the header file/docs.
Lorien, like I said I do have the EAX2 SDK and I have tried all kinds of values for all the channel properties. None have any effect in FMOD for me. Setting the global reverb properties does work though. I’m not sure what you mean by getting the current reverb properties before making changes. I set them all by first assigning a preset and then modifying for my own needs. What do I do with the original props?
Brett, as for the frequency thing, I know I should’ve read the docs more carefully. 😳 DirectSound caps does indeed show that the minimum secondary buffer frequency is 5000 Hz. Looks like I’ll have to go back to an earlier version of FMOD since it is absolutely necessary to be able to set the frequency all the way to zero or at least much closer to zero than 5000 Hz. I’ve never experienced any of the symptoms you mentioned by doing this and for the life of me I can’t think of any plausible explanation why the lower limit would need to be that high for a secondary buffer. Unfortunately, the software mixer just doesn’t cut it for my purposes, I need the EAX capabilites.
I mean you should be storing the channel reverb properties (eg as a class member), have a “startFrame()” function that calls FSOUND_Reverb_GetChannelProperties(m_Channel,&m_Reverb);
then do your mods to m_Reverb (probably coming from somewhere in the middle of your “update()” function, but after “startFrame()”
Then have an “endFrame()” function that calls FSOUND_Reverb_SetChannelProperties(mChannel,&mReverb);
If this isn’t clear I can send some code.
Lorien, you just made me a happy camper. 😀 I stupidly assumed that the structure would be automatically initialised with the default values and all I had to do was modify the values I needed, but apparently it does need to be initialised first by GetChannelProperties. Perhaps this bit of information should be added to the docs? Unless it’s already there and I’m just missing it? 😮
Thanks for your help!
Please login first to submit.