New FMOD SoundManager available in Wiki
-
- Kobold
- Posts: 36
- Joined: Sat Jun 25, 2005 11:27 am
There must be something wrong with the calculation within framestarted(), otherwise it is an FMOD problem wich we cannot solve.
Well, just an idea but: Could this be just another FMOD option we forgot to set to get real gimblelock free sound calculation?
I'll check the SoundManager code again tomorrow. Maybe its just a slight change that's needed...
Well, just an idea but: Could this be just another FMOD option we forgot to set to get real gimblelock free sound calculation?
I'll check the SoundManager code again tomorrow. Maybe its just a slight change that's needed...
-
- Kobold
- Posts: 36
- Joined: Sat Jun 25, 2005 11:27 am
Well, actually it's not.
I checked the code over and over again and finally found out that DrPain is using quaterions to get the orientation from the scenenode. That meens, if the code is 100% correct at that point, FMOD is not able to calculate gimblelock free 3d sounds. And the other thing is that my rear speakers keep sleeping while playing around with FMOD...
But since so many companies and other coders are using FMOD these two faults would be THE KILLER ARGUMENTS --> I cannot imagine that FMOD is that bad....
Any other ideas? If not I would immediately switch to OpenAL (which seems much cooler to me because sources are open...)
Greets,
Timo
I checked the code over and over again and finally found out that DrPain is using quaterions to get the orientation from the scenenode. That meens, if the code is 100% correct at that point, FMOD is not able to calculate gimblelock free 3d sounds. And the other thing is that my rear speakers keep sleeping while playing around with FMOD...
But since so many companies and other coders are using FMOD these two faults would be THE KILLER ARGUMENTS --> I cannot imagine that FMOD is that bad....
Any other ideas? If not I would immediately switch to OpenAL (which seems much cooler to me because sources are open...)
Greets,
Timo
-
- Gnome
- Posts: 333
- Joined: Sun Sep 25, 2005 7:55 pm
FreeSL is about the best OpenAL library out there if you intend to try to delve into it. Still, not as easy as FMod though, but you do, do all sound position calculations yourself (well, I don't recall if FreeSL does it for you, but you do, do it yourself in normal OpenAL).
-
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
You should also look into OgreAL. I haven't looked into FreeSL or used it, but OgreAL is very easy to use and can automatically reposition sounds according to scene nodes.
http://www.ogre3d.org/phpBB2/viewtopic.php?t=26263
KungFooMasta
http://www.ogre3d.org/phpBB2/viewtopic.php?t=26263
KungFooMasta
-
- Gnoblar
- Posts: 2
- Joined: Sun Jan 14, 2007 11:41 pm
Hey!
Im currently working on making an enginesound for my game and I was going to use crossfading sounds for it using the event-system and FMOD Designer. But then I found this manager and I figured I'd ask here if you know of another nice way to implement accelerating sound with this manager since it seems nice.
Im currently working on making an enginesound for my game and I was going to use crossfading sounds for it using the event-system and FMOD Designer. But then I found this manager and I figured I'd ask here if you know of another nice way to implement accelerating sound with this manager since it seems nice.
-
- Gnoblar
- Posts: 2
- Joined: Sun Jan 14, 2007 11:41 pm
-
- Gnoblar
- Posts: 12
- Joined: Tue Oct 10, 2006 4:36 am
hi guys... i have the same error as u also.. the error LNK2019: unresolved external symbol too. i have 20 of those errors. i tried the way u said. the preprocessor thingy. but this error still occurs.. i really cant find a way to solve it.. i need help!
btw, my project is a new empty project using the ogre wizward to create it with the ogre head in it. i just added the soundmanager.cpp and the soundmanager.h into my project and have linked the FMOD lib and the FMOD.hpp into it. but this problem still occurs...
btw, my project is a new empty project using the ogre wizward to create it with the ogre head in it. i just added the soundmanager.cpp and the soundmanager.h into my project and have linked the FMOD lib and the FMOD.hpp into it. but this problem still occurs...
-
- Kobold
- Posts: 26
- Joined: Wed Feb 14, 2007 1:16 am
hey,
i have really weird problem with fmod. Whenever i attach the fmod listener to camera scene node or a player node that moves around. It's a FPS. The music lags. As soon as i stop moving everything goes back to normal. It didn't happen before with the same setup. Now it happens and i can't figure out why. If i attach a different scene node it works without the lag. But then all the linear distance things stops working. Please help. I'm running out of ideas to try.
i have really weird problem with fmod. Whenever i attach the fmod listener to camera scene node or a player node that moves around. It's a FPS. The music lags. As soon as i stop moving everything goes back to normal. It didn't happen before with the same setup. Now it happens and i can't figure out why. If i attach a different scene node it works without the lag. But then all the linear distance things stops working. Please help. I'm running out of ideas to try.
-
- Kobold
- Posts: 28
- Joined: Wed Aug 02, 2006 11:45 am
- Location: Poland
-
- Kobold
- Posts: 26
- Joined: Wed Feb 14, 2007 1:16 am
really? i have a classes that i use for emitter's, gun shots, ppl talking, which are 3d sound. Because i wanted that feel of you walking up to something and you get that whole doppler effet. just using the linerrolloff, i forgot that name, but that flag to create a fake doppler effect. i did however put the background music as 3d sound as well.
here the really strange thing. it works prefectly fine on my friends computer. but not on mine. we have pretty much the same hardware configurations. he just has a little bit more ram.
is there anywhere i can find these know issues of FMOD?
thanks for your help
here the really strange thing. it works prefectly fine on my friends computer. but not on mine. we have pretty much the same hardware configurations. he just has a little bit more ram.
is there anywhere i can find these know issues of FMOD?
thanks for your help
-
- Kobold
- Posts: 28
- Joined: Wed Aug 02, 2006 11:45 am
- Location: Poland
@lathieeshe: I didn't mean that you mustn't use 3d sounds at all. Don't use them just as attached to the camera node which you are controlling because they lag while the camera node is moving. You could surely use them as attached to the other objects in your environment. But to the camera node use 2d instead (music, gunshots). It makes no difference for a listener despite the lag.
-
- Kobold
- Posts: 26
- Joined: Wed Feb 14, 2007 1:16 am
-
- Gnoblar
- Posts: 4
- Joined: Wed Aug 08, 2007 8:31 am
Hello,
Im pretty new to ogre and im starting to do sounds right now with fmod and i get everything running but when I run my project the Ogre.log says that createSound cannot find my file. Or when i put it so that the sound plays if I push a button, Ogre crashes and mentions the ogresingleton.h line 66(!msingleton).....
Anybody know why?
Thanks
Im pretty new to ogre and im starting to do sounds right now with fmod and i get everything running but when I run my project the Ogre.log says that createSound cannot find my file. Or when i put it so that the sound plays if I push a button, Ogre crashes and mentions the ogresingleton.h line 66(!msingleton).....
Anybody know why?
Thanks
-
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
Hi,
I just updated WIKI for SoundManager.cpp source code because soundInstanceVector variable was never released - so I added the code to delete in the destructor.
I just updated WIKI for SoundManager.cpp source code because soundInstanceVector variable was never released - so I added the code to delete in the destructor.
Code: Select all
delete soundInstanceVector;
-
- Gnoblar
- Posts: 2
- Joined: Wed Sep 19, 2007 4:15 pm
Hi, I have tried to get this to work all day in my project, but no luck. I'm using windows XP, VS 2005, Ogre Eihort v1.42 and FMOD Ex API win32 v4.08.
At first i had some linker errors which i managed to solve from reading various posts on the forum.
Then i forgot to add the file path in the resources.cfg.
But now I have done that but it still doesnt work. I had a look in the Ogre.log and it says: "SoundManager::CreateSound could not load sound 'warchant.wav' FMOD Error:End of file unexpectedly reached while trying to read essential data (truncated data?)."
The application runs and all but the sound doesnt work.
This is not the same error i got before i added the file path in the resources file, so i assume it finds the file? I have tried wtih some different sound files and formats, its all the same.
Any help at all is appreciated, or should i just try OpenAL?
Thanks
At first i had some linker errors which i managed to solve from reading various posts on the forum.
Then i forgot to add the file path in the resources.cfg.
But now I have done that but it still doesnt work. I had a look in the Ogre.log and it says: "SoundManager::CreateSound could not load sound 'warchant.wav' FMOD Error:End of file unexpectedly reached while trying to read essential data (truncated data?)."
The application runs and all but the sound doesnt work.
This is not the same error i got before i added the file path in the resources file, so i assume it finds the file? I have tried wtih some different sound files and formats, its all the same.
Any help at all is appreciated, or should i just try OpenAL?
Thanks
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
The message says your wave file is corrupt, though why it does that I have no idea (unless it is actually corrupted).
If you don't need 3D sound, then I suggest you have a look at Audiere. It's probably the easiest sound library to use, or at least the easiest I found.or should i just try OpenAL?
-
- Gnoblar
- Posts: 2
- Joined: Wed Sep 19, 2007 4:15 pm
-
- Gnoblar
- Posts: 18
- Joined: Thu Mar 20, 2008 1:32 am
-
- Gnoblar
- Posts: 2
- Joined: Sun Apr 06, 2008 4:34 pm
Hi, I know this is an old thread, but the sound manager is really useful! had sound working in a couple of hours. Thanks DrPain,
I did find something that caught me out, thought Id post it if anyone else is looking for the solution.
The ChannelInstance class used every frame to update 3d sound has a scenenode pointer. The channels seem to exist long after the sound has stopped playing and continue to update positions. So when you delete that scenenode somewhere else in your code it will crash in Soundmanager::framestarted when it tries to deref the sceneNode ptr.
So i added a quick dirty hackto call whenever I delete something that has played sounds :
void SoundManager::clearChannelsConnectedToSceneNode( Ogre::SceneNode *node)
{
for( int i=0; i<MAX_SOUND_CHANNELS; i++)
if( channelArray.sceneNode == node )
channelArray.Clear();
}
Infuse - in what way is it not working for you?
I did find something that caught me out, thought Id post it if anyone else is looking for the solution.
The ChannelInstance class used every frame to update 3d sound has a scenenode pointer. The channels seem to exist long after the sound has stopped playing and continue to update positions. So when you delete that scenenode somewhere else in your code it will crash in Soundmanager::framestarted when it tries to deref the sceneNode ptr.
So i added a quick dirty hackto call whenever I delete something that has played sounds :
void SoundManager::clearChannelsConnectedToSceneNode( Ogre::SceneNode *node)
{
for( int i=0; i<MAX_SOUND_CHANNELS; i++)
if( channelArray.sceneNode == node )
channelArray.Clear();
}
Infuse - in what way is it not working for you?
-
- Halfling
- Posts: 86
- Joined: Mon Mar 10, 2008 11:03 am
- Location: Istanbul
-
- Kobold
- Posts: 25
- Joined: Sun Jul 27, 2008 2:42 am
- Location: Canada
Hi, i have a problem in the frameStarted method, i tried to pass to it the node of the camera or, a node that i just created and placed somewhere. but when i run it, at the first frame it crashed saying access violation in reading.
it says that the symbol channelIndex does not exist.
here is how i create the sound in the frameListener constructor
it says that the symbol channelIndex does not exist.
here is how i create the sound in the frameListener constructor
Code: Select all
mSoundMgr = new SoundManager;
mSoundMgr->Initialize();
int soundForest=0;
soundForest = mSoundMgr->CreateLoopedSound(String("forest.wav"));
SceneNode node(mSceneMgr,"node");
int channelForest = 0;
node.setPosition(0,0,0);
mSoundMgr->Set3DMinMaxDistance(channelForest,0,1000);
mSoundMgr->PlaySound(soundForest,&node,&channelForest);
-
- Kobold
- Posts: 25
- Joined: Sun Jul 27, 2008 2:42 am
- Location: Canada
-
- Gnoblar
- Posts: 3
- Joined: Fri Dec 19, 2008 10:16 pm
Hi, I've been trying to get this working for a couple days now, i think i'm pretty close, but when i load the sound file, it says "13:01:26: SoundManager::CreateSound could not load sound 'Sound050.ogg' FMOD Error:End of file unexpectedly reached while trying to read essential data (truncated data?). " in my ogre log. I thought maybe my sound file was corrupt or something so i tried two different sound files, even tried different sound file types like .wav. But i still get the same problem, can anyone help?
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoblar
- Posts: 3
- Joined: Fri Dec 19, 2008 10:16 pm