Posts: 362
Joined: Jun 2011
Reputation:
14
I have my PC connected to an AVR through S/PDIF and use Kodi's passthrough option to allow the AVR to decode DD and DTS. I've recently added a Bluetooth transmitter (Avantree Leaf) so I can use BT headphones, and it shows up as a USB sound card. I can switch the Windows default playback device between S/PDIF and the new "Speakers" device with a hotkey. When I start WMC, it picks up on this, but Kodi does not. Kodi continues to send encoded formats to the AVR. How to solve? (To be clear, I'm switching devices when neither program is running.)
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
You need to change the playback device in Kodi settings, and yes you can do that programmatically.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 362
Joined: Jun 2011
Reputation:
14
Could use a pointer. I didn't see a built-in function for it or anything obvious in JSON-RPC docs.
Posts: 362
Joined: Jun 2011
Reputation:
14
Nick said "programmatically". I guess I could do it with profiles, but I'd still be interested to know how to do it programmatically.
Posts: 19,982
Joined: May 2009
Reputation:
451
nickr
Retired Team-Kodi Member
Posts: 19,982
There are a number of threads on changing audio outputs (and other settings) via JSON, which is easily adaptable to be done from other software (via JSON call using curl etc) or via a remote control button press. If I can find the threads I'll post again.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Posts: 362
Joined: Jun 2011
Reputation:
14
An approach that doesn't involve changing Kodi settings is to disable Dolby Digital and DTS in the S/PDIF Playback Device's "Supported Formats" section. Apparently Kodi determines passthrough can't work under the circumstances, so it then uses the default audio output device, which I also have to change to "Speakers". I can do all this in Autohotkey as a simple toggle. Not too bad.