Page 4 of 5

Posted: Fri Dec 19, 2008 10:44 pm
by jacmoe
It's wrapping OpenAL, so it does. :wink:

Posted: Fri Dec 19, 2008 10:54 pm
by zerotm
Hm nice, ill go check it out then thanks.

Posted: Mon Dec 22, 2008 11:16 pm
by Stickymango
Hey Jacmoe, thanks for the forwarding :D

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.

Posted: Tue Dec 23, 2008 7:34 pm
by jacmoe
Stickymango wrote:Hey Jacmoe, thanks for the forwarding :D
I am very glad that you decided to share your OgreOgg library. It's the one and only Ogre sound wrapper we've got. :)

fade out sound

Posted: Mon Jan 12, 2009 11:32 am
by mickeyren
Hi

would someone know how to fade out the sound/music?

THanks

Re: New FMOD SoundManager available in Wiki

Posted: Tue Jan 13, 2009 6:05 pm
by Stickymango
Which library are you using?

Re: New FMOD SoundManager available in Wiki

Posted: Sat Jan 24, 2009 7:20 am
by mickeyren
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:

Code: Select all

int channelFireGun =  INVALID_SOUND_CHANNEL;		
gSoundMgr->PlaySound( gExplosionSoundId, mSceneMgr->getSceneNode("exnode"), &channelFireGun );	
gSoundMgr->Set3DMinMaxDistance(channelFireGun, 100.0, 1000.0);	

Re: New FMOD SoundManager available in Wiki

Posted: Mon Mar 02, 2009 5:06 pm
by therealwoge
Will the FMOD Sound Manager work with FMOD Designer? And if so, is it fairly straight forward?

Cheers for listening. :)

Re: New FMOD SoundManager available in Wiki

Posted: Mon Mar 16, 2009 9:45 pm
by McNugget
Any luck solving my initial problem with the gimble lock?

Re: New FMOD SoundManager available in Wiki

Posted: Thu Mar 19, 2009 6:39 pm
by AntonTheManton
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... :wink:

Re: New FMOD SoundManager available in Wiki

Posted: Sun Apr 26, 2009 9:05 pm
by Muscleator
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.

Re: New FMOD SoundManager available in Wiki

Posted: Mon Sep 28, 2009 11:40 am
by jtpsoft
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

Re: New FMOD SoundManager available in Wiki

Posted: Mon Sep 28, 2009 11:51 am
by Muscleator
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
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.
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.

Re: New FMOD SoundManager available in Wiki

Posted: Mon Sep 28, 2009 11:54 am
by Muscleator
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.

Re: New FMOD SoundManager available in Wiki

Posted: Fri Jun 04, 2010 12:22 pm
by jheld
I'm also getting this error in the ogre log (using Shaggoth):
20: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?).
setting up

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);
and at framestarted (doubt it matters but it's here for completion),

Code: Select all

		soundMgr->PlaySound(backgroundSound1, soundNode, &backgroundSoundChannel1);
		soundMgr->Set3DMinMaxDistance(backgroundSoundChannel1, 2.0, 50000.0);
		soundMgr->FrameStarted(soundNode, evt.timeSinceLastFrame);
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

Re: New FMOD SoundManager available in Wiki

Posted: Thu Jun 10, 2010 5:45 am
by jheld
the deafening sound of crickets. anyone? bueller?

Re: New FMOD SoundManager available in Wiki

Posted: Thu Jun 10, 2010 10:38 pm
by AntonTheManton
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.

Re: New FMOD SoundManager available in Wiki

Posted: Sat Jun 12, 2010 9:08 am
by Xplodwild
Also, I don't think it's needed to do PlaySound each frame, once suffice.

setFileSystem()

Posted: Tue Oct 19, 2010 5:14 pm
by stu4guvnor
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

Re: setFileSystem()

Posted: Sun Dec 26, 2010 9:25 pm
by Erebus
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);

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 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.

Re: New FMOD SoundManager available in Wiki

Posted: Fri Mar 25, 2011 5:49 pm
by lordmonkey
I get the same error. Hopefully somebody is going to fix this soon .... :(

Re: New FMOD SoundManager available in Wiki

Posted: Sat Mar 26, 2011 6:00 am
by Jabberwocky
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.

Re: New FMOD SoundManager available in Wiki

Posted: Sun Mar 27, 2011 3:15 pm
by lordmonkey
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 :

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;
EDIT: I have the solution now.
The problem was that i called the

Code: Select all

delete soundManagerPtr;
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 :
FMOD "playSound" is not a blocking operation, it will start playing the sound in another thread, then return.
Hope that it helps you guys with this problem

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
now it looks like this

Code: Select all

ResourceGroup* grp = getResourceGroup("Popular");// default General

Re: New FMOD SoundManager available in Wiki

Posted: Tue Apr 12, 2011 8:00 pm
by capnramses
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>

Re: New FMOD SoundManager available in Wiki

Posted: Sat Jun 18, 2011 9:45 am
by audiorausch
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...