Esempio n. 1
0
 internal void FireNotification(AudioVolumeNotificationData NotificationData)
 {
     AudioEndpointVolumeNotificationDelegate del = OnVolumeNotification;
     if (del != null)
     {
         del(NotificationData);
     }
 }
Esempio n. 2
0
        internal void FireNotification(AudioVolumeNotificationData notificationData)
        {
            AudioEndpointVolumeNotificationDelegate onVolumeNotification = this.OnVolumeNotification;

            if (onVolumeNotification != null)
            {
                onVolumeNotification(notificationData);
            }
        }
Esempio n. 3
0
        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");
        }