Needless to say, this is problematic; if you want a particular sound to have an environment applied applied to it, you only want it to be for that particular instance of sound, and not all other sounds (or even future sounds).
/mob/proc/sound()
var/sound/S = sound('rawr.ogg')
S.environemnt = 10
src << S
/mob/proc/sound_2()
src << sound('rawr.ogg')
/mob/proc/play_two_sounds()
sound()
sound_2()
When play_two_sounds is called on a mob, you would expect the first case to apply a significant effect/reverb to the sound, but the second would be clean and crisp.
This isn't the case; both sounds will have the reverb applied, and all future sounds played will have the same environment set until you explicitly create a new sound and explicitly reset its environment.
Expanding on this further:
/mob/proc/sound()
var/sound/S = sound('rawr.ogg')
S.environemnt = 10
src << S
/mob/proc/sound_2()
src << sound('rawr.ogg')
/mob/proc/sound_3()
var/sound/S = sound('rawr.ogg')
S.environemnt = -1
src << S
/mob/proc/sound_4()
src << sound('rawr.ogg')
/mob/proc/play_four_sounds()
sound()
sound_2()
sound_3()
sound_4()
If play_four_sounds is called, the first sound will have reverb, the second will, as well, despite not having its enviornment variable set, the third one will sounds normal as it has has the environment set back to the default, and, of course, the fourth will also sound normal because the last sound to be played that had its enviornmental variable set was -1.
However it's worth a second look to see if maybe there's something wrong about the implementation that can be fixed. For all I know I'm mistaken and maybe it is possible to get the sound channels to handle this independently.