I’m working on a project to replace the sound engine in Half-Life 1. Half-Life 1 allocates 6 sound channels per game entity. There can be up to 1024 game entities in a level.
6 channels * 1024 entites = 6144 individual channels.
I figured FMOD Ex’s virtual voices feature would be very helpful with this, but apparently I can’t initialize 6144 virtual voices.
FMOD spits out error #53. ( FMOD_ERR_OUTPUT_INIT )
I’m running on an Audigy 1 Sound Card.
In Half-Life 1, the sound channels are as follows:
define CHAN_WEAPON 1
define CHAN_VOICE 2
define CHAN_ITEM 3
define CHAN_BODY 4
define CHAN_STREAM 5 // allocate stream channel from the static or dynamic area
define CHAN_STATIC 6 // allocate channel from the static area
A soldier could be firing a gun (CHAN_WEAPON), while simultaneously yelling a phrase at the player (CHAN_VOICE).
If I’m not able to guarantee 6 channels per entity, I’m in serious trouble.
I’m not sure what I should do. Help?
- SCSniper asked 10 years ago
So, I’ll have to tag each channel for a specific entity.
That gets kind of tricky though, doesn’t it?
If a sound stops playing, and I have a call to "update" the channel for that sound with a sound effect or such, a new sound effect for a different creature could be playing on the channel I saved a pointer to.
Hmm.. oh… or I could just simply update the list of pointers to the sound channels when a new sound is played. Ahh.
and if your channel stopped then you could nullify out the handle in the entity so that it doesnt call your update at all (i assume 3d position etc).
If you update a handle that is stopped, nothing bad will happen anyway, it may just be a bit wasteful.
FMOD reference counts handles, so even if your handle is reused by another entity, and your old stopped entity tries to update, it will just be ignored.
Please login first to submit.