Hi there! I develop under the Source Engine, and I created an ambient entity that utilizes FMOD’s 3D capabilities, since Source’s built in ambient_generic… Well, it sucks.
Basically I’m running into a problem where there’s a lot of sounds in a map, and each sound creates a channel for which to play on using FMOD_CHANNEL_FREE. After a certain amount of entities, or sounds, it seems they just stop playing. No more new sounds. It’s around the 40s, so I assume there’s a channel limit of 48 or something.
I was wondering if there’s any way to increase it or get around it.
This is the basic path that it follows:
result = GetMusicSystem()->GetSoundSystem()->createStream(szSound, FMOD_LOOP_NORMAL | FMOD_3D | FMOD_3D_LINEARROLLOFF, 0, &sound); result = GetMusicSystem()->GetSoundSystem()->playSound(FMOD_CHANNEL_FREE, sound, false, &channel);
These are the two main functions called with the exception of all the 3D logic and error checking. There’s no errors being outputted to the console. I’ve tried FMOD_CHANNEL_REUSE, and there’s no difference. For every instance of the entity there’s a new channel and sound created as part of a class. I just wonder if there’s a better way to go about this. Or if there’s a way to artificially increase the maximum amount of channels available. I’d greatly appreciate any help! Thanks!