music-assistant / companion

Music Assistant Companion App
https://music-assistant.io/companion-app/
Apache License 2.0
28 stars 4 forks source link

feature request: let users configure the output device #19

Open Sirs0ri opened 6 months ago

Sirs0ri commented 6 months ago

Description: Squeezelite has the option to set a specific output device (through the -o flag, docs), and the option to list all available output devices through -l.

I have a GoXLR audio interface that creates multiple virtual audio devices on my PC (e.g. "music", "system", "chat", etc) so that I can then assign programs to one of these channels and control each channel's volume with a hardware slider on the device.

It would be great if I could set squeezelite to output to my "music" channel, instead of it using the system's default channel.

My system: Windows 10 MA Companion 0.0.25

donkeykong3x3 commented 6 months ago

I definitely agree, but in the mean time I believe you can change individual programs audio output. I don't remember the exact location in Windows 10, but in should be something like Setting > Sound > Advanced > Volume Mixer.

Sirs0ri commented 5 months ago

I'm aware of that workaround, but it doesn't seem to work for me unfortunately - it'll always use the default sound device, instead of the one I picked for it. Since that seems to be a bug I've opened an issue in the squeezelite project for it: ralph-irving/squeezelite#198

arctixdev commented 5 months ago

You should now be able to select output device in the new update :smile:

Sirs0ri commented 5 months ago

Whoa, that was quick, thanks!

Some small feedback: The dropdown in the settings isn't getting populated for me, it only shows "default" as the only option. I had to reinstall the app to set the default device through the first-run wizard

The dropdown in the first-run wizard only showed the outputs' numbers, which in my case got a little cluttered. Would it be possible to include the device names as well? grafik

And a bigger issue: squeezelite won't start anymore on 0.0.28 😅 The app starts fine, but taskmanager doesn't show a squeezelite subprocess, and I can't stream music to my PC, it'll show up as "idle" in music assistant. The "Launch squeezelite" setting is on.

I'm not sure how I'd see any error messages, I'd love to send you a log otherwise.

arctixdev commented 5 months ago

Yeah sorry fixed in new version

arctixdev commented 5 months ago

It was a silly mistake on my end. About the list of output devices I currently just set it up to show the ones listed by squeezelite -l But i have to do some magic to parse the output to a list of strings and it might be different output on windows?

Could you maybe post the output of squeezelite -l on your system?

Sirs0ri commented 4 months ago

Hey, sorry for the long wait, I totally missed your last message! I just updated to .33 and noticed that the option's working (although the dropdown in the settings still shows "default", but that's just a visual error), thanks a lot!

Here's the output you asked for:

PS C:\Program Files\Music Assistant Companion> .\squeezelite.exe -l
Output devices:
  5 - Microsoft Sound Mapper - Output [MME]
  6 - System (3- TC-HELICON GoXLR Min [MME]
  7 - Digitalaudio (S/PDIF) (High Def [MME]
  8 - Music (3- TC-HELICON GoXLR Mini [MME]
  9 - Chat (3- TC-HELICON GoXLR Mini) [MME]
  10 - Game (3- TC-HELICON GoXLR Mini) [MME]
  11 - Sample (3- TC-HELICON GoXLR Min [MME]
  17 - Primärer Soundtreiber [Windows DirectSound]
  18 - System (3- TC-HELICON GoXLR Mini) [Windows DirectSound]
  19 - Digitalaudio (S/PDIF) (High Definition Audio Device) [Windows DirectSound]
  20 - Music (3- TC-HELICON GoXLR Mini) [Windows DirectSound]
  21 - Chat (3- TC-HELICON GoXLR Mini) [Windows DirectSound]
  22 - Game (3- TC-HELICON GoXLR Mini) [Windows DirectSound]
  23 - Sample (3- TC-HELICON GoXLR Mini) [Windows DirectSound]
  24 - GoXLR ASIO Driver [ASIO]
  25 - Digitalaudio (S/PDIF) (High Definition Audio Device) [Windows WASAPI]
  26 - Music (3- TC-HELICON GoXLR Mini) [Windows WASAPI]
  27 - Chat (3- TC-HELICON GoXLR Mini) [Windows WASAPI]
  28 - Game (3- TC-HELICON GoXLR Mini) [Windows WASAPI]
  29 - System (3- TC-HELICON GoXLR Mini) [Windows WASAPI]
  30 - Sample (3- TC-HELICON GoXLR Mini) [Windows WASAPI]
  42 - Game (Game) [Windows WDM-KS]
  43 - Music (Music) [Windows WDM-KS]
  46 - System (System) [Windows WDM-KS]
  47 - Chat (Chat) [Windows WDM-KS]
  48 - Sample (Sample) [Windows WDM-KS]
  50 - SPDIF Out (HD Audio SPDIF out) [Windows WDM-KS]
  51 - Output (NVIDIA High Definition Audio) [Windows WDM-KS]
  52 - Output () [Windows WDM-KS]
JeffersonBledsoe commented 4 months ago

Here's an output from the macOS squeezelite binary incase it's any use for this:

❯ ./squeezelite-x86_64-apple-darwin -l
Output devices:
  1 - Built-in Output [Core Audio]
  2 - DisplayPort [Core Audio]
  3 - Jabra Link 370 [Core Audio]
cociweb commented 3 months ago
$ squeezelite -l
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  default                        - Playback/recording through the PulseAudio sound server
  samplerate                     - Rate Converter Plugin Using Samplerate Library
  speexrate                      - Rate Converter Plugin Using Speex Resampler
  jack                           - JACK Audio Connection Kit
  oss                            - Open Sound System
  pulse                          - PulseAudio Sound Server
  upmix                          - Plugin for channel upmix (4,6,8)
  vdownmix                       - Plugin for channel downmix (stereo) with a simple spacialization
  hw:CARD=PCH,DEV=0              - HDA Intel PCH, ALC257 Analog - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=3              - HDA Intel PCH, HDMI 0 - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=7              - HDA Intel PCH, HDMI 1 - Direct hardware device without any conversions
  hw:CARD=PCH,DEV=8              - HDA Intel PCH, HDMI 2 - Direct hardware device without any conversions
  plughw:CARD=PCH,DEV=0          - HDA Intel PCH, ALC257 Analog - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=3          - HDA Intel PCH, HDMI 0 - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=7          - HDA Intel PCH, HDMI 1 - Hardware device with all software conversions
  plughw:CARD=PCH,DEV=8          - HDA Intel PCH, HDMI 2 - Hardware device with all software conversions
  sysdefault:CARD=PCH            - HDA Intel PCH, ALC257 Analog - Default Audio Device
  front:CARD=PCH,DEV=0           - HDA Intel PCH, ALC257 Analog - Front output / input
  surround21:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 2.1 Surround output to Front and Subwoofer speakers
  surround40:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 4.0 Surround output to Front and Rear speakers
  surround41:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=PCH,DEV=0      - HDA Intel PCH, ALC257 Analog - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  hdmi:CARD=PCH,DEV=0            - HDA Intel PCH, HDMI 0 - HDMI Audio Output
  hdmi:CARD=PCH,DEV=1            - HDA Intel PCH, HDMI 1 - HDMI Audio Output
  hdmi:CARD=PCH,DEV=2            - HDA Intel PCH, HDMI 2 - HDMI Audio Output
  dmix:CARD=PCH,DEV=0            - HDA Intel PCH, ALC257 Analog - Direct sample mixing device
  dmix:CARD=PCH,DEV=3            - HDA Intel PCH, HDMI 0 - Direct sample mixing device
  dmix:CARD=PCH,DEV=7            - HDA Intel PCH, HDMI 1 - Direct sample mixing device
  dmix:CARD=PCH,DEV=8            - HDA Intel PCH, HDMI 2 - Direct sample mixing device
  dsnoop:CARD=PCH,DEV=0          - HDA Intel PCH, ALC257 Analog - Direct sample snooping device
  usbstream:CARD=PCH             - HDA Intel PCH - USB Stream Output
  hw:CARD=J40,DEV=0              - Jabra Evolve2 40, USB Audio - Direct hardware device without any conversions
  plughw:CARD=J40,DEV=0          - Jabra Evolve2 40, USB Audio - Hardware device with all software conversions
  sysdefault:CARD=J40            - Jabra Evolve2 40, USB Audio - Default Audio Device
  front:CARD=J40,DEV=0           - Jabra Evolve2 40, USB Audio - Front output / input
  surround21:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 2.1 Surround output to Front and Subwoofer speakers
  surround40:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 4.0 Surround output to Front and Rear speakers
  surround41:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=J40,DEV=0      - Jabra Evolve2 40, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  iec958:CARD=J40,DEV=0          - Jabra Evolve2 40, USB Audio - IEC958 (S/PDIF) Digital Audio Output
  dmix:CARD=J40,DEV=0            - Jabra Evolve2 40, USB Audio - Direct sample mixing device
  dsnoop:CARD=J40,DEV=0          - Jabra Evolve2 40, USB Audio - Direct sample snooping device
  usbstream:CARD=J40             - Jabra Evolve2 40 - USB Stream Output

The last section (namelly CARD=J40 - Jabra Evolve2 40) is not listed in my dropdown at the "default login screen" in v0.0.33. If I navigate to the settings->client then it is listed there.

Additionally, it would be nice, if the dropdown shows the name of the device instead the id of it.

Unfortunatelly the test is failed, because a restart is required after selecting another device. After the restart the command returns the -o null device with high cpu usage instead of the selected one. In this case the settings in the client tab shows wrongly default (instead of the wrong 'null' device) image

cociweb commented 3 weeks ago

The last section (namelly CARD=J40 - Jabra Evolve2 40) is not listed in my dropdown at the "default login screen" in v0.0.33. If I navigate to the settings->client then it is listed there.

Additionally, it would be nice, if the dropdown shows the name of the device instead the id of it.

Unfortunatelly the test is failed, because a restart is required after selecting another device. After the restart the command returns the -o null device with high cpu usage instead of the selected one. In this case the settings in the client tab shows wrongly default (instead of the wrong 'null' device) image

All of my issues are resolved related to this feature request. Tested with the latest deb version of v0.0.65 on Ubuntu 22.04.

(As a secondary glitch, still the 'id' is visible in the dropdown list, instead of the name of the device. But I don't know is it a good or bad behavior.... since the name can be a very long string and maybe it can happen that the differences can not be visible / remains to recognize it to hard. - so let's say, it works as intended.)

On ubuntu: image