/* Adds an audio program to the Collection of active audio programs */ public void addAudioSession(AudioSession Session, Boolean rip) { lock (loadedAudioSessions) { loadedAudioSessions.Add(Session); if(!rip) { audioSessions.Add(Session.Process.ProcessName); } numOfSessions = loadedAudioSessions.Count; updateVolume(); } }
/* Remove an audio program from the program group */ public void removeAudioSession(AudioSession Session) { lock (loadedAudioSessions) { updateActiveSessions(); loadedAudioSessions.Remove(Session); getAudioSessions().Remove(Session.Process.ProcessName); numOfSessions = loadedAudioSessions.Count; } }