islandmagic / varanny

Launcher for VARA modem
MIT License
21 stars 2 forks source link

feat: added control over matching audio interfaces #10

Closed jordanh closed 10 months ago

jordanh commented 10 months ago

When testing on multiple Linux systems, I found I wanted to make the fuzzy match threshold configurable at runtime. While I was making these changes, I also thought it could be a nice idea to add a way to just go ahead and assert what the audio input device name is for a given modem, and ignore what VARA has to say. I like that varanny's default behavior is to auto-detect it from the .ini file, but having an override it is a nice fallback.

While adding these updates, I also updated the ergonomics of the fuzzy match threshold and fixed some lint.

* Added "AudioInputNameThreshold" to config
   * Similarity normalized so "0" means no match, and "1" means
     strings are identical
* Added "AudioInputName" to modem section to assert audio device
  input name if for whatever reason fuzzy matching should fail
* Changed Delay configuration such that it can be set to 0 in
  the config (start with no delay)
jordanh commented 10 months ago

Updated PR now that #9 has been merged

georges commented 10 months ago

Thanks for this contribution Jordan. I realize the startup delay is a bit jank. Ultimately it should be replaced with a configuration parameter of what network interface varanny should bind to. It can then wait until a hotspot network gets setup, which on Windows takes place shortly after windows login and therefore can create a race condition with varanny. Something to put on "the list" :)