I’ve finally gotten used to using FMOD and it’s surprisingly easy considering how powerful it is. Great stuff. Only problem so far is that I’ve moved to using MSVC++ since dev-C++ was too much hassle. However, I have questions on organising the way FMOD is used.
I’m working on an MP3 player in C++.
1) When I initialise my system, will I ever need more than 1 channel (seeing as this is an mp3 player)? Is it good practise to set an arbitary high amount for the maximum number of channels, or does this cause unneccessary overhead?
2) How should I be organising my files in an event-driven system (using the form designer). Should I create my own functions that encapsulate the FMOD functions. So "playSound" will sort out all channels etc… . These functions are stored in header files I’ve created. Then when the user presses the play button, the playSound function is called. Is this good practise, or is there another (more efficient?) way of going about this?
3) By using MSVC++, can I not compile for platforms other than Windows?
Thanks in advance, for the help.
- wxLyrical++ asked 11 years ago
Thanks Adiss. I noticed the stickied post, but getting dev C++ to work seemed like it’s more hassle than it’s worth at the moment. Once I get everything working in VC++, then I’ll move over to compile for multiplatforms.
Thanks again 8)
- wxLyrical++ answered 11 years ago
1) You may actually want more than one channel – if, for example, you do any sort of crossfading, you’ll want to have both sounds playing at once. That said, for an MP3 player, your channel count can be very low. As far as I know, there’s little to no performance overhead for non-playing channels, no matter how many you indicate at startup. You will, however, have a memory cost with more playing channels.
2) I’ve found that encapsulating FMOD’s functions with your own interface makes it easier to integrate. It lets you centralize all of your audio code, and perform more complex functions (such as the aforementioned crossfading) with a single function call.
3) Visual C++ will probably let you compile for Win64 and Win32, but other platforms are usually not supported. To compile for other platforms, you’ll end up having to use a different compiler. If you want to do that, note the thread that’s stickied at the top of this forum ("BCB6 C++ / Dev c++ / MinGW linker issues").
Hope that helps,
- Adiss answered 11 years ago
Please login first to submit.