extern cvar_t v_flipped;
cvar_t snd_channellayout = {0, "snd_channellayout", "0", "channel layout. Can be 0 (auto - snd_restart needed), 1 (standard layout), or 2 (ALSA layout)"};
cvar_t snd_mutewhenidle = {CVAR_SAVE, "snd_mutewhenidle", "1", "whether to disable sound output when game window is inactive"};
+cvar_t snd_entchannel0volume = {CVAR_SAVE, "snd_entchannel0volume", "1", "volume multiplier of the auto-allocate entity channel"};
+cvar_t snd_entchannel1volume = {CVAR_SAVE, "snd_entchannel1volume", "1", "volume multiplier of the 1st entity channel"};
+cvar_t snd_entchannel2volume = {CVAR_SAVE, "snd_entchannel2volume", "1", "volume multiplier of the 2nd entity channel"};
+cvar_t snd_entchannel3volume = {CVAR_SAVE, "snd_entchannel3volume", "1", "volume multiplier of the 3rd entity channel"};
+cvar_t snd_entchannel4volume = {CVAR_SAVE, "snd_entchannel4volume", "1", "volume multiplier of the 4th entity channel"};
+cvar_t snd_entchannel5volume = {CVAR_SAVE, "snd_entchannel5volume", "1", "volume multiplier of the 5th entity channel"};
+cvar_t snd_entchannel6volume = {CVAR_SAVE, "snd_entchannel6volume", "1", "volume multiplier of the 6th entity channel"};
+cvar_t snd_entchannel7volume = {CVAR_SAVE, "snd_entchannel7volume", "1", "volume multiplier of the 7th entity channel"};
// Local cvars
static cvar_t nosound = {0, "nosound", "0", "disables sound"};
Cvar_RegisterVariable(&volume);
Cvar_RegisterVariable(&bgmvolume);
Cvar_RegisterVariable(&snd_staticvolume);
+ Cvar_RegisterVariable(&snd_entchannel0volume);
+ Cvar_RegisterVariable(&snd_entchannel1volume);
+ Cvar_RegisterVariable(&snd_entchannel2volume);
+ Cvar_RegisterVariable(&snd_entchannel3volume);
+ Cvar_RegisterVariable(&snd_entchannel4volume);
+ Cvar_RegisterVariable(&snd_entchannel5volume);
+ Cvar_RegisterVariable(&snd_entchannel6volume);
+ Cvar_RegisterVariable(&snd_entchannel7volume);
Cvar_RegisterVariable(&snd_speed);
Cvar_RegisterVariable(&snd_width);
}
mastervol = ch->master_vol;
+
// Adjust volume of static sounds
if (isstatic)
mastervol *= snd_staticvolume.value;
+ else if(!(ch->flags & CHANNELFLAG_FULLVOLUME)) // same as SND_PaintChannel uses
+ {
+ switch(ch->entchannel)
+ {
+ case 0: mastervol *= snd_entchannel0volume.value; break;
+ case 1: mastervol *= snd_entchannel1volume.value; break;
+ case 2: mastervol *= snd_entchannel2volume.value; break;
+ case 3: mastervol *= snd_entchannel3volume.value; break;
+ case 4: mastervol *= snd_entchannel4volume.value; break;
+ case 5: mastervol *= snd_entchannel5volume.value; break;
+ case 6: mastervol *= snd_entchannel6volume.value; break;
+ case 7: mastervol *= snd_entchannel7volume.value; break;
+ default: break;
+ }
+ }
// anything coming from the view entity will always be full volume
// LordHavoc: make sounds with ATTN_NONE have no spatialization