lively icon indicating copy to clipboard operation
lively copied to clipboard

Audio API, select Device/get Input from all Devices

Open ob-julian opened this issue 2 years ago • 11 comments

I got a GoXLR as an Audio In/Output device The livelyAudioListener() seems only to send the Audio information of the system Standart Output. But I have separate Channels for Music and System (Standart)

So my Problem/Feature Request is that I can select a device from which the Audio Information is send So I can Visualise my Music (and not my system Sound (those are rather boring))

Alternatively, a function like livelyAllAudioListener() which gives an Array that contains all Sound that is produced by the System (so all Outputs mixed/combined)

ob-julian avatar Dec 10 '22 11:12 ob-julian

Its using default multimedia device which should work in most systems. I don't get the exact audio setup of your system; do you have multiple multimedia streams with different defaults? Try adjusting the system default settings maybe?

https://github.com/rocksdanister/lively/blob/0fc1b833abe3b2ed3d3e4dcf887d694b137a855d/src/Lively/Lively.PlayerWebView2/Services/AudioVisualizerService.cs#L54-L63

rocksdanister avatar Dec 11 '22 11:12 rocksdanister

image All those Outputs go into a Mini Mixer and from there it goes into my Headset. Via livelyAudioListener() I only get the "Audio Information" from System

ob-julian avatar Dec 11 '22 12:12 ob-julian

Because its set as the default (green check.) Set Music as default?

rocksdanister avatar Dec 11 '22 16:12 rocksdanister

Yes, if I select music as the default, it works, but I don't want to make it the default because I control the volume of each of the outputs individually via a mixer. To further iterate my Setpu: I route Spotify output to music and Discord output to chat and Game Sounds to Games. And everything I don't manually route uses System So setting Music as default defeats the purpose.

To explain my "feature request" in more detail: in the settings or something like a dropdown menu in which you can select which output livelyAudioListener() should listen to.

ob-julian avatar Dec 11 '22 17:12 ob-julian

Just found a workaround: Open "sound mixer options" via Windows search Set the Output Device for Lively manually. image

ob-julian avatar Dec 11 '22 17:12 ob-julian

I have a similar setup (instead of a GOXLR I use voicemeeter), this works... sometimes.

From my small testing using the AudiOrbits, Lively will work just fine when you set the output to be the only thing it's hearing, until you restart lively, in which case, it just forgets. This isn't an issue with my virtual cable (as Logitech Ghub is connected to the same thing and works consistently), and to jumpstart it you must change the input to something different and back again (in worst cases it won't acknowledge the change in input). I'm up for some mild code editing if its possible to manually change the input and have reliable connection

TLDR: Lively forgets the sound mixer output on launch

I'll update if I find another workaround

Disdaen avatar Mar 08 '23 00:03 Disdaen

Try setting the Output Device for the webpage wallpaper player also: <install_location>/Plugins/Cef/Lively.PlayerCefSharp.exe

rocksdanister avatar Mar 08 '23 01:03 rocksdanister

Sadly not straightforward, as far as I'm aware the windows audio preferences are for apps only, and also only apps that are emitting/using audio will appear on the list, so individual exe files aren't exactly prioritized. :/

Disdaen avatar Mar 08 '23 02:03 Disdaen

That's odd.. the webpage player is a separate application running on its own independent of Lively.

rocksdanister avatar Mar 08 '23 03:03 rocksdanister

Technically it is another app, but windows views it as part of the main one, just how you wouldn't have an app called crash handler because you installed steam.

Disdaen avatar Mar 08 '23 03:03 Disdaen

I also have this issue. I use multiple audio inputs/outputs and the WindowsDefault is not the one being used for music or similar. I've also used the per-application settings provided by windows to set the audio input of the LivelyCefSharp application. I noticed that this somehow only works with two monitors if I set the wallpaper to "Duplicate" or use only one monitor. When trying to set the input channel for both with seperate wallpapers only one reacts to the music, the other one will somehow listen on the default one.

Nevertheless, when restarting the application or connecting another monitor with the "Duplicate Wallpaper" option set, it doesn't utilise the audio channel set in settings - meaning it is set by windows but Lively doesn't use it for some odd reason. You'd have to set it to a different audio channel and back to the desired one in order for it to work which isn't optimal.

So yes, an option to listen on everything or an ability to consistently choose the audio channel would be very beneficial!

sirlupusdev avatar Apr 23 '23 10:04 sirlupusdev