notadoctor99 / winaudioplugin

A Loupedeck plugin that adds features missing from the Loupedeck "Volume Mixer" control center
MIT License
1 stars 3 forks source link

Refactored to support both input and output devices #4

Open swemoney opened 8 months ago

swemoney commented 8 months ago

Adding support for input devices turned out to just be a change from passing DataFlow.Render to DataFlow.Capture to the MMDeviceEnumerator. I pretty much just renamed the OutputDevice class to AudioDevice and added a DataFlow property you can pass to the constructor so you can create a list of either output or input devices depending on which DataFlow you pass in. The input actions are mostly copied from the output actions with some changes to adapt to the new universal class.

I also needed to add an extra indicator to the icon to specify if that button was an output device or input device. Since I was doing that, it felt like the default selected device checkmark worked better as small image instead of a full icon size.

Was my first time working with a LoupeDeck plugin so hopefully it all looks alright.