naudio / NAudio

Audio and MIDI library for .NET
MIT License
5.37k stars 1.09k forks source link

IAudioSessionEventsHandler.OnStateChanged not firing when used inside windows service c# #1148

Open rydenlabs opened 2 months ago

rydenlabs commented 2 months ago

Hi, Can someone please help here! I am trying to use IAudioSessionEventsHandler.OnStateChanged on audio devices attached. This method fires and works fine when I use it in console application/wpf application but the same code does not work when I use it in windows service.

Is there a restriction in NAudio libraries when it comes to windows service application? If not what am I missing?