Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to Shadowx93ca, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

12

Cobalt

26

Turquoise

7

Cyan

9

Royal

5

Teal

3

Onliners

34 secs

Windawz

5 mins

Solokiller

10 mins

Admer456

23 mins

Instant Mix

28 mins

Striker

29 mins

MistaX88

30 mins

The Mad Carrot

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

maximum number of ambient_generic?

[1]

Forums > HL Engine Discussion

17 May 17, 14:33
By Dallas
avatar
Member
Does anyone know the maximum number of ambient_generics that can be playing at once AND be audible by the player?

Can the player, say, hear 10 different .wav sounds, or will only a few of them be played and some be culled or inaudible?

Are the rules different if some of the ambient_generics are playing the same .wav?

Thanks for any input.
17 May 17, 15:34
By Solokiller
avatar
Member
There are 128 "channels" that all per-entity audio plays on. Whenever an entity plays a sound, it will use a channel, so up to 128 sounds can be playing at any time, excluding music started using the cdaudio entities and player voice.

If you see this message in the console with developer set to 2 or higher, you'll know you've exceeded the total number of concurrent sounds:
Quote:

total_channels == MAX_CHANNELS
17 May 17, 18:07
By Bruce
avatar
Member
Yeah... when you have a dm with 10 or 20 players in a small map, all the footsteps, shots, explosions, snarks can easily add up to a 100 at once
18 May 17, 09:42
By Dallas
avatar
Member
Just the information I needed, thank you.

Is there a console command that lists or dumps the value of the current number of used channels?

i.e. is there a way to check how many channels you are using in game to then know how much headroom you have to work with?
18 May 17, 10:20
By Solokiller
avatar
Member
The soundinfo command prints current sound info to the console ("total channels" is the current number of active channels), setting s_show to 1 and running a server with maxplayers 2 or fewer prints up to 32 sounds on the right hand side of the screen.

Note that there are always 12 active channels from what i can tell, those are special ones.

The first 4 are ambient sounds (seems to be obsolete from Quake, used to be defined in BSPs but never read), then there are 8 dynamic channels. A comment from WinQuake explains this:
Quote:

0 to MAX_DYNAMIC_CHANNELS-1 = normal entity sounds
MAX_DYNAMIC_CHANNELS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS -1 = water, etc
MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS to total_channels = static sounds


It's actually 0 to NUM_AMBIENTS - 1, then NUM_AMBIENTS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS - 1, then NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS to total_channels.

ambient_generic plays static sounds, so there are 128 - 12 = 116 static channels available.
[1]

Forums > HL Engine Discussion

Login to Reply

You must be logged in to reply.