annotate Tools/audiopy/README @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 9157c6da7619
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
1 audiopy - a program to control the Solaris audio device.
9579
f4da9449f011 audiopy: slightly revamped UI... includes a menubar, no quit button,
Barry Warsaw <barry@python.org>
parents: 9577
diff changeset
2
9635
44267b88fb59 "Author" -> "Contact"
Barry Warsaw <barry@python.org>
parents: 9579
diff changeset
3 Contact: Barry Warsaw
9579
f4da9449f011 audiopy: slightly revamped UI... includes a menubar, no quit button,
Barry Warsaw <barry@python.org>
parents: 9577
diff changeset
4 Email: bwarsaw@python.org
11204
9157c6da7619 Bump to version 1.1
Barry Warsaw <barry@python.org>
parents: 10806
diff changeset
5 Version: 1.1
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
6
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
7 Introduction
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
8
10781
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
9 Audiopy is a program to control the Solaris audio device, allowing
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
10 you to choose both the input and output devices, and to set the
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
11 output volume. It can be run either as a standalone command-line
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
12 script, or as a Tkinter based GUI application.
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
13
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
14 Note that your version of Python must have been built with the
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
15 sunaudiodev module enabled. It is not enabled by default however!
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
16 You will need to edit your Modules/Setup file, uncomment the
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
17 sunaudiodev module spec line and rebuild Python.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
18
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
19 Using audiopy, you can select one of three possible input devices:
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
20 the microphone, the line-in jack, or the CD in. These choices are
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
21 mutually exclusive; you can only have one active input device at
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
22 any one time (this is enforced by the underlying device). Some
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
23 input devices may not be supported on all Solaris machines.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
24
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
25 You can also choose to enable any of the three possible output
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
26 devices: the headphone jack, the speakers, or the line-out jack.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
27 You can enable any combination of these three devices.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
28
10781
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
29 You can also set the output gain (volume) level.
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
30
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
31 Running as a GUI
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
32
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
33 Simply start audiopy with no arguments to start it as a Tkinter
10806
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
34 based GUI application. It will pop up a window with two sections:
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
35 the top portion contains three radio buttons indicating your
10806
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
36 selected input device; the middle portion contains three
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
37 checkboxes indicating your selected output devices; the bottom
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
38 portion contains a slider that changes the output gain.
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
39
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
40 Note the underlined characters in the button labels. These
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
41 indicate keyboard accelerators so that pressing Alt+character you
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
42 can select that device. For example, Alt-s toggles the Speaker
9579
f4da9449f011 audiopy: slightly revamped UI... includes a menubar, no quit button,
Barry Warsaw <barry@python.org>
parents: 9577
diff changeset
43 device. The Alt accelerators are the same as those you'd use in
f4da9449f011 audiopy: slightly revamped UI... includes a menubar, no quit button,
Barry Warsaw <barry@python.org>
parents: 9577
diff changeset
44 as the short-form command line switches (see below).
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
45
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
46 Alt-q is also an accelerator for selecting Quit from the File
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
47 menu.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
48
10781
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
49 Unsupported devices will appear dimmed out in the GUI. When run
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
50 as a GUI, audiopy monitors the audio device and automatically
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
51 updates its display if the state of the device is changed by some
10806
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
52 other means. With Python versions before 1.5.2 this is done by
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
53 occasionally polling the device, but in Python 1.5.2 no polling is
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
54 necessary (you don't really need to know this, but I thought I'd
ffb2a47b645e updates for latest release
Barry Warsaw <barry@python.org>
parents: 10781
diff changeset
55 plug 1.5.2 :-).
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
56
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
57 Running as a Command Line Program
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
58
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
59 You can run audiopy from the command line to select any
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
60 combination of input or output device, by using the command line
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
61 options. Actually, any option forces audiopy to run as a command
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
62 line program and not display its GUI.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
63
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
64 Options have the general form
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
65
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
66 --device[={0,1}]
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
67 -d[-{0,1}]
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
68
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
69 meaning there is both a long-form and short-form of the switch,
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
70 where `device' or `d' is one of the following:
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
71
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
72 (input)
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
73 microphone -- m
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
74 linein -- i
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
75 cd -- c
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
76
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
77 (output)
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
78 headphones -- p
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
79 speaker -- s
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
80 lineout -- o
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
81
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
82 When no value is given, the switch just toggles the specified
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
83 device. With a value, 0 turns the device off and 1 turns the
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
84 device on. Any other value is an error.
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
85
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
86 For example, to turn the speakers off, turn the headphones on, and
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
87 toggle the cd input device, run audiopy from the command line like
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
88 so:
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
89
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
90 % ./audiopy -s=0 -p=1 -c
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
91
10781
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
92 Audiopy understands these other command line options:
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
93
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
94 --gain volume
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
95 -g volume
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
96 Sets the output volume to the specified gain level. This must
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
97 be an integer between MIN_GAIN and MAX_GAIN (usually [0..255],
479b4d1c0b47 Add a scale widget and command line options to set the output volume.
Barry Warsaw <barry@python.org>
parents: 9635
diff changeset
98 but use the -h option to find the exact values).
9577
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
99
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
100 --version
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
101 -v
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
102 Print the version number and exit
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
103
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
104 --help
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
105 -h
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
106 Print a help message and exit
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
107
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
108
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
109
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
110 Local Variables:
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
111 indent-tabs-mode: nil
81dd7c73f7b2 Initial version of the README file
Barry Warsaw <barry@python.org>
parents:
diff changeset
112 End: