SamDel / ChromeCast-Desktop-Audio-Streamer

Stream the sound of your desktop to your Chromecast Audio device
MIT License
412 stars 30 forks source link

Command line or config to change sound source? #42

Closed OneBobone closed 4 years ago

OneBobone commented 5 years ago

Very interesting project! I am curious if there is a way to change the settings for the sound source more or less programatically? Also, would you kow if it is possible to select individual pairs in 5.1 sound cards? Windows7

SamDel commented 5 years ago

Thanks.

Changing the recording device programmatically is not really supported. But the configuration (with the RecordingDeviceID) is stored in the file below. You can try to change it there! C:\Users\<username>\AppData\Local\ChromeCast\ChromeCast.Desktop.AudioS<random>\<version>\user.config

I don't know about individual pairs in 5.1 sound cards. Aren't they listed in the recording dropdown?

OneBobone commented 5 years ago

Great! I had a look at the config file. I found this: `

{0.0.0.00000000}.{13797e4c-9a87-4a04-be23-e456d8966eea}` But, it does not change when I change source? **Edit**: The config changes when I shut down ChromeCast-Desktop-Audio-Streamer. That should be workable! Unfortunately, the pairs do not show up in 7.1, but at least I get sound from the first pair! My sound card is Attero Tech MatchBox USB. A built in version of the following: http://cdn-docs.av-iq.com/dataSheet/MatchBox%20USB%20Product%20Brief.pdf
SamDel commented 5 years ago

The settings are persisted to the user.config file when you close the application, and loaded when you start the application. There's no hook on the config file to load the changes when the application is running!

When you change the RecordingDeviceID in the config file when the application is closed, the new recording device should be used when you start the application.

I don't think it's possible then to select an individual pair. The application gets all possible recording devices from Windows. I'll have a look at it later.