I got no spatialisation in my sounds.
So, to check if it was something about my PC. I tested the samples "3d".
And i got no Spatialisation either.
But if i spam key ‘1’ or ‘2’, each time sound is unpaused, the spatialisation is updated at this frame but not real time.
Means, sound is not moving left right on my headphones when the listener is moving.
I also test the sample "geometry". And this one is working correctly , sounds are 3D spatialised and cutted off.
But i didn’t see any big différence between those 2 samples in system init or sample creation. So why 1 is working and not the other?
Maybe if i find why it is not working in sample "3D" , i’ll could find why it is not working in our game.
Seb , Ivory Tower.
ps : using Windows XP and latest FMOD Ex.
- sebivorytower asked 8 years ago
I found why it was not working on sample "3D", sound were created as "Hardware", so i set FMOD_SOFTWARE instead and now it is working.
But it is still not working in our game.
I checked sound creation code :
FMOD_RESULT result; ERRCHECK(result = AudioLibImpl::GetSystem()->createSound(name, FMOD_LOOP_NORMAL|FMOD_SOFTWARE|FMOD_3D , NULL , &_pSound)); ERRCHECK(result = _pSound->set3DMinMaxDistance(0.5f * 1.0f, 5000.0f * 1.0f)); FMOD_RESULT result; FMOD::Channel* pChannel; ERRCHECK(result = AudioLibImpl::GetSystem()->playSound(FMOD_CHANNEL_FREE,_pSound,paused,&pChannel)); return pChannel;
and FMOD init is copy paste from ‘3D’ sample. And sound is not moving.
I tried both moving listener on with x= cos(angle) or set x=200.
Sound is still playing in center with no volume variation.
I call the Set3DAttributes and Listener3DAttributes and System->Update().
In my sample i have a ReverbDSP and it is working so i guess the FMO::System is updated.
I’m a bit lost there.
[quote:1yqcak4x]In my sample i have a ReverbDSP and it is working so i guess the FMO::System is updated. [/quote:1yqcak4x]
It sounds like you’re not calling System::update frequently enough, it should be called every frame. Some parts of FMOD work without calling update because they run in their own threads. Updating the volume/panning of 3D sounds is something that happens in system update.
- Guest answered 8 years ago
I just checked ,for each frame, I move objects, i call the set3DAttributes, and after moving all objects, i move the listener and call system->update().
In tried several things : moving objects and fix the listener.
Move the listener and fix objects.
Please login first to submit.