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