SamDel/ChromeCast-Desktop-Audio-Streamer

Can't set default audio source

Closed this issue · 14 comments

The computer with DAS has two audio outputs, one of them the HDMI to the stereo amp and the other is the Oculus headphone driver.

Whenever I go to start DAS, I find that it has defaulted to the headphones as the output. I've set the amp as the default in Windows, but DAS doesn't seem to recognize it.

So far, the only way I can consistently have the amp as the audio source is to disable the Oculus headphone driver.

Is there some way to explicitly set the order of priority for audio sources, or to force DAS to recognize the windows audio default device settings?

Thanks

The behaviour should be:

  • At first launch the application lists all audio devices, and selects the default (from the sound control panel) rendering device.
  • All next launches the application should select the previous selected audio device (if it still exists).

It looks like saving and/or loading the settings goes wrong on your system.

Can you check if the config file exists? It should be here:
C:\Users\<username>\AppData\Local\ChromeCast\ChromeCast.Desktop.AudioS_<random>\<version you use>\user.config

If so, can you check if the field 'RecordingDeviceID' has a value?
And check if this value changes when you start the application, select another recording device, and close the application?

Thanks!

The more general fix seems like it would be to make DAS re-evaluate what is the "default" audio device each time that windows changes the audio device, rather than just once at startup.

The application polls for new audio devices every 15 seconds. In Setup 3.5.1.zip I changed: When the recording device that was selected in the previous run becomes available after you launch the application the application selects that device.

Hope it works for you!?

Thank you. In Setup 3.5.2.zip DAS really re-evaluates the default recording device when the default device in Windows changes. DAS selects the new default device in the recording device dropdown automatically (maybe an option should be added?) within 15 seconds. Does it work for you?

Nice, thank you! It will also be in version 3.6 (when released).

Not sure if commenting here will re-open the issue, but I guess we'll see..

The issue described in the original thread has recurred, though in a slightly different form. The app now seems to prefer to connect to my webcam microphone as an input source, but I want it to use my computer's audio output as its input.

I change it to the preferred setting, but it keeps changing back, every time I switch inputs via my amp.

This was working fine for quite a while after v3.6. I'm not sure but I think the behavior changed with v3.9.

There haven't been any changes in this part as far as I can see.

Does the recording device revert right away when you change it?
If so, is there a line in the log? (like 'Error initializing the recording device: ...')

Sorry for the delay.

For context, there are four audio sources. See image.
Desktop Audio Streamer sources 1

  1. Webcam microphone
  2. Headphones ("HyperX Cloud Flight")
  3. Monitor speakers ("Acer T232HL")
  4. Surround sound amplifier ("Denon AVR")

However, only three of those should be available at any given time. When the amp is on, the Denon source should be active and the Acer source should be unavailable; when the amp is off, it should be the opposite.

What I've observed is that all four sources appear regardless of the system state. What I suspect is happening is that, upon switching the amp, the app is trying to reattach to a source that is no longer actually available, and winds up grabbing onto the webcam as a source instead.

Also worth noting: This is a different physical computer, though it is configured the same way as previously (I upgraded). However, I did not notice this happening upon the hardware switch; only later did it become apparent.

Does that provide any useful clues?

I think I understand. An item that was added to the recording devices list once, isn't removed when it becomes unavailable.

In 3.9.1 a recording device is removed from the list when it becomes unavailable. Does that solve your issue?

Sorry for the delayed response. I tried the new version and so far it is behaving as hoped. I'll let you know if that changes but I think you've got it fixed.

Thanks, I've created a new release: 4.0. I'm closing this one, feel free to reopen!