antonpup / Aurora

Unified lighting effects across multiple brands and various games.
http://www.project-aurora.com/
MIT License
1.83k stars 365 forks source link

Nahimic service prevents audio visualizer from capturing audio #1487

Open srodriguez1850 opened 5 years ago

srodriguez1850 commented 5 years ago

File this under cant fix, logging it for posterity. TL;DR: Nahimic sucks, prevents capturing audio. Kill related processes to fix.

References #875, maybe #1315.

Explanation

Realtek HD Audio Drivers (particularly in MSI/ASUS products) sometimes include Nahimic DLLs for audio enhancing. It's used by Sonic Studio. If an audio visualizer layer is active, when an audio device running these drivers is set as the current, Aurora tries to change to the device and start recording through NAudio.

https://github.com/antonpup/Aurora/blob/e76b1761d6c0c642ebeec49b33f3ff049b7ebd32/Project-Aurora/Project-Aurora/Settings/Layers/EqualizerLayerHandler.cs#L178-L182

NAudio throws an exception out trying to record the loopback stream (it goes through their exception wrapper, only returning "HRESULT 0x88890008"), because Nahimic service... well, does something to prevent capture of the loopback. Because NAudio is unable to handle the exception due to Nahimic, it can't be fixed within Aurora (unless Nahimic fixes up their software).

Workaround

You can kill the following 3 processes in the Task Manager:

image

Additionally, you can either stop or prevent the Nahimic service from running in the Services (services.msc) window. This should allow Aurora to record the stream through NAudio without issues, possibly after restarting Aurora.

On a sidenote, Nahimic also causes some games that use a 7.1 surround sound engine to crash.

NicTanghe commented 4 years ago

Hello i`m nic and i came here to state that i whould strongly prefer a workaround that allows me to use my on laptop lighting asswell as my keyboard lighting.

Bobby20288 commented 2 years ago

Just accidentally seeing this thread and wonder if u found the way to fix this problem? u can try to update Sonic Studio into the latest version and ur Audio driver to see if it work