naudio / NAudio

Audio and MIDI library for .NET
MIT License
5.58k stars 1.1k forks source link

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

Open rydenlabs opened 7 months ago

rydenlabs commented 7 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?

uzairali001 commented 4 months ago

I'm running into the same problem. Were you able to fix it?

DavidGitter commented 4 months ago

Hi, i have the same problem when using the AudioSessionManager.OnSessionCreated callback. A fix would be highly appreciated.

rydenlabs commented 4 months ago

We couldn't figure it out yet, had to move this feature to client end temporarily :(