we are integrating fmod in our application and encounered some problems. first of all we would thank for this excellent work. the library is really easy to use and the documentation is as well too 😉
here the questions:
- somehow the left and right channels are swapped for 3d sound sources. maybe i update the listener in an inappropriate way. we have a z-up system (opengl). here is the update method of our sound manager:
void SoundManager::update( float deltaTime )
assert( _p_system && "sound system is not initialized" );
if ( !_p_sceneView ) _p_sceneView = Application::get()->getSceneView(); // determine listener's position, forward, and up vectors osg::Vec3 center; osg::Vec3 forward; osg::Vec3 eye; osg::Vec3 up; // this does the same as opengl's "look at" function _p_sceneView->getViewMatrixAsLookAt( eye, center, up ); forward = center - eye; _listenerForward.x = forward.x(); _listenerForward.y = forward.y(); _listenerForward.z = forward.z(); _listenerPosition.x = eye.x(); _listenerPosition.y = eye.y(); _listenerPosition.z = eye.z(); _listenerUp.x = up.x(); _listenerUp.y = up.y(); _listenerUp.z = up.z(); // update listener, without velocity _p_system->set3DListenerAttributes( 0, &_listenerPosition, NULL, &_listenerForward, &_listenerUp ); // update sound system _p_system->update();
- we have some non-looped 2d sounds for gui. when playing the same sound several times in overlapped fashion then a kind of noisy clicking can be heard — this happens for mouse over sound: when moving the mouse pointer too fast over buttons, before the just started sound is finish the same sound is started again.
thanks for any help.
- boto asked 13 years ago
before i forget, i have another question:
the palyer walks, i have a non-looped sound for walking. i want to (re)start the sound only when the current one is finish. on creation of the sound i play the sound with pause flag set to true and passed a flag for taking the next free channel (FMOD_CHANNEL_FREE) and store the channel handle in an internal map — i hope this way that i can hold the sound channel handler until the sound is released. later on playing the sound i use the flag FMOD_CHANNEL_REUSE with stored channel in map. here i check first if the channel is already playing a sound via calling isPlaying on that channel object. but i get always true and wonder why !? do i miss something about channels? i could not figure out the problem reading all sdk docs and looking in samples.
interesting point. i have non-looped sounds for player movement. so when i play a sound, is the sound not stopped automatically if the track is played to end? or have i to set stopplaying my self — i.e. checking how long the sound is and call stopplaying myself ?
i do update the sound system in main loop. i have managed to explicitely stopping the channels when the player stops moving and now everything seems to work better. now i have another problem — i know, newbies can be lovely 😉
1 .as long i have only a couple of sounds no problem occurs. but when i start a level and more sound resources are needed ( up to 13, a lot of short fx sounds for user interface such as gui clicks etc. ) then playing the move over sounds begin to stutter, they are hacked and sometimes they are not played. i have set their channel priority to high ( 100 ). but it did not help.
- the other problem is that some people reported to have missing sound when i create the sound sources with FMOD_HARDWARE flag. i have set now all creations using software sound ( FMOD_SOFTWARE ) and those people do not complain anymore. i don’t know if their information is reliable, so my question to you: may it be any problem here? the documentation says that when creating hardware sounds and there is no hardware resource available then the software mising is uses as fallback. btw: on my system both methods work. but the clicking problem mentioned earlier seems to be increased the more sounds i create. i exclusively preserve an own channel for every created sound and reuse it when play or stop or pause the sounds, may that be the problem (too much channels upto 13)?
thank you very much for your support.
p.s.: you can have a taste what we are working on here (available only for win32 platform atm):
get always the last rc + its patches, currently we have rc06.
thank you for the hints. i will fix the sound problem after the release — today is the date of release dump. i will dive deeper into fmod and look what i find. but as far i can see i have followed the docs and the samples. maybe fmod’s next release will fix the problem 😉
concerning problem 1.: i had calculated the forward vector in wrong direction. now it works fine.
concerning problem 2.: i noticed that some people have problem hearing sound on their machine (winxp). so i decided to use only software mixed sounds in order to avoid this problem. now every beta tester can hear the sound 😉 the other argument for choosing software mixer is that fmod is even faster as the hardware for mixing on windows — so your comments in fmod feature list, brett
p.s.: the more i get used to use fmod the more i have to silently give you compliments. the sdk is really good 😉
Please login first to submit.