diff --git a/code/__DEFINES/sound_defines.dm b/code/__DEFINES/sound_defines.dm index 954b83d60fd..9cb16278aae 100644 --- a/code/__DEFINES/sound_defines.dm +++ b/code/__DEFINES/sound_defines.dm @@ -11,13 +11,14 @@ #define CHANNEL_ASH_STORM 1015 #define CHANNEL_RADIO_NOISE 1014 // radio headset noise #define CHANNEL_BOSS_MUSIC 1013 +#define CHANNEL_GENERAL 1012 #define USER_VOLUME(M, C) M?.client?.prefs.get_channel_volume(C) //THIS SHOULD ALWAYS BE THE LOWEST ONE! //KEEP IT UPDATED -#define CHANNEL_HIGHEST_AVAILABLE 1012 +#define CHANNEL_HIGHEST_AVAILABLE 1011 #define MAX_INSTRUMENT_CHANNELS (128 * 6) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 9d93e81540f..c205f50fd88 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1965,6 +1965,8 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) */ /proc/get_channel_name(channel) switch(channel) + if(CHANNEL_GENERAL) + return "General Sounds" if(CHANNEL_LOBBYMUSIC) return "Lobby Music" if(CHANNEL_ADMIN) diff --git a/code/game/sound.dm b/code/game/sound.dm index edc0badf754..23bf98cae01 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -92,9 +92,6 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in S.channel = channel || SSsounds.random_available_channel() S.volume = vol - if(channel) - S.volume *= client.prefs.get_channel_volume(channel) - if(vary) if(frequency) S.frequency = frequency @@ -159,6 +156,10 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in S.echo[3] = 0 //Room setting, 0 means normal reverb S.echo[4] = 0 //RoomHF setting, 0 means normal reverb. + S.volume *= USER_VOLUME(src, CHANNEL_GENERAL) + if(channel) + S.volume *= USER_VOLUME(src, channel) + SEND_SOUND(src, S) /proc/sound_to_playing_players_on_station_level(soundin, volume = 100, vary = FALSE, frequency = 0, channel = 0, pressure_affected = FALSE, sound/S) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index ee6866635bf..9e45568ee41 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -71,6 +71,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts /// Volume mixer, indexed by channel as TEXT (numerical indexes will not work). Volume goes from 0 to 100. var/list/volume_mixer = list( + "1012" = 100, // CHANNEL_GENERAL //Note: This should stay on top because order in this list defines order of sliders in mixer's interface. "1024" = 100, // CHANNEL_LOBBYMUSIC "1023" = 100, // CHANNEL_ADMIN "1022" = 100, // CHANNEL_VOX