<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">This has come up sometime before and another user shared a script to<br>
do just this. I have modified it to suit my particular needs, but<br>
here it is.<br>
<br>
-------------------------------------------<br>
<br>
#!/usr/bin/python<br>
<br>
from MythTV import MythBE<br>
<br>
be = MythBE()<br>
db = be.db<br>
hostname = db.gethostname()<br>
<br>
print 'Host: %s'%hostname<br>
print '\tAudio device: %s'%db.settings[hostname]['AudioOutputDevice']<br>
print '\tMax Channels: %s'%db.settings[hostname]['MaxChannels']<br>
print '\tDTS: %s AC3:<br>
%s'%(db.settings[hostname]['DTSPassThru'],db.settings[hostname]['AC3PassThru'])<br>
<br>
if db.settings[hostname]['AudioOutputDevice']=='ALSA:plug:a2dp':<br>
db.settings[hostname]['AudioOutputDevice']='ALSA:iec958:CARD=SB,DEV=0'<br>
db.settings[hostname]['MaxChannels']=u'6'<br>
db.settings[hostname]['DTSPassThru']=u'1'<br>
db.settings[hostname]['AC3PassThru']=u'1'<br>
else:<br>
db.settings[hostname]['AudioOutputDevice']='ALSA:plug:a2dp'<br>
db.settings[hostname]['MaxChannels']=u'2'<br>
db.settings[hostname]['DTSPassThru']=u'0'<br>
db.settings[hostname]['AC3PassThru']=u'0'<br>
<br>
print 'Host: %s'%hostname<br>
print '\tAudio device: %s'%db.settings[hostname]['AudioOutputDevice']<br>
print '\tMax Channels: %s'%db.settings[hostname]['MaxChannels']<br>
print '\tDTS: %s AC3:<br>
%s'%(db.settings[hostname]['DTSPassThru'],db.settings[hostname]['AC3PassThru'])<br>
<br>
be.backendCommand('MESSAGE[]:[]CLEAR_SETTINGS_CACHE')<br>
<br>
------------------------------------------<br></blockquote><div> </div><div>Hmmmmm, thats got me thinking. Is there any way to query the frontend for how many channels the audio being played contains (without up-mixing or down-mixing)?</div>
<div><br></div><div>Cheers</div><div>Wayne</div></div>