New FMOD SoundManager available in Wiki
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
It's wrapping OpenAL, so it does.
/* 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
-
- Hobgoblin
- Posts: 540
- Joined: Wed Nov 17, 2004 4:36 pm
- Location: Middlesbrough, England
Hey Jacmoe, thanks for the forwarding
OgreOggSound supports .ogg/.wav audio files so if thats what your using then please do check it out, any problems, visit the forum and I'll do what I can to help you out.
OgreOggSound supports .ogg/.wav audio files so if thats what your using then please do check it out, any problems, visit the forum and I'll do what I can to help you out.
Regards,
Sticky.
Web: http://sourceforge.net/projects/ogreoggsound/
SVN: https://ogreoggsound.svn.sourceforge.ne ... ound/trunk
Sticky.
Web: http://sourceforge.net/projects/ogreoggsound/
SVN: https://ogreoggsound.svn.sourceforge.ne ... ound/trunk
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
I am very glad that you decided to share your OgreOgg library. It's the one and only Ogre sound wrapper we've got.Stickymango wrote:Hey Jacmoe, thanks for the forwarding
/* 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.
-
- Greenskin
- Posts: 142
- Joined: Thu Dec 18, 2008 11:32 am
fade out sound
Hi
would someone know how to fade out the sound/music?
THanks
would someone know how to fade out the sound/music?
THanks
-
- Hobgoblin
- Posts: 540
- Joined: Wed Nov 17, 2004 4:36 pm
- Location: Middlesbrough, England
Re: New FMOD SoundManager available in Wiki
Which library are you using?
Regards,
Sticky.
Web: http://sourceforge.net/projects/ogreoggsound/
SVN: https://ogreoggsound.svn.sourceforge.ne ... ound/trunk
Sticky.
Web: http://sourceforge.net/projects/ogreoggsound/
SVN: https://ogreoggsound.svn.sourceforge.ne ... ound/trunk
-
- Greenskin
- Posts: 142
- Joined: Thu Dec 18, 2008 11:32 am
Re: New FMOD SoundManager available in Wiki
The FMOD / SoundManager class which is found in the wiki and this dedicated thread.
Also, would anyone have an idea why the sound would suddenly not play after playing for a few times? I'm using the SoundManager still.
I just do this whenever i want to make an explosion sound:
Also, would anyone have an idea why the sound would suddenly not play after playing for a few times? I'm using the SoundManager still.
I just do this whenever i want to make an explosion sound:
Code: Select all
int channelFireGun = INVALID_SOUND_CHANNEL;
gSoundMgr->PlaySound( gExplosionSoundId, mSceneMgr->getSceneNode("exnode"), &channelFireGun );
gSoundMgr->Set3DMinMaxDistance(channelFireGun, 100.0, 1000.0);
-
- Gnoblar
- Posts: 14
- Joined: Fri Jan 09, 2009 5:11 am
Re: New FMOD SoundManager available in Wiki
Will the FMOD Sound Manager work with FMOD Designer? And if so, is it fairly straight forward?
Cheers for listening.
Cheers for listening.
-
- Kobold
- Posts: 36
- Joined: Sat Jun 25, 2005 11:27 am
Re: New FMOD SoundManager available in Wiki
Any luck solving my initial problem with the gimble lock?
-
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Re: New FMOD SoundManager available in Wiki
Might be worth pointing out that the wrapper doesn't do any validation, and keeps track of SceneNodes that you pass it; hence if you are going to be removing scenenodes during runtime then you will need to modify the wrapper. Took me a while to figure that one out...
-
- Gnoblar
- Posts: 9
- Joined: Sun Nov 16, 2008 2:43 pm
Re: New FMOD SoundManager available in Wiki
Hello!
I have 2 interesting questions:
1. How do you use the SoundManager to deallocate sounds when they are not needed anymore?
2. After looking around in the code I see a piece of code I think look peculiar, SoundManager::IncrementNextSoundInstanceIndex. It is meant to increase the size of a vector when it runs out of space but isn't this done automatically by STL? Anyone of you have any clue about that, to me it does not make much sense.
I have 2 interesting questions:
1. How do you use the SoundManager to deallocate sounds when they are not needed anymore?
2. After looking around in the code I see a piece of code I think look peculiar, SoundManager::IncrementNextSoundInstanceIndex. It is meant to increase the size of a vector when it runs out of space but isn't this done automatically by STL? Anyone of you have any clue about that, to me it does not make much sense.
-
- Greenskin
- Posts: 115
- Joined: Wed Feb 01, 2006 1:22 pm
Re: New FMOD SoundManager available in Wiki
Hello^^
I have a weird problem with fmod in ogre and I hope you can help me..
My problem is that my program can play only some file while other don't work at all.I've tried with various mp3,wav,aif,ogg,wmv etc with various different codec settings but with no good results.The sounds with these files don't start.How can i fix this?What codec are certanly supported in fmod?
Regards in advance
I have a weird problem with fmod in ogre and I hope you can help me..
My problem is that my program can play only some file while other don't work at all.I've tried with various mp3,wav,aif,ogg,wmv etc with various different codec settings but with no good results.The sounds with these files don't start.How can i fix this?What codec are certanly supported in fmod?
Regards in advance
-
- Gnoblar
- Posts: 9
- Joined: Sun Nov 16, 2008 2:43 pm
Re: New FMOD SoundManager available in Wiki
I am currently not using FMOD, but with it I uses to play oggs and wavs. Positional, i.e. 3D, sounds have to be mono I believe. There are also some bugs in the code on the wiki.jtpsoft wrote:Hello^^
I have a weird problem with fmod in ogre and I hope you can help me..
My problem is that my program can play only some file while other don't work at all.I've tried with various mp3,wav,aif,ogg,wmv etc with various different codec settings but with no good results.The sounds with these files don't start.How can i fix this?What codec are certanly supported in fmod?
Regards in advance
For more detail you could post the same question to the FMOD forums, or learn FMOD (highly suggested), so that you can improve the wiki code.
(I modified the code from the wiki in my own game but now it is too bound to the game itself)
My first suggestion is to remove the "SoundManager::IncrementNextSoundInstanceIndex" function in the code, which in my opinion is utter madness in my opinion, it is not needed and it only makes the code less clear.
Good luck FMOD is much better than the other sound libraries.
-
- Gnoblar
- Posts: 9
- Joined: Sun Nov 16, 2008 2:43 pm
Re: New FMOD SoundManager available in Wiki
Otherwise it should work with all kinds of wavs and all kinds of oggs, at least that is my assumption and that makes sense, since FMOD is a commercial and great sound library.
-
- Halfling
- Posts: 90
- Joined: Sat Feb 21, 2009 10:32 am
Re: New FMOD SoundManager available in Wiki
I'm also getting this error in the ogre log (using Shaggoth):
and at framestarted (doubt it matters but it's here for completion),
I've stored the .wav file in "C:\OgreSDK\media\sounds" and updated the paths in resources.cfg. It appears as if the .wav is found by the file manager (yes, I checked the correct path) but fmod system->createSound fails. Really stumped here. Has anyone else ran into this and know the solution? It's a bit of an old-ish article as well. Anyone have any updates?
Cheers
Jason
setting up20:52:46: SoundManager::CreateSound could not load sound 'music.wav' FMOD Error:End of file unexpectedly reached while trying to read essential data (truncated data?).
Code: Select all
SceneNode * soundNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("soundNode");
soundNode->setPosition(0,0,0);
backgroundSound1 = soundMgr->CreateLoopedSound(Ogre::String("music.wav"));
backgroundSoundChannel1 = INVALID_SOUND_CHANNEL;
soundMgr->PlaySound(backgroundSound1, soundNode, &backgroundSoundChannel1);
Code: Select all
soundMgr->PlaySound(backgroundSound1, soundNode, &backgroundSoundChannel1);
soundMgr->Set3DMinMaxDistance(backgroundSoundChannel1, 2.0, 50000.0);
soundMgr->FrameStarted(soundNode, evt.timeSinceLastFrame);
Cheers
Jason
-
- Halfling
- Posts: 90
- Joined: Sat Feb 21, 2009 10:32 am
Re: New FMOD SoundManager available in Wiki
the deafening sound of crickets. anyone? bueller?
-
- Greenskin
- Posts: 100
- Joined: Sun Jan 14, 2007 1:47 am
Re: New FMOD SoundManager available in Wiki
sounds most like a corrupted wav file/odd format. have you tried another one from a different source?
I have a slightly further developed sound manager that wraps alternatively OpenAL or Fmod Ex. I could upload it if there's a general demand for another one.
I have a slightly further developed sound manager that wraps alternatively OpenAL or Fmod Ex. I could upload it if there's a general demand for another one.
-
- Goblin
- Posts: 231
- Joined: Thu Feb 12, 2009 3:49 pm
- Location: France
- x 13
Re: New FMOD SoundManager available in Wiki
Also, I don't think it's needed to do PlaySound each frame, once suffice.
-
- Gnoblar
- Posts: 1
- Joined: Tue Oct 19, 2010 4:26 pm
setFileSystem()
My first time posting on these forums:)
I have a question about the SoundManager.cpp file.
Inside Initialize(), when system calls the setFileSytem function (as seen below):
result = system->setFileSystem(FModOpen, FModClose, FModRead, FModSeek, 2048);
I get an error saying setFileSystem() doesn't take 5 arguments. It's missing two other arguments being passed of type FMOD_FILE_ASYNCREADCALLBACK & of type FMOD_FILE_ASYNCCANCELCALLBACK. Did anyone else have this issue and, if so, how did you solve this problem?
Apologies if this is a silly question:D
I have a question about the SoundManager.cpp file.
Inside Initialize(), when system calls the setFileSytem function (as seen below):
Code: Select all
I get an error saying setFileSystem() doesn't take 5 arguments. It's missing two other arguments being passed of type FMOD_FILE_ASYNCREADCALLBACK & of type FMOD_FILE_ASYNCCANCELCALLBACK. Did anyone else have this issue and, if so, how did you solve this problem?
Apologies if this is a silly question:D
-
- Gnoblar
- Posts: 6
- Joined: Sat Jan 30, 2010 10:26 am
Re: setFileSystem()
I just tried out the sound manager and got the same error, no solution yet however, if anyone knows how to fix this that would be appreciated.stu4guvnor wrote:My first time posting on these forums:)
I have a question about the SoundManager.cpp file.
Inside Initialize(), when system calls the setFileSytem function (as seen below):
result = system->setFileSystem(FModOpen, FModClose, FModRead, FModSeek, 2048);Code: Select all
I get an error saying setFileSystem() doesn't take 5 arguments. It's missing two other arguments being passed of type FMOD_FILE_ASYNCREADCALLBACK & of type FMOD_FILE_ASYNCCANCELCALLBACK. Did anyone else have this issue and, if so, how did you solve this problem?
Apologies if this is a silly question:D
-
- Kobold
- Posts: 27
- Joined: Fri Mar 25, 2011 5:48 pm
Re: New FMOD SoundManager available in Wiki
I get the same error. Hopefully somebody is going to fix this soon ....
-
- OGRE Moderator
- Posts: 2819
- Joined: Mon Mar 05, 2007 11:17 pm
- Location: Canada
- x 218
Re: New FMOD SoundManager available in Wiki
This FMOD SoundManager was written a long time ago (original post is 2006), possibly for an older version of FMOD than you're using. The newer version of FMOD may have changed some of it's function parameters.
If I were you, I'd open the FMOD documentation, look at the setFileSystem function, and see what parameters it takes. I'd also look at the sample code which comes with FMOD, and see what parameters it suggests passing to setFileSystem. Then, you should hopefully be able to fix the problem yourself.
If I were you, I'd open the FMOD documentation, look at the setFileSystem function, and see what parameters it takes. I'd also look at the sample code which comes with FMOD, and see what parameters it suggests passing to setFileSystem. Then, you should hopefully be able to fix the problem yourself.
-
- Kobold
- Posts: 27
- Joined: Fri Mar 25, 2011 5:48 pm
Re: New FMOD SoundManager available in Wiki
Ok so I get this 'working' (in setFileSystem() function I passed 0,0,0 as last 3 arguments (don't know if it's good but it's compiling) )
but now I load my sound with this soundManager and nothing gets played. problem is somewhere inside the PlaySound() function ( the program just go through it and no sound is played.
I also don't know if placing this code inside createScene function is good :
EDIT: I have the solution now.
The problem was that i called the
just after contructing it and playing the sound therefore it did not have the chance to play the sound, Also I have heard on other forums that :
problem 2 :
I also had this problem :
My sound file was not loaded even though the ogre resource paths were set ok.
To fix this I change resource group in SoundManager.cpp from general to popular
now it looks like this
but now I load my sound with this soundManager and nothing gets played. problem is somewhere inside the PlaySound() function ( the program just go through it and no sound is played.
I also don't know if placing this code inside createScene function is good :
Code: Select all
SoundManager *soundManagerPtr = new SoundManager;
soundManagerPtr->Initialize();
//
int mySound1 = soundManagerPtr->CreateStream(Ogre::String("boing.wav") );
int channel1 = 0;
// This is wrong but should I attach it ??
// headNode->attachObject(mySound1);
soundManagerPtr->PlaySound(mySound1, headNode, &channel1);
delete soundManagerPtr;
The problem was that i called the
Code: Select all
delete soundManagerPtr;
Hope that it helps you guys with this problemFMOD "playSound" is not a blocking operation, it will start playing the sound in another thread, then return.
problem 2 :
I also had this problem :
My sound file was not loaded even though the ogre resource paths were set ok.
To fix this I change resource group in SoundManager.cpp from general to popular
Code: Select all
ResourceGroup* grp = getResourceGroup("General");// default General
Code: Select all
ResourceGroup* grp = getResourceGroup("Popular");// default General
-
- Kobold
- Posts: 25
- Joined: Thu Nov 04, 2010 11:06 am
- Location: Dublin, Ireland
- x 4
Re: New FMOD SoundManager available in Wiki
I have just uploaded my audio wrapper library http://antongerdelan.net/projects/opens ... bwrapaudio. Feel free to try that. It supports the latest Fmod Ex as well as OpenAL 1.1. There is an example in there for both. And Makefiles for Windows, Linux, and OS/X.
It has a Creative Commons attribution-non-commercial-share alike licence, however.
<edit>changed the URL, above</edit>
It has a Creative Commons attribution-non-commercial-share alike licence, however.
<edit>changed the URL, above</edit>
Last edited by capnramses on Sun Jun 19, 2011 9:09 am, edited 1 time in total.
-
- Gnoblar
- Posts: 13
- Joined: Sat May 28, 2011 5:13 pm
Re: New FMOD SoundManager available in Wiki
Is the FMOD SoundManager totally useless by now?
In SoundManager.cpp in the FrameStarted-method a function is called on a scenenode that doesn't even exist: listenerNode->getWorldPosition()
Does anybody have any suggestions what soundlibrary is easy to use with ogre? I just want to play a few sounds, nothing fancy...
In SoundManager.cpp in the FrameStarted-method a function is called on a scenenode that doesn't even exist: listenerNode->getWorldPosition()
Does anybody have any suggestions what soundlibrary is easy to use with ogre? I just want to play a few sounds, nothing fancy...