[Pythonmac-SIG] getting/setting system volume in OS X with python?

Erik Osheim erik at plastic-idolatry.com
Thu May 5 03:51:19 CEST 2005


Hello list,

I've been developing a curses-based music player in python for the
last couple of years (http://www.bearhome.net/mpy3) and it is getting
pretty good these days. I have added keybindings to control volume in
linux using the ossaudiodev module found in python.

I wanted to do the same thing under OS X which I am now trying to
fully support. After some digging, it looked to me like Carbon.Snd was
the ticket. However, I can't find any documentation on this module; I
did some digging in Apple provided docs, and was able to get a
semi-working, semi-broken version of volume control going (mutes one
ear, controls the volume of the other), but I am not sure this will do
it.

My questions are:

1. Does anyone have a good idea how to go about doing this best on OS
X? I am not going to be able to support OS 9 (too many unix
dependencies) so if there is a cleaner way to do it than Carbon I
would be interested.

2. Is there anywhere to get better docs on things like ae*, Carbon.*,
etc? It seems like python for mac is incredibly powerful but arcane,
and between no documentation and no doc strings I have a hard time
figuring out what I can do with it.

Please include me in the replies since I am not a subscriber to this
list (yet ;) ).

Thanks,

-- Erik


More information about the Pythonmac-SIG mailing list