I recently started out with Fmod and I am using it to add Audio to a game engine.
I have a question which may be very basic but I would like it cleared out if possible.
What is the relation between channels and sounds? From what I understand a channel may have more than one sounds playing simultaneously, is that right or am I way off? If so, how many sounds fit in a channel? Is there a good programming practice for using channels, like having a different one for each sound or something?
Thank you in advance and sorry If that has already been answered, I did a mini search but did not come across it.
- parantox asked 6 years ago
Hi parantox, welcome to the FMOD Forum.
A Sound corresponds to sound data whereas a Channel is just a handle to a playing sound. Normally the relationship between Channels and Sounds and many-to-one, except in the case of streaming sounds where it is one-to-one.
In the case of CREATE_SAMPLE or CREATE_COMPRESSEDSAMPLE the sound is loaded into memory and it can be reused by many channels, but for CREATE_STREAM the Sound contains a file position and a stream buffer so there cannot be multiple channels playing a single stream.
Out of interest have you considered integrating the FMOD Designer API into your engine instead of the FMOD Ex low level API?
Thanks for the quick response.
To answer your question, no I have not considered that. As I said I am just starting out with FMOD and I thought I’d start with the low level API.
I would like to dig into the Designer too when I have more time. Is that what’s used more in game engines? Or is there a combination of the two?
FMOD Designer API is built on top of the FMOD API. You [i:kz8kh98g]can[/i:kz8kh98g] use both together and particularly for more advanced functionality. The designer API is a higher level API so it should be less work to get a basic integration up and running. It also allows sound designers to use our sound design tool, which puts more power in their hands without having to involve the programmer as much. If you’re using both it’s generally best to integrate Designer API first and then integrate parts of the FMOD Ex API to add the extra features you need.
[quote:kz8kh98g]Is that what’s used more in game engines? Or is there a combination of the two?[/quote:kz8kh98g]
It really depends on the time/resources you have and the requirements. For example CryEngine uses FMOD Designer whereas Unity uses FMOD Ex. CryEngine ships with a copy of FMOD Designer and the sound designer spends the majority of their time using our tool. For Unity they want to give the user the ability to do everything in their editor without external tools so they use FMOD Ex which allows them full control over everything. If you integrate FMOD Designer we do a lot of the work for you and the sound designer has access to a lot of features, on the flip side you have less control over the user experience. FMOD Designer is a very mature piece of software which has been used in many AAA titles, so I would say it’s the way to go but it really depends on your priorities.
Please login first to submit.