0
0

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?

  • You must to post comments
0
0

"Currently the maximum channel limit is 4093."

DOH :(

  • You must to post comments
0
0

hm thats a LOT of voices to be managing at once.
Are you sure they would even be playing simultanously? Remember the voices are for -playing- sounds. Are you going to have 6144 sounds playing at once?

  • You must to post comments
0
0

No, that many sounds wouldn’t be playing at the same time.

It’s more or less to reserve channels for each game entity.

I guess that isn’t the best route to take.

  • You must to post comments
0
0

I wouldn’t worry about it then, just use FMOD_CHANNEL_FREE and store the handle in your entity. Then you won’t have to worry about running out of voices.

  • You must to post comments
0
0

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. :)

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

Ahh, thanks for your time! That’s very helpful. 😉

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.