Пример #1
0
        static void Main()
        {
            foreach (var dev in DirectSoundOut.Devices)
            {
                Console.WriteLine($"{dev.Guid} {dev.ModuleName} {dev.Description}");
            }

            notificationClient = new NotificationClientImplementation();
            notificationClient.setMonitorDeviceId("{0.0.0.00000000}.{299801a3-11d5-4ae6-a926-0362223cebba}");
            notifyClient = (NAudio.CoreAudioApi.Interfaces.IMMNotificationClient)notificationClient;
            deviceEnum.RegisterEndpointNotificationCallback(notifyClient);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new HeadphoneDaemon(notificationClient));
        }
Пример #2
0
 public HeadphoneDaemon(NotificationClientImplementation client)
 {
     InitializeComponent();
     notificationClient = client;
 }