internal void FireNotification(AudioVolumeNotificationData NotificationData) { AudioEndpointVolumeNotificationDelegate del = OnVolumeNotification; if (del != null) { del(NotificationData); } }
internal void FireNotification(AudioVolumeNotificationData notificationData) { AudioEndpointVolumeNotificationDelegate onVolumeNotification = this.OnVolumeNotification; if (onVolumeNotification != null) { onVolumeNotification(notificationData); } }
public AudioManager() { Console.WriteLine("Initializing audio sessions"); DevEnum = new MMDeviceEnumerator(); device = DevEnum.GetDefaultAudioEndpoint(CoreAudio.EDataFlow.eRender, CoreAudio.ERole.eMultimedia); populateAudioSessions(device); masterVolumeChangedDelegate = new AudioEndpointVolumeNotificationDelegate(HandleMasterVolumeChanged); device.AudioEndpointVolume.OnVolumeNotification += masterVolumeChangedDelegate; sessionCreatedDelegate = new AudioSessionManager2.SessionCreatedDelegate(HandleSessionCreated); device.AudioSessionManager2.OnSessionCreated += sessionCreatedDelegate; Console.Write("\n"); }