Reply
Thread Tools
Posts: 15 | Thanked: 6 times | Joined on Nov 2007
#1
I'm new to programming this thing; can someone point me towards documentation on how I can change the volume and mute setting from either the command line or Python please? I've hunted through the wiki and googled without any luck.
 
TrueJournals's Avatar
Posts: 480 | Thanked: 378 times | Joined on Apr 2008 @ Chicago-ish
#2
From the commandline:
Code:
gconftool -t int -s /apps/osso/sound/master_volume -- -100
should mute,
Code:
gconftool -t int -s /apps/osso/sound/master_volume -- (level)
should unmute. In practice, you might want to first get the value of /apps/osso/sound/master_volume, then set it to the opposite of that. The same method could be used to unmute.

Since this is using gconf, writing it in python would be a simple matter of figuring out how to use gconf in python Can't write sample code right now, but I can try later today if you need it.
__________________
Disclaimer: If a program I wrote doesn't work/breaks your tablet... It's not my fault
mcedit | Utility Calculators (WIP) | PyRDesktop
My Blog | Twitter
 

The Following User Says Thank You to TrueJournals For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#3
Theoretically:

Code:
        from gnome import gconf
        gconf_client = gconf.client_get_default ()
        gconf_client.set_int("/apps/osso/sound/master_volume", -gconf_client.get_int("/apps/osso/sound/master_volume"))
In practice it does not work for me. It sets /apps/osso/sound/master_volume to 0.
 
Posts: 15 | Thanked: 6 times | Joined on Nov 2007
#4
The gconftool solution works great for me. I gotta read up on that. Thanks!
 

The Following User Says Thank You to pjscott For This Useful Post:
Reply

Tags
api, audio, n810


 
Forum Jump


All times are GMT. The time now is 00:18.