blob: 45bf7736fc1818ab1e9f6c8d1c6d701b646db2f0 [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
Barry Warsaw8a07bae1999-08-18 20:18:20 +00005Version: 1.1
Barry Warsaw53646881998-12-03 16:27:38 +00006
7Introduction
8
Barry Warsawa4b055f1999-04-28 19:32:46 +00009 Audiopy is a program to control the Solaris audio device, allowing
10 you to choose both the input and output devices, and to set the
11 output volume. It can be run either as a standalone command-line
12 script, or as a Tkinter based GUI application.
Barry Warsaw53646881998-12-03 16:27:38 +000013
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
Barry Warsawa4b055f1999-04-28 19:32:46 +000029 You can also set the output gain (volume) level.
30
Barry Warsaw53646881998-12-03 16:27:38 +000031Running as a GUI
32
33 Simply start audiopy with no arguments to start it as a Tkinter
Barry Warsaw85460a51999-05-01 16:27:23 +000034 based GUI application. It will pop up a window with two sections:
Barry Warsaw53646881998-12-03 16:27:38 +000035 the top portion contains three radio buttons indicating your
Barry Warsaw85460a51999-05-01 16:27:23 +000036 selected input device; the middle portion contains three
37 checkboxes indicating your selected output devices; the bottom
38 portion contains a slider that changes the output gain.
Barry Warsaw53646881998-12-03 16:27:38 +000039
40 Note the underlined characters in the button labels. These
41 indicate keyboard accelerators so that pressing Alt+character you
42 can select that device. For example, Alt-s toggles the Speaker
Barry Warsawf622a331998-12-03 19:32:38 +000043 device. The Alt accelerators are the same as those you'd use in
44 as the short-form command line switches (see below).
Barry Warsaw53646881998-12-03 16:27:38 +000045
46 Alt-q is also an accelerator for selecting Quit from the File
47 menu.
48
Barry Warsawa4b055f1999-04-28 19:32:46 +000049 Unsupported devices will appear dimmed out in the GUI. When run
50 as a GUI, audiopy monitors the audio device and automatically
51 updates its display if the state of the device is changed by some
Barry Warsaw85460a51999-05-01 16:27:23 +000052 other means. With Python versions before 1.5.2 this is done by
53 occasionally polling the device, but in Python 1.5.2 no polling is
54 necessary (you don't really need to know this, but I thought I'd
55 plug 1.5.2 :-).
Barry Warsaw53646881998-12-03 16:27:38 +000056
57Running as a Command Line Program
58
59 You can run audiopy from the command line to select any
60 combination of input or output device, by using the command line
61 options. Actually, any option forces audiopy to run as a command
62 line program and not display its GUI.
63
64 Options have the general form
65
66 --device[={0,1}]
67 -d[-{0,1}]
68
69 meaning there is both a long-form and short-form of the switch,
70 where `device' or `d' is one of the following:
71
72 (input)
73 microphone -- m
74 linein -- i
75 cd -- c
76
77 (output)
78 headphones -- p
79 speaker -- s
80 lineout -- o
81
82 When no value is given, the switch just toggles the specified
83 device. With a value, 0 turns the device off and 1 turns the
84 device on. Any other value is an error.
85
86 For example, to turn the speakers off, turn the headphones on, and
87 toggle the cd input device, run audiopy from the command line like
88 so:
89
90 % ./audiopy -s=0 -p=1 -c
91
Barry Warsawa4b055f1999-04-28 19:32:46 +000092 Audiopy understands these other command line options:
93
94 --gain volume
95 -g volume
96 Sets the output volume to the specified gain level. This must
97 be an integer between MIN_GAIN and MAX_GAIN (usually [0..255],
98 but use the -h option to find the exact values).
Barry Warsaw53646881998-12-03 16:27:38 +000099
100 --version
101 -v
102 Print the version number and exit
103
104 --help
105 -h
106 Print a help message and exit
107
108
109
110Local Variables:
111indent-tabs-mode: nil
112End: