Update audio settings via guisettings.xml OR by command line?
#1
Ok so here's the situation: I'm running XBMC to two different rooms - my main TV with a digital receiver and the LCD in my bedroom with some old computer speakers. I had this set up running properly so I could switch screens by hitting the Power button on my remote, and both rooms were getting their audio from a split analog connection. I just upgraded my motherboard/cpu to play 1080p and spdif. But now if I want to use digital sound (which I want for the main room) I can't get analog audio to the bedroom. I have searched everywhere for a way to do this but apparently XBMC won't do both at the same time (as far as I could find?).

I CAN change the settings in the Audio Hardware section of the Settings menu in XBMC, but I have to change the audio output from analog to digital and the default output device from iec958 to default. This plays properly in the bedroom - although as you can imagine changing these settings every time I switch to the bedroom and vice versa is a little annoying.

I thought I had solved it (although, it was a bit ugly) by creating two copies of guisettings.xml - one for digital, and one for analog sound, and then when I hit the power button on my remote to copy the proper guisettings.xml file over the guisettings.xml in ~/.xbmc. This worked, but only for a little while, but then broke - now even if I change the settings manually or overwrite the guisettings.xml file, it seems that XBMC is automatically changing the settings back when it starts.

Is there any way that I can set the audio settings from a script when I start XBMC? Or is there a way to specifically update the audio settings in guisettings.xml (and make then STAY (like i said it seems XBMC is changing them back even if i change them manually in the file))

Any ideas would be appreciated!
Reply
#2
I'm no expert here, but might you be able to set up pulseaudio for this? I.e. might it be possible to configure .asoundrc in such a way that it outputs all sound across both digital and analog simultaneously?
Reply
#3
while not a real answer to your question;

never edit guisettings.xml directly. if you want to force certain settings, copy those into advancedsettings.xml. that file is never written and always overrides guisettings.xml
Reply
#4
Spiff thanks it worked perfectly.....and it's much cleaner than my approach as well - now I can just change only the audio settings instead of having to copy the whole guisettings.xml file every time I switch.
Reply
#5
Ah, a quick search turned up this thread.

Someone suggested that the following worked for them in .asoundrc:
Code:
pcm.!default {
    type plug
    slave.pcm "copper"
}

pcm.copper {
    type copy
    slave.pcm "hw:0,0"
    slave.pcm "hw:0,1"
    slave.pcm "hw:0,0"
}

Assuming, of course, that analog is hw:0,0 and digital is hw:0,1. (in my case, for example, my digital (hdmi) output is hw:0,3.)
Reply

Logout Mark Read Team Forum Stats Members Help
Update audio settings via guisettings.xml OR by command line?0