blob: a49c75e85b70ed59a48c20a5dc8d74297424e39d [file] [log] [blame]
Barry Warsaw53646881998-12-03 16:27:38 +00001audiopy - a program to control the Solaris audio device.
Barry Warsawf622a331998-12-03 19:32:38 +00002
Barry Warsaw88604051998-12-14 21:36:40 +00003Contact: Barry Warsaw
Barry Warsawf622a331998-12-03 19:32:38 +00004Email: bwarsaw@python.org
5Version: 0.1
Barry Warsaw53646881998-12-03 16:27:38 +00006
7Introduction
8
9 Audiopy is a program to control the Solaris audio device, allowing
10 you to set both the input and output devices. It can be run
11 either as a standalone command-line script, or as a Tkinter based
12 GUI application.
13
14 Note that your version of Python must have been built with the
15 sunaudiodev module enabled. It is not enabled by default however!
16 You will need to edit your Modules/Setup file, uncomment the
17 sunaudiodev module spec line and rebuild Python.
18
19 Using audiopy, you can select one of three possible input devices:
20 the microphone, the line-in jack, or the CD in. These choices are
21 mutually exclusive; you can only have one active input device at
22 any one time (this is enforced by the underlying device). Some
23 input devices may not be supported on all Solaris machines.
24
25 You can also choose to enable any of the three possible output
26 devices: the headphone jack, the speakers, or the line-out jack.
27 You can enable any combination of these three devices.
28
29Running as a GUI
30
31 Simply start audiopy with no arguments to start it as a Tkinter
32 based GUI application. It will pop up a window with two sections:
33 the top portion contains three radio buttons indicating your
34 selected input device; the bottom portion contains three
35 checkboxes indicating your selected output devices.
36
37 Note the underlined characters in the button labels. These
38 indicate keyboard accelerators so that pressing Alt+character you
39 can select that device. For example, Alt-s toggles the Speaker
Barry Warsawf622a331998-12-03 19:32:38 +000040 device. The Alt accelerators are the same as those you'd use in
41 as the short-form command line switches (see below).
Barry Warsaw53646881998-12-03 16:27:38 +000042
43 Alt-q is also an accelerator for selecting Quit from the File
44 menu.
45
46 No unsupported devices will appear in the GUI. When run as a GUI,
47 audiopy monitors the audio device and automatically updates its
48 display if the state of the device is changed by some other
49 means. In pre-Python 1.5.2 this is done by occasionally polling
50 the device, but in Python 1.5.2 no polling is necessary (you don't
51 really need to know this, but I thought I'd plug 1.5.2 :-).
52
53Running as a Command Line Program
54
55 You can run audiopy from the command line to select any
56 combination of input or output device, by using the command line
57 options. Actually, any option forces audiopy to run as a command
58 line program and not display its GUI.
59
60 Options have the general form
61
62 --device[={0,1}]
63 -d[-{0,1}]
64
65 meaning there is both a long-form and short-form of the switch,
66 where `device' or `d' is one of the following:
67
68 (input)
69 microphone -- m
70 linein -- i
71 cd -- c
72
73 (output)
74 headphones -- p
75 speaker -- s
76 lineout -- o
77
78 When no value is given, the switch just toggles the specified
79 device. With a value, 0 turns the device off and 1 turns the
80 device on. Any other value is an error.
81
82 For example, to turn the speakers off, turn the headphones on, and
83 toggle the cd input device, run audiopy from the command line like
84 so:
85
86 % ./audiopy -s=0 -p=1 -c
87
88 Audiopy understands two other command line options:
89
90 --version
91 -v
92 Print the version number and exit
93
94 --help
95 -h
96 Print a help message and exit
97
98
99
100Local Variables:
101indent-tabs-mode: nil
102End: