I am initializing FMOD with 32 channels and playing short samples (1 second) with the following "standard" code:
[code:24rhr7rq]result = system->init(32, FMOD_INIT_NORMAL , NULL);
result = system->playSound(FMOD_CHANNEL_FREE, grid[_sound], false, &channel);[/code:24rhr7rq]
It works as intended, but now I realized that when I have played 32 samples (not at the same time), only one sound can be played at a time. It looks like FMOD_CHANNEL_FREE behaves like an incremental counter and when it hits 32, it stays there, deallocating the last sound while it’s still playing to allocate the new one.
Do I have to remove sounds when they have stopped playing? How? I feel like I am missing something basic
(BTW: Is there a reference? I looked around but couldn’t find any official docs. Sorry for my googling-incompetence)
- Fumarmata asked 6 years ago
Virtual channels are cheap so there is no need t limit yourself to 32, and normal value for that would be something like 1024. The number of underlying real channels can be set using System::setSoftwareChannels, the default is 32.
Documentation can be found in your FMOD install directory. fmodex.chm is the API reference and there is also a getting start guide for each platform.
- Guest answered 6 years ago
I cannot explain the behavior that you’re seeing. Does the same behavior happen on the FMOD samples?
The documentation is a CHM, and is installed along with FMOD. If you’re on Windows, it’ll be on your start menu (on Windows Vista/7, just type in "fmod doc"). Not sure where it is on the other platforms.
- Adiss answered 6 years ago
Please login first to submit.