I suppose this might be a fairly basic question, but I’m going to ask it anyway. I am looking at creating an app that loads and initializes a sound in one view controller and then lets the user add effects in another. I’m sure that there are probably multiple ways of doing this, but I’d like to know if folks here have any particular recommendations. For example:
[list:1laexep9]Should I declare the sound class in the AppDelegate and pass it to the View Controller A and then subsequently Controller B?
Should I declare the sound class in the AppDelegate and reference the AppDelegate class from the View Controllers?
Should I declare the sound class in View Controller A and then pass it to View Controller B?[/list:u:1laexep9]
Thanks for all the help in advance.
- CuriousG asked 9 years ago
Welcome to the forums George.
It’s not easy to say how your application should implement FMOD without knowing the details of your application. I can give you a quick overview of how FMOD works and that might help you decide for yourself. There is two APIs, the low-level system and the event-system. If you’re just playing sounds and adding effects the low-level should suit your needs. There is the FMOD::Sound class which corresponds to one sound file on disk. To play a Sound you call System::playSound passing in a FMOD::Channel to play that sound on. This ‘Channel’ class is the handle for the playing instance of a Sound and you can add effects to the channel. You cannot add an effects to an instance of the Sound class, only to channels/channelgroups.
There are quite a few examples that ship with the API that you can look at to get familiar with FMOD.
- Guest answered 9 years ago
My app basically would play a song (mp3 file about 5 minutes long) in one view and apply effects in another view. I assume that the low-level system will still suit my needs? I’ve taken a look at the "filecallbacks" example (which uses playSound). I am thinking that I could pass the channel back between the views (as opposed to the sound) and add the effects to the channel in the second view. I think the "submixing" example might be good for that. Thanks!
- CuriousG answered 9 years ago
Please login first to submit.