Barry Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 1 | audiopy - a program to control the Solaris audio device. |
Barry Warsaw | f622a33 | 1998-12-03 19:32:38 +0000 | [diff] [blame] | 2 | |
Barry Warsaw | 8860405 | 1998-12-14 21:36:40 +0000 | [diff] [blame] | 3 | Contact: Barry Warsaw |
Barry Warsaw | f622a33 | 1998-12-03 19:32:38 +0000 | [diff] [blame] | 4 | Email: bwarsaw@python.org |
Barry Warsaw | 85460a5 | 1999-05-01 16:27:23 +0000 | [diff] [blame] | 5 | Version: 1.0 |
Barry Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 6 | |
| 7 | Introduction |
| 8 | |
Barry Warsaw | a4b055f | 1999-04-28 19:32:46 +0000 | [diff] [blame] | 9 | 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 Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 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 | |
Barry Warsaw | a4b055f | 1999-04-28 19:32:46 +0000 | [diff] [blame] | 29 | You can also set the output gain (volume) level. |
| 30 | |
Barry Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 31 | Running as a GUI |
| 32 | |
| 33 | Simply start audiopy with no arguments to start it as a Tkinter |
Barry Warsaw | 85460a5 | 1999-05-01 16:27:23 +0000 | [diff] [blame] | 34 | based GUI application. It will pop up a window with two sections: |
Barry Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 35 | the top portion contains three radio buttons indicating your |
Barry Warsaw | 85460a5 | 1999-05-01 16:27:23 +0000 | [diff] [blame] | 36 | 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 Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 39 | |
| 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 Warsaw | f622a33 | 1998-12-03 19:32:38 +0000 | [diff] [blame] | 43 | device. The Alt accelerators are the same as those you'd use in |
| 44 | as the short-form command line switches (see below). |
Barry Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 45 | |
| 46 | Alt-q is also an accelerator for selecting Quit from the File |
| 47 | menu. |
| 48 | |
Barry Warsaw | a4b055f | 1999-04-28 19:32:46 +0000 | [diff] [blame] | 49 | 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 Warsaw | 85460a5 | 1999-05-01 16:27:23 +0000 | [diff] [blame] | 52 | 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 Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 56 | |
| 57 | Running 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 Warsaw | a4b055f | 1999-04-28 19:32:46 +0000 | [diff] [blame] | 92 | 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 Warsaw | 5364688 | 1998-12-03 16:27:38 +0000 | [diff] [blame] | 99 | |
| 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 | |
| 110 | Local Variables: |
| 111 | indent-tabs-mode: nil |
| 112 | End: |