We are relatively new to FMOD so please bare with the noob questions.
We are using the FMOD Designer to create events. Wonderful tool. Makes life very easy. However, I ran into a delima and I am not sure how to go about it.
Our project is a "space game". There are many space ships (players). The only persistant sound that each ship will emit is an "engine" sound. I am not sure how to assign a unique [i:1to7wbsc]channel[/i:1to7wbsc] to each ship so that I can update their position in the audio lib using the FMOD Designer and Events. So, I thought I could create a channel for each instance (player) and then use the [i:1to7wbsc]Sound[/i:1to7wbsc] from the [i:1to7wbsc]Engine Event[/i:1to7wbsc] thus allowing me to [i:1to7wbsc]position[/i:1to7wbsc] that channel. My delima is how do I get the sound? I don’t want to hard code the sound file into the application, I want to use the FMOD Designer so that if our media person changes the audio file, it’s reflected in the application.
It would be nice to have: FMOD::Event:getSound()
BTW, am I doing this correctly? is there a better way? I guess what I am trying to ask is, how do you assign an event to multiple instances and be able to control those instances individually (i.e. update their position for example)?
- Van asked 11 years ago
AH HA.. I found it. Just was not the name I was expecting:
OK, other question still pending:
Using the FMOD Designer, how do you assign an event to multiple instances and be able to control those instances individually (i.e. update their position for example)?
Back to my "space ships". I want to assign a persisitant channel (a channel that replays the engine sound over and over) and be able to update that audio’s instances position?
every time you call getEvent, it creates a new instance for you. You have to make sure in fmod designer the ‘max instances’ is set to the appropriate maximum number of times you want the event to be played simultaneously.
Dont set this too high though, as this number is used to pre-allocate memory for the instances, and just setting it to a very high number would waste memory.
Event::getSound wouldn’t make sense by the way, as an event could have many sounds playing at once.
Thank you brett..
However, is there a way to attach an Event to a game object so that Instance (Event Instance) can be moved about in 3D space? Basically, it’s a space ship with an engine noise that is set to "replay". I want to position it and then turn off (stop) the audio when the player leaves the session.
OK, so that I understand this:
Using the EVENT system, if I want to attach an event to an object then I use the getEvent() and store the FMOD::Event pointer. This is similar to maintaining a handle to an FMOD::Channel.
The FMOD::Event::start() always fails for 3D sounds with NOT SUPPORTED. Is this to be exepected?
Does [i:3d1p5i13]Event::stop()[/i:3d1p5i13] release the event and free the Event for future use (i.e. just like when an FMOD::Channel stops playing?)? In other words, if the owner of the event wants the event to stop playing but retain a valid Event pointer/instances, should it use stop or pause?
I am updating the 3D position of these events successfully (i.e. FMOD_OK ) however the sounds are not playing. Am I missing something? Event is not paused and I am forcing the volume to 1.0.
I am updating the 3D position of these events successfully (i.e. FMOD_OK ) however the sounds are not playing. Am I missing something? Event is not paused and I am forcing the volume to 1.0. [/quote:11tg4jsb]
Well, we finnaly got it to work. The [i:11tg4jsb]logarithmic[/i:11tg4jsb] rolloff doesn’t appear to work at all. We have to use [i:11tg4jsb]linear[/i:11tg4jsb]. I have tested it on several systems and it just doens’t work. What’s odd is that the demo works fine and we used the demo as our model in our application. The only thing we can find different between the demo and our application is that we use a large number of sounds and each 3D sound has a pool of anywhere from 4 to 50 instances.
Please login first to submit.