New FMOD SoundManager available in Wiki

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
McNugget
Kobold
Posts: 36
Joined: Sat Jun 25, 2005 11:27 am

Post by McNugget »

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...
McNugget
Kobold
Posts: 36
Joined: Sat Jun 25, 2005 11:27 am

Post by McNugget »

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
OvermindDL1
Gnome
Posts: 333
Joined: Sun Sep 25, 2005 7:55 pm

Post by OvermindDL1 »

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).
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16

Post by KungFooMasta »

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
Burglar
Gnoblar
Posts: 2
Joined: Sun Jan 14, 2007 11:41 pm

Post by Burglar »

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.
Burglar
Gnoblar
Posts: 2
Joined: Sun Jan 14, 2007 11:41 pm

Post by Burglar »

Is there really none who can help me with this porblem?
skinx
Gnoblar
Posts: 12
Joined: Tue Oct 10, 2006 4:36 am

Post by skinx »

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...
lathieeshe
Kobold
Posts: 26
Joined: Wed Feb 14, 2007 1:16 am

Post by lathieeshe »

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.
User avatar
Loockas
Kobold
Posts: 28
Joined: Wed Aug 02, 2006 11:45 am
Location: Poland

Post by Loockas »

@lathieeshe: It's a known issue. Don't attach any unnecessery 3d sounds to your camera node. If you want to add e.g. a music to your scene use 2d sound instead.
lathieeshe
Kobold
Posts: 26
Joined: Wed Feb 14, 2007 1:16 am

Post by lathieeshe »

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
User avatar
Loockas
Kobold
Posts: 28
Joined: Wed Aug 02, 2006 11:45 am
Location: Poland

Post by Loockas »

@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. :wink:
lathieeshe
Kobold
Posts: 26
Joined: Wed Feb 14, 2007 1:16 am

Post by lathieeshe »

hey i tired that. it seems everything is back in order and working. thanks for the tip.
pchow
Gnoblar
Posts: 4
Joined: Wed Aug 08, 2007 8:31 am

Post by pchow »

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
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post by syedhs »

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.

Code: Select all

delete soundInstanceVector;
Benke
Gnoblar
Posts: 2
Joined: Wed Sep 19, 2007 4:15 pm

Post by Benke »

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
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58

Post by CABAListic »

The message says your wave file is corrupt, though why it does that I have no idea (unless it is actually corrupted).
or should i just try OpenAL?
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.
Benke
Gnoblar
Posts: 2
Joined: Wed Sep 19, 2007 4:15 pm

Post by Benke »

Thanks for the reply, yes thats what i thought it meant. Thats why i tried some different files but the result was the same.

3D sound is something i need for my application, but thanks for the link. I guess i could use it as last resort.
Infuse
Gnoblar
Posts: 18
Joined: Thu Mar 20, 2008 1:32 am

Post by Infuse »

Hi I Need to restart this thread... is there an updated sound manager for OGRE eihort?
atrainedmonkey
Gnoblar
Posts: 2
Joined: Sun Apr 06, 2008 4:34 pm

Post by atrainedmonkey »

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?
Elric
Halfling
Posts: 86
Joined: Mon Mar 10, 2008 11:03 am
Location: Istanbul

Post by Elric »

I wonder if the problem that McNugget mentioned solved...?
nath31337
Kobold
Posts: 25
Joined: Sun Jul 27, 2008 2:42 am
Location: Canada

Post by nath31337 »

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

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);
nath31337
Kobold
Posts: 25
Joined: Sun Jul 27, 2008 2:42 am
Location: Canada

Post by nath31337 »

anyone had a problem like that?
zerotm
Gnoblar
Posts: 3
Joined: Fri Dec 19, 2008 10:16 pm

Post by zerotm »

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?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Hi zerotm

Since you're using ogg, why not use OgreOggSound? :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
zerotm
Gnoblar
Posts: 3
Joined: Fri Dec 19, 2008 10:16 pm

Post by zerotm »

Hi, jacmoe, thanks for the quick reply, only reason i wasn't sure about using OgreOggSound was because i don't really know where to find sound in that file format, the sounds i'm using to test this are from the sample that DrPain made on the wiki. Does OgreOggSound support other formats as well?