Compare commits
102 Commits
Author | SHA1 | Date |
---|---|---|
Derek | f749f2187e | |
Derek | 2ee560056e | |
Hubert Pham | 7090e25bcb | |
Hubert Pham | 045ebc7767 | |
Hubert Pham | 653fdfeb87 | |
Hubert Pham | 281a8f32e7 | |
Hubert Pham | 39de78a74a | |
Hubert Pham | 2e696d98c0 | |
Hubert Pham | 833ebc0b14 | |
Hubert Pham | fe528b2050 | |
Hubert Pham | 8285b9bc5c | |
Hubert Pham | a0f6d13628 | |
Hubert Pham | 47a80684e1 | |
Hubert Pham | 439327bcd7 | |
Hubert Pham | c9bc0193b0 | |
Hubert Pham | 884cedae7f | |
Hubert Pham | 50e08d41d4 | |
Hubert Pham | 7a61080270 | |
Hubert Pham | e59fa4a24e | |
Hubert Pham | 870016f6d1 | |
Hubert Pham | bff409df19 | |
Hubert Pham | da8c238eee | |
Hubert Pham | dce064b428 | |
Hubert Pham | ab5e5b775e | |
Hubert Pham | 5a4da7d870 | |
Hubert Pham | 0e5eb7cb9d | |
Hubert Pham | 3e6adb4588 | |
Hubert Pham | d786cc59a2 | |
Hubert Pham | ebea06b12c | |
Hubert Pham | 1783aaf9bc | |
Hubert Pham | 53ab5eb107 | |
Hubert Pham | fc7bd1d2b0 | |
Hubert Pham | 7cefbc5718 | |
Hubert Pham | 7ec435d961 | |
Hubert Pham | f1abe26c96 | |
Christoph Gohlke | b9b1cb5a71 | |
Hubert Pham | a0bdcab7b3 | |
Hubert Pham | 9459d994b1 | |
Hubert Pham | ed830f7b5b | |
Hubert Pham | 949d4b7271 | |
Hubert Pham | 930a5cd04b | |
Hubert Pham | 2953234b0b | |
Hubert Pham | 806d8623e9 | |
Hubert Pham | 72a9bd1dd2 | |
Hubert Pham | 9136083440 | |
Hubert Pham | 1cb6b8c1f6 | |
Hubert Pham | d7bad725ed | |
Hubert Pham | 39c41c8cae | |
Hubert Pham | 679c1c2ead | |
Hubert Pham | 34e54db968 | |
Hubert Pham | 04f2db1222 | |
Hubert Pham | d35ff7a829 | |
Hubert Pham | f3f8c5e2cb | |
Hubert Pham | b6736b5375 | |
Hubert Pham | 27424b6045 | |
Hubert Pham | bcbfcd8ab5 | |
Hubert Pham | 73cc135bbc | |
Hubert Pham | b087335fdf | |
Hubert Pham | 5a547e0cd1 | |
Hubert Pham | 801b8a21f8 | |
Hubert Pham | a271c17c54 | |
Hubert Pham | ab339f8352 | |
Hubert Pham | 1615e4ce80 | |
Hubert Pham | 1125da6f99 | |
Hubert Pham | ba10e04d1e | |
Hubert Pham | 9de8018304 | |
Hubert Pham | 1bc6abb9b6 | |
Hubert Pham | 4036322c68 | |
Hubert Pham | 4287326f36 | |
Hubert Pham | 51eafbef69 | |
Hubert Pham | 3d3c57ffbe | |
Hubert Pham | 9a99f93bb0 | |
Hubert Pham | eedfb3dd8f | |
Hubert Pham | ca85fd0d5f | |
Hubert Pham | 2a8d011698 | |
Hubert Pham | 6f9efe0ba3 | |
Hubert Pham | 742b3b3781 | |
Hubert Pham | ab8c3259fa | |
Hubert Pham | b6d5593a2b | |
Hubert Pham | 1fb9e8db6c | |
Hubert Pham | 3f5bc25c72 | |
Hubert Pham | 3f55f344a0 | |
Hubert Pham | 3b8fdb72e7 | |
Hubert Pham | ed2bbdfc9a | |
Hubert Pham | 775aaca9ee | |
Hubert Pham | 04442d1976 | |
Hubert Pham | 05ad8ab587 | |
Hubert Pham | 24e2d62393 | |
Hubert Pham | dda3aff3d3 | |
Hubert Pham | 64abac6cea | |
Hubert Pham | ed6c985095 | |
Hubert Pham | dd29f48050 | |
Hubert Pham | 2059c5d707 | |
Hubert Pham | 2f4330f7a5 | |
Hubert Pham | 2aef341c4b | |
Hubert Pham | cf3fc6a29b | |
Hubert Pham | 041e45ac48 | |
Hubert Pham | e6df9fbddb | |
Hubert Pham | 5bb6f331f6 | |
Hubert Pham | 6f98b6c5b9 | |
Hubert Pham | f0218c5670 | |
Hubert Pham | 4b7117786a |
|
@ -0,0 +1,6 @@
|
|||
.DS_Store
|
||||
src/PyAudio.egg-info
|
||||
build/
|
||||
dist/
|
||||
docs/
|
||||
MANIFEST
|
|
@ -0,0 +1,145 @@
|
|||
2017-03-18 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.11
|
||||
|
||||
- Fix use-after-free memory issue in callback handler.
|
||||
|
||||
Thanks to both Blaise Potard and Matthias Schaff for their patches!
|
||||
|
||||
- Fix docstring for get_output_latency().
|
||||
|
||||
Thanks to Timothy Port for finding the issue!
|
||||
|
||||
2017-01-10 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.10
|
||||
|
||||
- Release the GIL during PortAudio I/O calls to avoid potential deadlock.
|
||||
|
||||
Thanks to Michael Graczyk for submitting a patch!
|
||||
|
||||
- Add a few automated unit tests.
|
||||
|
||||
2015-10-18 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.9
|
||||
|
||||
- Fix overflow error handling logic for pa_read_stream.
|
||||
|
||||
Stream.read takes an additional parameter that specifies whether
|
||||
an exception is raised on audio buffer overflow, for parity with
|
||||
Stream.write. Includes relevant bug fixes in the C module logic.
|
||||
|
||||
Thanks to Tony Jacobson for submitting a patch!
|
||||
|
||||
- Fix IOError arguments.
|
||||
|
||||
IOError exceptions previously had values in the strerror and errno fields
|
||||
swapped, which is now corrected.
|
||||
|
||||
Thanks to Sami Liedes for the report!
|
||||
|
||||
- Miscellaneous updates.
|
||||
|
||||
Python library surfaces issues with importing low-level C module.
|
||||
Code formatting update.
|
||||
Updates to examples for Python 3 compatibility.
|
||||
|
||||
2014-02-16 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.8
|
||||
|
||||
- Device names: support non-UTF8 encoded device names.
|
||||
|
||||
get_device_info_by_index() now attempts to decode the device name
|
||||
using a few known encodings (defaults to UTF-8 and CP1252). If
|
||||
those fail, PyAudio passes the raw bytes for the device name.
|
||||
Previously, PyAudio assumed a UTF-8 encoding, which is not always
|
||||
true.
|
||||
|
||||
- Callback-mode: fix deadlock on some platforms when calling
|
||||
pa.stop_stream.
|
||||
|
||||
Thanks to Jason Roehm for this patch!
|
||||
|
||||
2012-10-20 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.7
|
||||
|
||||
- Callback-mode: support callables.
|
||||
|
||||
Thanks to John Luebs and Bastian Bechtold for this patch.
|
||||
|
||||
- Update documentation to use Sphinx.
|
||||
|
||||
Thanks again to Bastian Bechtold for his incredible contribution!
|
||||
|
||||
|
||||
2012-09-01 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.6
|
||||
|
||||
- Added support for Python 3. As of this update, PyAudio is
|
||||
compatible with Python 2.6, Python 2.7, and Python 3.2.
|
||||
|
||||
Many thanks to Bastian Bechtold and Bob Jamison for their patches!
|
||||
|
||||
- Fixed a bug in which a list could be modified during iteration.
|
||||
|
||||
Many thanks to Danilo J. S. Bellini for reporting this error!
|
||||
|
||||
- Fixed a memory bug involving Mac OS X channel maps.
|
||||
|
||||
|
||||
2012-09-01 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.5
|
||||
|
||||
- Added support for callback (non-blocking) operation.
|
||||
|
||||
Many thanks to Bastian Bechtold for his initial contribution and
|
||||
his generous help towards releasing this feature. Callback mode
|
||||
would not have happened without Bastian's help!
|
||||
|
||||
|
||||
2010-08-12 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.4
|
||||
|
||||
- Maintenance release: updated directory structure and packaging.
|
||||
|
||||
|
||||
2008-10-29 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.3
|
||||
|
||||
- Release the GIL during blocking PortAudio I/O calls.
|
||||
|
||||
- Fixed Python argument parsing to use a long for PaSampleFormat
|
||||
(rather than int).
|
||||
|
||||
Thanks to many who have pointed out these two issues and sent
|
||||
patches.
|
||||
|
||||
- pyaudio.PyAudio.is_format_supported() now throws a ValueError
|
||||
exception if the specified format is not supported for any reason
|
||||
(or returns True if the format is supported).
|
||||
|
||||
Prior, the method would return False if and only if the specified
|
||||
sample rate was unsupported. is_format_supported() now will always
|
||||
return True or throw an exception.
|
||||
|
||||
|
||||
2008-03-06 Hubert Pham <hubert@mit.edu>
|
||||
|
||||
PyAudio 0.2.0
|
||||
|
||||
- Added PaMacCoreStreamInfo for Mac OS X Host API Specific Stream Info
|
||||
(e.g., for channel maps).
|
||||
|
||||
- Added packaging files for building binaries.
|
||||
|
||||
|
||||
2008-02-12 Justin Mazzola Paluska <jmp@mit.edu>
|
||||
|
||||
- Initial version of debian packaging.
|
|
@ -0,0 +1,90 @@
|
|||
======================================================================
|
||||
PyAudio Compilation Hints
|
||||
======================================================================
|
||||
|
||||
Here are some hints for compiling PortAudio and PyAudio on various
|
||||
platforms:
|
||||
|
||||
* General UNIX Guide: (GNU/Linux, Mac OS X, Cygwin)
|
||||
* Microsoft Windows (native)
|
||||
|
||||
Generally speaking, installation involves building the PortAudio v19
|
||||
library and then building PyAudio.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
General UNIX Guide (GNU/Linux, Mac OS X, Cygwin)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
1. Use a package manager to install PortAudio v19.
|
||||
|
||||
To build PortAudio from source instead, extract the source and run:
|
||||
|
||||
% ./configure
|
||||
% make
|
||||
% make install # you may need to be root
|
||||
|
||||
2. Extract PyAudio. To build and install, run:
|
||||
|
||||
% python setup.py install
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Microsoft Windows
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Targeting native Win32 Python will require either Microsoft Visual
|
||||
Studio or MinGW (via Cygwin). Here are compilation hints for using
|
||||
MinGW under the Cygwin build environment.
|
||||
|
||||
Note: I've only tested this under Cygwin's build environment. Your
|
||||
mileage may vary in other environments (i.e., compiling PortAudio with
|
||||
MinGW's compiler).
|
||||
|
||||
1. Install cygwin's gcc and mingw packages.
|
||||
|
||||
2. Download PortAudio and build. When running configure, be sure to
|
||||
specify the MinGW compiler (via a CC environment variable) to
|
||||
generate native Win32 binaries:
|
||||
|
||||
% CC=i686-w64-mingw32-gcc ./configure --enable-static --with-pic
|
||||
% make
|
||||
|
||||
3. Before building PyAudio, apply a few necessary modifications:
|
||||
|
||||
a. Python distutils calls ``gcc'' to build the C extension, so
|
||||
temporarily move your MinGW compiler to /usr/bin/gcc.
|
||||
|
||||
b. Modify Python's Lib/distutils/cygwincompiler.py so that
|
||||
mscvr900.dll is not included in the build. See:
|
||||
http://bugs.python.org/issue16472.
|
||||
|
||||
Both Python 2.7 and Python 3+ require similar modification.
|
||||
|
||||
c. For some versions of Python (e.g., Python 2.7 32-bit), it is
|
||||
necessary to further modify Python's
|
||||
Lib/distutils/cygwincompiler.py and remove references to
|
||||
-cmingw32, a flag which is no longer supported.
|
||||
See http://hg.python.org/cpython/rev/6b89176f1be5/.
|
||||
|
||||
d. For some versions of 64-bit Python 3 (e.g., Python 3.2, 3.3, 3.4),
|
||||
it is necessary to generate .a archive of the Python DLL.
|
||||
See https://bugs.python.org/issue20785. Example for Python 3.4:
|
||||
|
||||
% cd /path/to/Python34-x64/libs/
|
||||
% gendef /path/to/Windows/System32/python34.dll
|
||||
% dlltool --as-flags=--64 -m i386:x64-64 -k --output-lib libpython34.a \
|
||||
--input-def python34.def
|
||||
|
||||
4. To build PyAudio, run:
|
||||
|
||||
% PORTAUDIO_PATH=/path/to/portaudio_tree /path/to/win/python \
|
||||
setup.py build --static-link -cmingw32
|
||||
|
||||
Be sure to invoke the native Win32 python rather than cygwin's
|
||||
python. The --static-link option statically links in the PortAudio
|
||||
library to the PyAudio module.
|
||||
|
||||
5. To install PyAudio:
|
||||
|
||||
% python setup.py install --skip-build
|
||||
|
||||
Or create a Python wheel and install using pip.
|
|
@ -0,0 +1,5 @@
|
|||
include src/*.c src/*.h src/*.py
|
||||
include Makefile CHANGELOG INSTALL MANIFEST.in
|
||||
recursive-include examples *.py
|
||||
recursive-include tests *.py
|
||||
graft sphinx
|
|
@ -0,0 +1,48 @@
|
|||
# This is the PyAudio distribution makefile.
|
||||
|
||||
.PHONY: docs clean build
|
||||
|
||||
VERSION := 0.2.11
|
||||
PYTHON ?= python
|
||||
BUILD_ARGS ?=
|
||||
SPHINX ?= sphinx-build
|
||||
DOCS_OUTPUT=docs/
|
||||
PYTHON_BUILD_DIR:=$(shell $(PYTHON) -c "import distutils.util; import sys; print(distutils.util.get_platform() + '-' + sys.version[0:3])")
|
||||
BUILD_DIR:=lib.$(PYTHON_BUILD_DIR)
|
||||
BUILD_STAMP:=$(BUILD_DIR)/build
|
||||
SRCFILES := src/*.c src/*.h src/*.py
|
||||
EXAMPLES := examples/*.py
|
||||
TESTS := tests/*.py
|
||||
|
||||
what:
|
||||
@echo "make targets:"
|
||||
@echo
|
||||
@echo " tarball : build source tarball"
|
||||
@echo " docs : generate documentation (requires sphinx)"
|
||||
@echo " clean : remove build files"
|
||||
@echo
|
||||
@echo "To build pyaudio, run:"
|
||||
@echo
|
||||
@echo " python setup.py install"
|
||||
|
||||
clean:
|
||||
@rm -rf build dist MANIFEST $(DOCS_OUTPUT) src/*.pyc
|
||||
|
||||
######################################################################
|
||||
# Documentation
|
||||
######################################################################
|
||||
|
||||
build: build/$(BUILD_STAMP)
|
||||
|
||||
build/$(BUILD_STAMP): $(SRCFILES)
|
||||
$(PYTHON) setup.py build $(BUILD_ARGS)
|
||||
touch $@
|
||||
|
||||
docs: build
|
||||
PYTHONPATH=build/$(BUILD_DIR) $(SPHINX) -b html sphinx/ $(DOCS_OUTPUT)
|
||||
|
||||
######################################################################
|
||||
# Source Tarball
|
||||
######################################################################
|
||||
tarball: $(SRCFILES) $(EXAMPLES) $(TESTS) MANIFEST.in
|
||||
@$(PYTHON) setup.py sdist
|
|
@ -1,23 +1,20 @@
|
|||
======================================================================
|
||||
PyAudio v0.2.0: Python Bindings for PortAudio.
|
||||
PyAudio v0.2.12: Python Bindings for PortAudio.
|
||||
======================================================================
|
||||
|
||||
See: http://people.csail.mit.edu/hubert/pyaudio/
|
||||
|
||||
PyAudio provides Python bindings for PortAudio, the cross-platform
|
||||
PyAudio provides Python bindings for PortAudio v19, the cross-platform
|
||||
audio I/O library. Using PyAudio, you can easily use Python to play
|
||||
and record audio on a variety of platforms.
|
||||
|
||||
PyAudio is designed to work with the PortAudio v19 API 2.0. Note that
|
||||
PyAudio currently only supports blocking-mode audio I/O.
|
||||
|
||||
See INSTALL for compilation hints.
|
||||
|
||||
======================================================================
|
||||
|
||||
PyAudio : Python Bindings for PortAudio.
|
||||
|
||||
Copyright (c) 2006-2008 Hubert Pham
|
||||
Copyright (c) 2006 Hubert Pham
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
@ -39,4 +36,3 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
======================================================================
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
"""
|
||||
PyAudio Example:
|
||||
|
||||
Test for a variety of error conditions. This
|
||||
example demonstrates exception handling with
|
||||
PyAudio. """
|
||||
PyAudio Example: Test for a variety of error conditions. This example
|
||||
demonstrates exception handling with PyAudio.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
|
||||
|
@ -12,56 +10,56 @@ p = pyaudio.PyAudio()
|
|||
# get invalid sample size
|
||||
try:
|
||||
p.get_sample_size(10)
|
||||
except ValueError, e:
|
||||
assert e[1] == pyaudio.paSampleFormatNotSupported
|
||||
print "OK:", e[0]
|
||||
except ValueError as e:
|
||||
assert e.args[1] == pyaudio.paSampleFormatNotSupported
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "sample size"
|
||||
|
||||
# get format from invalid width
|
||||
try:
|
||||
p.get_format_from_width(8)
|
||||
except ValueError, e:
|
||||
print "OK: invalid format from width"
|
||||
except ValueError as e:
|
||||
print("OK: invalid format from width")
|
||||
else:
|
||||
assert False, "invalid format"
|
||||
|
||||
# try to get an invalid device
|
||||
try:
|
||||
p.get_host_api_info_by_type(-1)
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paHostApiNotFound
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paHostApiNotFound
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "invalid host type"
|
||||
|
||||
# try to get host api info by index
|
||||
try:
|
||||
p.get_host_api_info_by_index(-1)
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paInvalidHostApi
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paInvalidHostApi
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "invalid host api index"
|
||||
|
||||
# try good host api device index
|
||||
try:
|
||||
p.get_device_info_by_host_api_device_index(0, -1)
|
||||
except IOError, e:
|
||||
assert ((e[1] == pyaudio.paInvalidDevice) or \
|
||||
(e[1] == pyaudio.paInvalidHostApi))
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert ((e.args[1] == pyaudio.paInvalidDevice) or \
|
||||
(e.args[1] == pyaudio.paInvalidHostApi))
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "device info by host api device idnex"
|
||||
|
||||
|
||||
|
||||
# try bad host api and good device index
|
||||
try:
|
||||
p.get_device_info_by_host_api_device_index(-1, 0)
|
||||
except IOError, e:
|
||||
assert ((e[1] == pyaudio.paInvalidDevice) or \
|
||||
(e[1] == pyaudio.paInvalidHostApi))
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert ((e.args[1] == pyaudio.paInvalidDevice) or \
|
||||
(e.args[1] == pyaudio.paInvalidHostApi))
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "device info by host api device idnex"
|
||||
|
||||
|
@ -69,9 +67,9 @@ else:
|
|||
# bad device index
|
||||
try:
|
||||
p.get_device_info_by_index(-1)
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paInvalidDevice
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paInvalidDevice
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "bad device index"
|
||||
|
||||
|
@ -87,9 +85,9 @@ stream = p.open(channels = 1,
|
|||
|
||||
try:
|
||||
data = stream.read(2)
|
||||
except IOError, e:
|
||||
print "OK:", e[0]
|
||||
assert e[1] == pyaudio.paStreamIsStopped, e[1]
|
||||
except IOError as e:
|
||||
print("OK: %s" % e.args[0])
|
||||
assert e.args[1] == pyaudio.paStreamIsStopped, e.args[1]
|
||||
else:
|
||||
assert False, "Should have caused exception"
|
||||
|
||||
|
@ -98,29 +96,29 @@ stream.start_stream()
|
|||
# try to write to the input stream
|
||||
try:
|
||||
stream.write('foobar')
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paCanNotWriteToAnInputOnlyStream
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paCanNotWriteToAnInputOnlyStream
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "write to input stream"
|
||||
|
||||
# read some negative data
|
||||
try:
|
||||
data = stream.read(-1)
|
||||
except ValueError, e:
|
||||
print "OK: Invalid frames"
|
||||
except ValueError as e:
|
||||
print("OK: Invalid frames")
|
||||
else:
|
||||
assert False, "invalid frames"
|
||||
|
||||
# read some real data
|
||||
try:
|
||||
data = stream.read(2)
|
||||
except IOError, e:
|
||||
except IOError as e:
|
||||
# some slower machines might overflow
|
||||
assert e[1] == pyaudio.paInputOverflowed, e
|
||||
print "OK:", e[0]
|
||||
assert e.args[1] == pyaudio.paInputOverflowed, e
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
print "OK: got %d bytes of data" % len(data)
|
||||
print("OK: got %d bytes of data" % len(data))
|
||||
|
||||
# close the stream; nothing should work with
|
||||
# this stream afterwards
|
||||
|
@ -130,36 +128,36 @@ stream.close()
|
|||
# query for properties
|
||||
try:
|
||||
stream.get_input_latency()
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paBadStreamPtr
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paBadStreamPtr
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "closed stream"
|
||||
|
||||
# read some data again
|
||||
try:
|
||||
stream.read(10)
|
||||
except IOError, e:
|
||||
assert e[1] == pyaudio.paBadStreamPtr
|
||||
print "OK:", e[0]
|
||||
except IOError as e:
|
||||
assert e.args[1] == pyaudio.paBadStreamPtr
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "closed stream"
|
||||
|
||||
# get invalid stream capabilities
|
||||
try:
|
||||
p.is_format_supported(8000, -1, 1, pyaudio.paInt16)
|
||||
except ValueError, e:
|
||||
assert e[1] == pyaudio.paInvalidDevice
|
||||
print "OK:", e[0]
|
||||
except ValueError as e:
|
||||
assert e.args[1] == pyaudio.paInvalidDevice
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "invalid device"
|
||||
|
||||
# get invalid stream capabilities
|
||||
try:
|
||||
p.is_format_supported(8000, 0, -1, pyaudio.paInt16)
|
||||
except ValueError, e:
|
||||
assert e[1] == pyaudio.paInvalidChannelCount
|
||||
print "OK:", e[0]
|
||||
except ValueError as e:
|
||||
assert e.args[1] == pyaudio.paInvalidChannelCount
|
||||
print("OK: %s" % e.args[0])
|
||||
else:
|
||||
assert False, "invalid number of channels"
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
"""PyAudio Example: Play a wave file."""
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
CHUNK = 1024
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0])
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
||||
# instantiate PyAudio (1)
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
# open stream (2)
|
||||
stream = p.open(format=p.get_format_from_width(wf.getsampwidth()),
|
||||
channels=wf.getnchannels(),
|
||||
rate=wf.getframerate(),
|
||||
output=True)
|
||||
|
||||
# read data
|
||||
data = wf.readframes(CHUNK)
|
||||
|
||||
# play stream (3)
|
||||
while len(data) > 0:
|
||||
stream.write(data)
|
||||
data = wf.readframes(CHUNK)
|
||||
|
||||
# stop stream (4)
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
|
||||
# close PyAudio (5)
|
||||
p.terminate()
|
|
@ -0,0 +1,42 @@
|
|||
"""PyAudio Example: Play a wave file (callback version)."""
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
import time
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0])
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
||||
# instantiate PyAudio (1)
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
# define callback (2)
|
||||
def callback(in_data, frame_count, time_info, status):
|
||||
data = wf.readframes(frame_count)
|
||||
return (data, pyaudio.paContinue)
|
||||
|
||||
# open stream using callback (3)
|
||||
stream = p.open(format=p.get_format_from_width(wf.getsampwidth()),
|
||||
channels=wf.getnchannels(),
|
||||
rate=wf.getframerate(),
|
||||
output=True,
|
||||
stream_callback=callback)
|
||||
|
||||
# start the stream (4)
|
||||
stream.start_stream()
|
||||
|
||||
# wait for stream to finish (5)
|
||||
while stream.is_active():
|
||||
time.sleep(0.1)
|
||||
|
||||
# stop stream (6)
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
wf.close()
|
||||
|
||||
# close PyAudio (7)
|
||||
p.terminate()
|
|
@ -1,4 +1,6 @@
|
|||
""" PyAudio Example: Mac OS X-only: Play a wave file with channel maps. """
|
||||
"""
|
||||
PyAudio Example: Mac OS X-only: Play a wave file with channel maps.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
|
@ -9,7 +11,7 @@ chunk = 1024
|
|||
PyAudio = pyaudio.PyAudio
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0]
|
||||
print("Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0])
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
@ -40,30 +42,29 @@ channel_map = (1, -1)
|
|||
|
||||
try:
|
||||
stream_info = pyaudio.PaMacCoreStreamInfo(
|
||||
flags = pyaudio.PaMacCoreStreamInfo.paMacCorePlayNice, # default
|
||||
channel_map = channel_map)
|
||||
flags=pyaudio.PaMacCoreStreamInfo.paMacCorePlayNice, # default
|
||||
channel_map=channel_map)
|
||||
except AttributeError:
|
||||
print "Sorry, couldn't find PaMacCoreStreamInfo. Make sure that " \
|
||||
"you're running on Mac OS X."
|
||||
import sys
|
||||
print("Sorry, couldn't find PaMacCoreStreamInfo. Make sure that "
|
||||
"you're running on Mac OS X.")
|
||||
sys.exit(-1)
|
||||
|
||||
print "Stream Info Flags:", stream_info.get_flags()
|
||||
print "Stream Info Channel Map:", stream_info.get_channel_map()
|
||||
|
||||
print("Stream Info Flags:", stream_info.get_flags())
|
||||
print("Stream Info Channel Map:", stream_info.get_channel_map())
|
||||
|
||||
# open stream
|
||||
stream = p.open(format =
|
||||
p.get_format_from_width(wf.getsampwidth()),
|
||||
channels = wf.getnchannels(),
|
||||
rate = wf.getframerate(),
|
||||
output = True,
|
||||
output_host_api_specific_stream_info = stream_info)
|
||||
stream = p.open(
|
||||
format=p.get_format_from_width(wf.getsampwidth()),
|
||||
channels=wf.getnchannels(),
|
||||
rate=wf.getframerate(),
|
||||
output=True,
|
||||
output_host_api_specific_stream_info=stream_info)
|
||||
|
||||
# read data
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
# play stream
|
||||
while data != '':
|
||||
while len(data) > 0:
|
||||
stream.write(data)
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
|
@ -71,6 +72,3 @@ stream.stop_stream()
|
|||
stream.close()
|
||||
|
||||
p.terminate()
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
"""
|
||||
PyAudio example: Record a few seconds of audio and save to a WAVE
|
||||
file.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
CHUNK = 1024
|
||||
FORMAT = pyaudio.paInt16
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
WAVE_OUTPUT_FILENAME = "output.wav"
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
stream = p.open(format=FORMAT,
|
||||
channels=CHANNELS,
|
||||
rate=RATE,
|
||||
input=True,
|
||||
frames_per_buffer=CHUNK)
|
||||
|
||||
print("* recording")
|
||||
|
||||
frames = []
|
||||
|
||||
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
|
||||
data = stream.read(CHUNK)
|
||||
frames.append(data)
|
||||
|
||||
print("* done recording")
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
p.terminate()
|
||||
|
||||
wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
|
||||
wf.setnchannels(CHANNELS)
|
||||
wf.setsampwidth(p.get_sample_size(FORMAT))
|
||||
wf.setframerate(RATE)
|
||||
wf.writeframes(b''.join(frames))
|
||||
wf.close()
|
|
@ -0,0 +1,134 @@
|
|||
"""
|
||||
PyAudio Example:
|
||||
|
||||
Query and print PortAudio HostAPIs, Devices, and their
|
||||
support rates.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
|
||||
standard_sample_rates = [8000.0, 9600.0, 11025.0, 12000.0,
|
||||
16000.0, 22050.0, 24000.0, 32000.0,
|
||||
44100.0, 48000.0, 88200.0, 96000.0,
|
||||
192000.0]
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
max_apis = p.get_host_api_count()
|
||||
max_devs = p.get_device_count()
|
||||
|
||||
print("\nPortAudio System Info:\n======================")
|
||||
print("Version: %d" % pyaudio.get_portaudio_version())
|
||||
print("Version Text: %s" % pyaudio.get_portaudio_version_text())
|
||||
print("Number of Host APIs: %d" % max_apis)
|
||||
print("Number of Devices : %d" % max_devs)
|
||||
|
||||
print("\nHost APIs:\n==========")
|
||||
|
||||
for i in range(max_apis):
|
||||
apiinfo = p.get_host_api_info_by_index(i)
|
||||
for k in list(apiinfo.items()):
|
||||
print("%s: %s" % k)
|
||||
print("--------------------------")
|
||||
|
||||
print("\nDevices:\n========")
|
||||
|
||||
for i in range(max_devs):
|
||||
devinfo = p.get_device_info_by_index(i)
|
||||
|
||||
# print out device parameters
|
||||
for k in list(devinfo.items()):
|
||||
name, value = k
|
||||
|
||||
# if host API, then get friendly name
|
||||
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
|
||||
# Crashing? See http://stackoverflow.com/a/5146914
|
||||
print("\t%s: %s" % (name, value))
|
||||
|
||||
# print out supported format rates
|
||||
|
||||
input_supported_rates = []
|
||||
output_supported_rates = []
|
||||
full_duplex_rates = []
|
||||
|
||||
for f in standard_sample_rates:
|
||||
|
||||
if devinfo['maxInputChannels'] > 0:
|
||||
try:
|
||||
if p.is_format_supported(
|
||||
f,
|
||||
input_device = devinfo['index'],
|
||||
input_channels = devinfo['maxInputChannels'],
|
||||
input_format = pyaudio.paInt16):
|
||||
input_supported_rates.append(f)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if devinfo['maxOutputChannels'] > 0:
|
||||
try:
|
||||
if p.is_format_supported(
|
||||
f,
|
||||
output_device = devinfo['index'],
|
||||
output_channels = devinfo['maxOutputChannels'],
|
||||
output_format = pyaudio.paInt16):
|
||||
output_supported_rates.append(f)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if (devinfo['maxInputChannels'] > 0) and \
|
||||
(devinfo['maxOutputChannels'] > 0):
|
||||
try:
|
||||
if p.is_format_supported(
|
||||
f,
|
||||
input_device = devinfo['index'],
|
||||
input_channels = devinfo['maxInputChannels'],
|
||||
input_format = pyaudio.paInt16,
|
||||
output_device = devinfo['index'],
|
||||
output_channels = devinfo['maxOutputChannels'],
|
||||
output_format = pyaudio.paInt16):
|
||||
full_duplex_rates.append(f)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
if len(input_supported_rates):
|
||||
print("\tInput rates: %s" % input_supported_rates)
|
||||
if len(output_supported_rates):
|
||||
print("\tOutput rates: %s" % output_supported_rates)
|
||||
if len(full_duplex_rates):
|
||||
print("\tFull duplex: %s" % full_duplex_rates)
|
||||
|
||||
print("\t--------------------------------")
|
||||
|
||||
print("\nDefault Devices:\n================")
|
||||
try:
|
||||
def_index = p.get_default_input_device_info()['index']
|
||||
print("Default Input Device : %s" % def_index)
|
||||
devinfo = p.get_device_info_by_index(def_index)
|
||||
for k in list(devinfo.items()):
|
||||
name, value = k
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
print("\t%s: %s" % (name, value))
|
||||
print("\t--------------------------------")
|
||||
except IOError as e:
|
||||
print("No Input devices: %s" % e[0])
|
||||
|
||||
try:
|
||||
def_index = p.get_default_output_device_info()['index']
|
||||
print("Default Output Device: %s" % def_index)
|
||||
devinfo = p.get_device_info_by_index(def_index)
|
||||
for k in list(devinfo.items()):
|
||||
name, value = k
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
print("\t%s: %s" % (name, value))
|
||||
print("\t--------------------------------")
|
||||
except IOError as e:
|
||||
print("No Output devices: %s" % e[0])
|
||||
|
||||
p.terminate()
|
|
@ -0,0 +1,42 @@
|
|||
"""
|
||||
PyAudio Example: Make a wire between input and output (i.e., record a
|
||||
few samples and play them back immediately).
|
||||
|
||||
This is the callback (non-blocking) version.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import time
|
||||
import sys
|
||||
|
||||
WIDTH = 2
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
DURATION = 5
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
def callback(in_data, frame_count, time_info, status):
|
||||
return (in_data, pyaudio.paContinue)
|
||||
|
||||
stream = p.open(format=p.get_format_from_width(WIDTH),
|
||||
channels=CHANNELS,
|
||||
rate=RATE,
|
||||
input=True,
|
||||
output=True,
|
||||
stream_callback=callback)
|
||||
|
||||
stream.start_stream()
|
||||
|
||||
start = time.time()
|
||||
|
||||
while stream.is_active() and (time.time() - start) < DURATION:
|
||||
time.sleep(0.1)
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
|
||||
p.terminate()
|
|
@ -0,0 +1,40 @@
|
|||
"""
|
||||
PyAudio Example: Make a wire between input and output (i.e., record a
|
||||
few samples and play them back immediately).
|
||||
|
||||
This is the full duplex version.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import sys
|
||||
|
||||
CHUNK = 1024
|
||||
WIDTH = 2
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
stream = p.open(format=p.get_format_from_width(WIDTH),
|
||||
channels=CHANNELS,
|
||||
rate=RATE,
|
||||
input=True,
|
||||
output=True,
|
||||
frames_per_buffer=CHUNK)
|
||||
|
||||
print("* recording")
|
||||
|
||||
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
|
||||
data = stream.read(CHUNK)
|
||||
stream.write(data, CHUNK)
|
||||
|
||||
print("* done")
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
|
||||
p.terminate()
|
|
@ -0,0 +1,48 @@
|
|||
"""
|
||||
PyAudio Example: Make a wire between input and output (i.e., record a
|
||||
few samples and play them back immediately).
|
||||
|
||||
This is the half duplex version.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import sys
|
||||
|
||||
CHUNK = 1024
|
||||
WIDTH = 2
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
# Open input stream using default device:
|
||||
stream_input = p.open(format=p.get_format_from_width(WIDTH),
|
||||
channels=CHANNELS,
|
||||
rate=RATE,
|
||||
input=True,
|
||||
frames_per_buffer=CHUNK)
|
||||
|
||||
# Open out stream using default device:
|
||||
stream_output = p.open(format=p.get_format_from_width(WIDTH),
|
||||
channels=CHANNELS,
|
||||
rate=RATE,
|
||||
output=True,
|
||||
frames_per_buffer=CHUNK)
|
||||
|
||||
print("* recording")
|
||||
|
||||
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
|
||||
data = stream_input.read(CHUNK)
|
||||
stream_output.write(data, CHUNK)
|
||||
|
||||
print("* done")
|
||||
|
||||
stream_input.stop_stream()
|
||||
stream_output.stop_stream()
|
||||
stream_input.close()
|
||||
stream_output.close()
|
||||
p.terminate()
|
|
@ -1,74 +0,0 @@
|
|||
======================================================================
|
||||
PyAudio v0.2.0 Compilation Hints
|
||||
======================================================================
|
||||
|
||||
Here are some hints for compiling PortAudio and PyAudio on various
|
||||
platforms:
|
||||
|
||||
* General UNIX Guide: (GNU/Linux, Mac OS X, Cygwin)
|
||||
* Microsoft Windows (native)
|
||||
|
||||
Generally speaking, you must first install the PortAudio v19 library
|
||||
before building PyAudio.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
General UNIX Guide (GNU/Linux, Mac OS X, Cygwin)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
1. Build and install PortAudio, i.e.:
|
||||
|
||||
% ./configure
|
||||
% make
|
||||
% make install # you may need to be root
|
||||
|
||||
(Or better yet, use your package manager to install PortAudio v19)
|
||||
|
||||
2. Extract PyAudio; to build and install, run:
|
||||
|
||||
% python setup.py install
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Microsoft Windows
|
||||
----------------------------------------------------------------------
|
||||
|
||||
If you are targeting native Win32 Python, you will need either
|
||||
Microsoft Visual Studio or MinGW (via Cygwin). Here are compilation
|
||||
hints for using MinGW under the Cygwin build environment.
|
||||
|
||||
Note: I've only tested this under Cygwin's build environment. Your
|
||||
mileage may vary in other environments (i.e., compiling PortAudio with
|
||||
MinGW's compiler and environment).
|
||||
|
||||
(If you have instructions for building PyAudio using Visual Studio,
|
||||
I'd love to hear about it.)
|
||||
|
||||
1. Download PortAudio to portaudio-v19/ and build; when running
|
||||
configure, be sure to use ``-mno-cygwin`` (under cygwin) to
|
||||
generate native Win32 binaries:
|
||||
|
||||
% CFLAGS="-mno-cygwin" LDFLAGS="-mno-cygwin" ./configure
|
||||
% make
|
||||
|
||||
2. Untar PyAudio in the same (parent) directory that contains your
|
||||
PortAudio directory. For example, if your PortAudio v19 directory
|
||||
is ~/portaudio-v19/, then the PyAudio source should be in
|
||||
~/pyaudio-0.2.0/
|
||||
|
||||
3. To build PyAudio, from inside the pyaudio-0.2.0/ directory, run:
|
||||
|
||||
% python setup.py build --static-link -cmingw32
|
||||
|
||||
Be sure to invoke the native Win32 python rather than cygwin's
|
||||
python. The --static-link option statically links in the PortAudio
|
||||
library to the PyAudio module, which is probably the best way to go
|
||||
on Windows.
|
||||
|
||||
4. To install PyAudio:
|
||||
|
||||
% python setup.py install --skip-build
|
||||
|
||||
The --skip-build option prevents Python from searching your system
|
||||
for Visual Studio and the .NET framework.
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
# This is the PyAudio distribution makefile. You probably
|
||||
# don't care about this unless you're interested in making
|
||||
# PyAudio binary packages for various platforms.
|
||||
|
||||
.PHONY: pyaudio_lib docs
|
||||
|
||||
# documentation
|
||||
EPYDOC=epydoc
|
||||
DOCS_OUTPUT=docs/
|
||||
DOC_NAME=PyAudio-0.2.0
|
||||
DOC_URL=http://people.csail.mit.edu/hubert/pyaudio/
|
||||
|
||||
SYSTEM_PYTHON25_DIR=/System/Library/Frameworks/Python.framework/Versions/2.5/bin
|
||||
MAC_PYTHON25_DIR=/Library/Frameworks/Python.framework/Versions/2.5/bin
|
||||
MAC_PYTHON24_DIR=/Library/Frameworks/Python.framework/Versions/2.4/bin
|
||||
|
||||
SYSTEM_PYTHON25_BDIST=/usr/local/bin/bdist_mpkg
|
||||
MAC_PYTHON25_BDIST=$(MAC_PYTHON25_DIR)/bdist_mpkg
|
||||
MAC_PYTHON24_BDIST=$(MAC_PYTHON24_DIR)/bdist_mpkg
|
||||
|
||||
PYTHON25_PKG="dist/PyAudio-0.2.0-py2.5-macosx10.5.mpkg"
|
||||
SYS_PYTHON25_PKG="dist/PyAudio-0.2.0-sys-py2.5-macosx10.5.mpkg"
|
||||
MAC_PYTHON25_PKG="dist/PyAudio-0.2.0-mac-py2.5-macosx10.5.mpkg"
|
||||
MAC_PYTHON24_PKG="dist/PyAudio-0.2.0-py2.4-macosx10.5.mpkg"
|
||||
|
||||
INPUT="dist/pyaudio-0.2.0.mpkg"
|
||||
|
||||
PACKAGEMAKER="/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
|
||||
PACKAGEDOC="packaging/pyaudio-0.2.0-mpkg.pmdoc"
|
||||
|
||||
VERSION=0.2.0
|
||||
DIST=dist
|
||||
PACKAGING=packaging
|
||||
VOLNAME_FILENAME=pyaudio-$(VERSION)
|
||||
VOLNAME=PyAudio\ $(VERSION)
|
||||
DS_STORE=DS_Store
|
||||
# add 20480 sectors (~10MB) for safety; we'll shrink it later
|
||||
SECTORS=`du -s $(INPUT) | awk '{print $$1 + 20480}'`
|
||||
HDIUTIL=hdiutil
|
||||
MAC_SNAKEY=snakey.tif
|
||||
|
||||
what:
|
||||
@echo "make targets:"
|
||||
@echo
|
||||
@echo " win32 : windows installer"
|
||||
@echo " macosx : mac os x installer"
|
||||
@echo " deb : debian package"
|
||||
@echo " docs : documentation"
|
||||
macosx:
|
||||
rm -rf $(SYS_PYTHON25_PKG) $(MAC_PYTHON25_PKG) $(MAC_PYTHON24_PKG)
|
||||
|
||||
@echo "Building System Python 2.5 Package"
|
||||
$(SYSTEM_PYTHON25_DIR)/python setup.py build --static-link
|
||||
$(SYSTEM_PYTHON25_BDIST)
|
||||
mv $(PYTHON25_PKG) $(SYS_PYTHON25_PKG)
|
||||
|
||||
@echo "Building MacPython 2.5 Package"
|
||||
$(MAC_PYTHON25_DIR)/python setup.py build --static-link
|
||||
$(MAC_PYTHON25_BDIST)
|
||||
mv $(PYTHON25_PKG) $(MAC_PYTHON25_PKG)
|
||||
|
||||
@echo "Building MacPython 2.4 Package"
|
||||
$(MAC_PYTHON24_DIR)/python setup.py build --static-link
|
||||
$(MAC_PYTHON24_BDIST)
|
||||
|
||||
@echo "Making Meta Package"
|
||||
$(PACKAGEMAKER) --doc $(PACKAGEDOC) --out $(INPUT)
|
||||
|
||||
rm -f $(DIST)/$(VOLNAME_FILENAME).dmg
|
||||
|
||||
@echo "Creating a DMG with $(SECTORS) sectors"
|
||||
|
||||
$(HDIUTIL) create -sectors $(SECTORS) -fs HFS+ -volname $(VOLNAME) $(DIST)/$(VOLNAME_FILENAME).dmg
|
||||
$(HDIUTIL) attach $(DIST)/$(VOLNAME_FILENAME).dmg
|
||||
@echo "Copying Data"
|
||||
mkdir /Volumes/$(VOLNAME)/.packaging
|
||||
cp $(PACKAGING)/$(DS_STORE) /Volumes/$(VOLNAME)/.$(DS_STORE)
|
||||
cp $(PACKAGING)/$(MAC_SNAKEY) /Volumes/$(VOLNAME)/.packaging/$(MAC_SNAKEY)
|
||||
cp -r $(INPUT) /Volumes/$(VOLNAME)/Install\ PyAudio.mpkg
|
||||
SetFile -a E /Volumes/$(VOLNAME)/Install\ PyAudio.mpkg
|
||||
@echo "Done Copying"
|
||||
$(HDIUTIL) detach /Volumes/$(VOLNAME)
|
||||
@echo "Resizing DMG"
|
||||
$(HDIUTIL) resize -sectors `$(HDIUTIL) resize $(DIST)/$(VOLNAME_FILENAME).dmg | awk '{print $$1}'` $(DIST)/$(VOLNAME_FILENAME).dmg
|
||||
@echo "Compressing DMG"
|
||||
$(HDIUTIL) convert -imagekey zlib-level=9 -format UDZO $(DIST)/$(VOLNAME_FILENAME).dmg -o $(DIST)/$(VOLNAME_FILENAME).tmp.dmg
|
||||
mv $(DIST)/$(VOLNAME_FILENAME).tmp.dmg $(DIST)/$(VOLNAME_FILENAME).dmg
|
||||
|
||||
win32:
|
||||
python2 setup.py build -cmingw32 --static-link
|
||||
python2 setup.py bdist_wininst --skip-build -t PyAudio \
|
||||
--bitmap=$(PACKAGING)/win-background.bmp \
|
||||
# --install-script=postinst.py \
|
||||
|
||||
deb:
|
||||
debuild -uc -us
|
||||
|
||||
docs:
|
||||
$(EPYDOC) -v -o $(DOCS_OUTPUT) --name $(DOC_NAME) --url $(DOC_URL) \
|
||||
--no-private pyaudio.py
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +0,0 @@
|
|||
python-pyaudio (0.2.0) unstable; urgency=low
|
||||
|
||||
* Initial version
|
||||
|
||||
-- Justin Mazzola Paluska <jmp@mit.edu> Fri, 08 Feb 2008 13:47:27 -0500
|
||||
|
|
@ -1 +0,0 @@
|
|||
5
|
|
@ -1,12 +0,0 @@
|
|||
Source: python-pyaudio
|
||||
Section: sound
|
||||
Priority: optional
|
||||
Standards-Version: 3.7.3
|
||||
Build-Depends: python-all-dev, python-support (>= 0.6), debhelper(>= 5), portaudio19-dev
|
||||
Maintainer: Justin Mazzola Paluska <jmp@mit.edu>
|
||||
|
||||
Package: python-pyaudio
|
||||
Depends: ${python:Depends}, libportaudio2
|
||||
Provides: ${python:Provides}
|
||||
Architecture: any
|
||||
Description: Python bindings for PortAudio v19
|
|
@ -1,22 +0,0 @@
|
|||
PyAudio is distributed under the MIT License. That is to say,
|
||||
|
||||
Copyright (c) 2006-2008 Hubert Pham
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,2 +0,0 @@
|
|||
README
|
||||
INSTALL
|
|
@ -1,6 +0,0 @@
|
|||
tests/error.py
|
||||
tests/play_wave.py
|
||||
tests/record.py
|
||||
tests/system_info.py
|
||||
tests/wire2.py
|
||||
tests/wire.py
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- mode: makefile -*-
|
||||
|
||||
DH_VERBOSE=1
|
||||
DEB_PYTHON_SYSTEM := pysupport
|
||||
|
||||
PYVERS=$(shell pyversions -vs)
|
||||
|
||||
build: $(PYVERS:%=build-python%)
|
||||
touch $@
|
||||
build-python%:
|
||||
dh_testdir
|
||||
python$* setup.py build
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
rm -rf build build-python*
|
||||
dh_clean
|
||||
|
||||
|
||||
install: build $(PYVERS:%=install-python%)
|
||||
install-python%:
|
||||
python$* setup.py install --root=$(CURDIR)/debian/python-pyaudio
|
||||
|
||||
binary: binary-arch
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
dh_installexamples
|
||||
dh_strip
|
||||
dh_fixperms
|
||||
dh_pysupport
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
pyaudio pyaudio-module.html
|
||||
pyaudio.get_sample_size pyaudio-module.html#get_sample_size
|
||||
pyaudio.paInt8 pyaudio-module.html#paInt8
|
||||
pyaudio.paNoError pyaudio-module.html#paNoError
|
||||
pyaudio.paInDevelopment pyaudio-module.html#paInDevelopment
|
||||
pyaudio.paSoundManager pyaudio-module.html#paSoundManager
|
||||
pyaudio.paInvalidHostApi pyaudio-module.html#paInvalidHostApi
|
||||
pyaudio.paCanNotReadFromAnOutputOnlyStream pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream
|
||||
pyaudio.paStreamIsNotStopped pyaudio-module.html#paStreamIsNotStopped
|
||||
pyaudio.PaSampleFormat pyaudio-module.html#PaSampleFormat
|
||||
pyaudio.paBadIODeviceCombination pyaudio-module.html#paBadIODeviceCombination
|
||||
pyaudio.paOSS pyaudio-module.html#paOSS
|
||||
pyaudio.paIncompatibleStreamHostApi pyaudio-module.html#paIncompatibleStreamHostApi
|
||||
pyaudio.paInputOverflowed pyaudio-module.html#paInputOverflowed
|
||||
pyaudio.paInvalidDevice pyaudio-module.html#paInvalidDevice
|
||||
pyaudio.paFloat32 pyaudio-module.html#paFloat32
|
||||
pyaudio.paInt24 pyaudio-module.html#paInt24
|
||||
pyaudio.__revision__ pyaudio-module.html#__revision__
|
||||
pyaudio.paInsufficientMemory pyaudio-module.html#paInsufficientMemory
|
||||
pyaudio.paInvalidFlag pyaudio-module.html#paInvalidFlag
|
||||
pyaudio.paInvalidSampleRate pyaudio-module.html#paInvalidSampleRate
|
||||
pyaudio.PaErrorCode pyaudio-module.html#PaErrorCode
|
||||
pyaudio.paALSA pyaudio-module.html#paALSA
|
||||
pyaudio.paBeOS pyaudio-module.html#paBeOS
|
||||
pyaudio.paDeviceUnavailable pyaudio-module.html#paDeviceUnavailable
|
||||
pyaudio.paASIO pyaudio-module.html#paASIO
|
||||
pyaudio.get_portaudio_version_text pyaudio-module.html#get_portaudio_version_text
|
||||
pyaudio.paBufferTooSmall pyaudio-module.html#paBufferTooSmall
|
||||
pyaudio.paMME pyaudio-module.html#paMME
|
||||
pyaudio.paCanNotWriteToAnInputOnlyStream pyaudio-module.html#paCanNotWriteToAnInputOnlyStream
|
||||
pyaudio.paWDMKS pyaudio-module.html#paWDMKS
|
||||
pyaudio.get_format_from_width pyaudio-module.html#get_format_from_width
|
||||
pyaudio.paNoDevice pyaudio-module.html#paNoDevice
|
||||
pyaudio.paDirectSound pyaudio-module.html#paDirectSound
|
||||
pyaudio.paTimedOut pyaudio-module.html#paTimedOut
|
||||
pyaudio.paIncompatibleHostApiSpecificStreamInfo pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo
|
||||
pyaudio.paWASAPI pyaudio-module.html#paWASAPI
|
||||
pyaudio.paInt16 pyaudio-module.html#paInt16
|
||||
pyaudio.paCanNotReadFromACallbackStream pyaudio-module.html#paCanNotReadFromACallbackStream
|
||||
pyaudio.paInt32 pyaudio-module.html#paInt32
|
||||
pyaudio.paInvalidChannelCount pyaudio-module.html#paInvalidChannelCount
|
||||
pyaudio.paJACK pyaudio-module.html#paJACK
|
||||
pyaudio.paCustomFormat pyaudio-module.html#paCustomFormat
|
||||
pyaudio.paBufferTooBig pyaudio-module.html#paBufferTooBig
|
||||
pyaudio.paNotInitialized pyaudio-module.html#paNotInitialized
|
||||
pyaudio.paStreamIsStopped pyaudio-module.html#paStreamIsStopped
|
||||
pyaudio.PaHostApiTypeId pyaudio-module.html#PaHostApiTypeId
|
||||
pyaudio.paUInt8 pyaudio-module.html#paUInt8
|
||||
pyaudio.paOutputUnderflowed pyaudio-module.html#paOutputUnderflowed
|
||||
pyaudio.paHostApiNotFound pyaudio-module.html#paHostApiNotFound
|
||||
pyaudio.paUnanticipatedHostError pyaudio-module.html#paUnanticipatedHostError
|
||||
pyaudio.paCoreAudio pyaudio-module.html#paCoreAudio
|
||||
pyaudio.paInternalError pyaudio-module.html#paInternalError
|
||||
pyaudio.paAL pyaudio-module.html#paAL
|
||||
pyaudio.paCanNotWriteToACallbackStream pyaudio-module.html#paCanNotWriteToACallbackStream
|
||||
pyaudio.get_portaudio_version pyaudio-module.html#get_portaudio_version
|
||||
pyaudio.paNullCallback pyaudio-module.html#paNullCallback
|
||||
pyaudio.paBadStreamPtr pyaudio-module.html#paBadStreamPtr
|
||||
pyaudio.paSampleFormatNotSupported pyaudio-module.html#paSampleFormatNotSupported
|
||||
pyaudio.PaMacCoreStreamInfo pyaudio.PaMacCoreStreamInfo-class.html
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreFailIfConversionRequired pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreFailIfConversionRequired
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreConversionQualityMedium pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMedium
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCorePro pyaudio.PaMacCoreStreamInfo-class.html#paMacCorePro
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreConversionQualityMax pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMax
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreMinimizeCPUButPlayNice pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreMinimizeCPUButPlayNice
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreConversionQualityMin pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMin
|
||||
pyaudio.PaMacCoreStreamInfo.get_channel_map pyaudio.PaMacCoreStreamInfo-class.html#get_channel_map
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreConversionQualityLow pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityLow
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCorePlayNice pyaudio.PaMacCoreStreamInfo-class.html#paMacCorePlayNice
|
||||
pyaudio.PaMacCoreStreamInfo.get_flags pyaudio.PaMacCoreStreamInfo-class.html#get_flags
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreConversionQualityHigh pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityHigh
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreMinimizeCPU pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreMinimizeCPU
|
||||
pyaudio.PaMacCoreStreamInfo._get_host_api_stream_object pyaudio.PaMacCoreStreamInfo-class.html#_get_host_api_stream_object
|
||||
pyaudio.PaMacCoreStreamInfo.paMacCoreChangeDeviceParameters pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreChangeDeviceParameters
|
||||
pyaudio.PaMacCoreStreamInfo.__init__ pyaudio.PaMacCoreStreamInfo-class.html#__init__
|
||||
pyaudio.PyAudio pyaudio.PyAudio-class.html
|
||||
pyaudio.PyAudio.get_sample_size pyaudio.PyAudio-class.html#get_sample_size
|
||||
pyaudio.PyAudio.get_host_api_count pyaudio.PyAudio-class.html#get_host_api_count
|
||||
pyaudio.PyAudio._make_device_info_dictionary pyaudio.PyAudio-class.html#_make_device_info_dictionary
|
||||
pyaudio.PyAudio.open pyaudio.PyAudio-class.html#open
|
||||
pyaudio.PyAudio.get_device_info_by_host_api_device_index pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index
|
||||
pyaudio.PyAudio.get_format_from_width pyaudio.PyAudio-class.html#get_format_from_width
|
||||
pyaudio.PyAudio.get_default_input_device_info pyaudio.PyAudio-class.html#get_default_input_device_info
|
||||
pyaudio.PyAudio.terminate pyaudio.PyAudio-class.html#terminate
|
||||
pyaudio.PyAudio.get_host_api_info_by_type pyaudio.PyAudio-class.html#get_host_api_info_by_type
|
||||
pyaudio.PyAudio._make_host_api_dictionary pyaudio.PyAudio-class.html#_make_host_api_dictionary
|
||||
pyaudio.PyAudio._remove_stream pyaudio.PyAudio-class.html#_remove_stream
|
||||
pyaudio.PyAudio.__init__ pyaudio.PyAudio-class.html#__init__
|
||||
pyaudio.PyAudio.close pyaudio.PyAudio-class.html#close
|
||||
pyaudio.PyAudio.get_device_info_by_index pyaudio.PyAudio-class.html#get_device_info_by_index
|
||||
pyaudio.PyAudio.get_host_api_info_by_index pyaudio.PyAudio-class.html#get_host_api_info_by_index
|
||||
pyaudio.PyAudio.is_format_supported pyaudio.PyAudio-class.html#is_format_supported
|
||||
pyaudio.PyAudio.get_default_host_api_info pyaudio.PyAudio-class.html#get_default_host_api_info
|
||||
pyaudio.PyAudio.get_device_count pyaudio.PyAudio-class.html#get_device_count
|
||||
pyaudio.PyAudio.get_default_output_device_info pyaudio.PyAudio-class.html#get_default_output_device_info
|
||||
pyaudio.Stream pyaudio.Stream-class.html
|
||||
pyaudio.Stream.write pyaudio.Stream-class.html#write
|
||||
pyaudio.Stream.get_write_available pyaudio.Stream-class.html#get_write_available
|
||||
pyaudio.Stream.close pyaudio.Stream-class.html#close
|
||||
pyaudio.Stream.is_active pyaudio.Stream-class.html#is_active
|
||||
pyaudio.Stream.read pyaudio.Stream-class.html#read
|
||||
pyaudio.Stream.get_output_latency pyaudio.Stream-class.html#get_output_latency
|
||||
pyaudio.Stream.get_input_latency pyaudio.Stream-class.html#get_input_latency
|
||||
pyaudio.Stream.stop_stream pyaudio.Stream-class.html#stop_stream
|
||||
pyaudio.Stream.get_cpu_load pyaudio.Stream-class.html#get_cpu_load
|
||||
pyaudio.Stream.is_stopped pyaudio.Stream-class.html#is_stopped
|
||||
pyaudio.Stream.start_stream pyaudio.Stream-class.html#start_stream
|
||||
pyaudio.Stream.get_time pyaudio.Stream-class.html#get_time
|
||||
pyaudio.Stream.get_read_available pyaudio.Stream-class.html#get_read_available
|
||||
pyaudio.Stream.__init__ pyaudio.Stream-class.html#__init__
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="class-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Class Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink"><a href="pyaudio.PaMacCoreStreamInfo-class.html">pyaudio.PaMacCoreStreamInfo</a></strong>:
|
||||
<em class="summary">Mac OS X-only: PaMacCoreStreamInfo is a PortAudio Host API
|
||||
Specific Stream Info data structure for specifying Mac OS
|
||||
X-only settings.</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pyaudio.PyAudio-class.html">pyaudio.PyAudio</a></strong>:
|
||||
<em class="summary">initialize and terminate PortAudio</em>
|
||||
</li>
|
||||
<li> <strong class="uidlink"><a href="pyaudio.Stream-class.html">pyaudio.Stream</a></strong>:
|
||||
<em class="summary">PortAudio Stream Wrapper.</em>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:44 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Before Width: | Height: | Size: 340 B |
|
@ -1,322 +0,0 @@
|
|||
|
||||
|
||||
/* Epydoc CSS Stylesheet
|
||||
*
|
||||
* This stylesheet can be used to customize the appearance of epydoc's
|
||||
* HTML output.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default Colors & Styles
|
||||
* - Set the default foreground & background color with 'body'; and
|
||||
* link colors with 'a:link' and 'a:visited'.
|
||||
* - Use bold for decision list terms.
|
||||
* - The heading styles defined here are used for headings *within*
|
||||
* docstring descriptions. All headings used by epydoc itself use
|
||||
* either class='epydoc' or class='toc' (CSS styles for both
|
||||
* defined below).
|
||||
*/
|
||||
body { background: #ffffff; color: #000000; }
|
||||
p { margin-top: 0.5em; margin-bottom: 0.5em; }
|
||||
a:link { color: #0000ff; }
|
||||
a:visited { color: #204080; }
|
||||
dt { font-weight: bold; }
|
||||
h1 { font-size: +140%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h2 { font-size: +125%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h3 { font-size: +110%; font-style: italic;
|
||||
font-weight: normal; }
|
||||
code { font-size: 100%; }
|
||||
/* N.B.: class, not pseudoclass */
|
||||
a.link { font-family: monospace; }
|
||||
|
||||
/* Page Header & Footer
|
||||
* - The standard page header consists of a navigation bar (with
|
||||
* pointers to standard pages such as 'home' and 'trees'); a
|
||||
* breadcrumbs list, which can be used to navigate to containing
|
||||
* classes or modules; options links, to show/hide private
|
||||
* variables and to show/hide frames; and a page title (using
|
||||
* <h1>). The page title may be followed by a link to the
|
||||
* corresponding source code (using 'span.codelink').
|
||||
* - The footer consists of a navigation bar, a timestamp, and a
|
||||
* pointer to epydoc's homepage.
|
||||
*/
|
||||
h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
|
||||
h2.epydoc { font-size: +130%; font-weight: bold; }
|
||||
h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-top: 0.2em; }
|
||||
td h3.epydoc { font-size: +115%; font-weight: bold;
|
||||
margin-bottom: 0; }
|
||||
table.navbar { background: #a0c0ff; color: #000000;
|
||||
border: 2px groove #c0d0d0; }
|
||||
table.navbar table { color: #000000; }
|
||||
th.navbar-select { background: #70b0ff;
|
||||
color: #000000; }
|
||||
table.navbar a { text-decoration: none; }
|
||||
table.navbar a:link { color: #0000ff; }
|
||||
table.navbar a:visited { color: #204080; }
|
||||
span.breadcrumbs { font-size: 85%; font-weight: bold; }
|
||||
span.options { font-size: 70%; }
|
||||
span.codelink { font-size: 85%; }
|
||||
td.footer { font-size: 85%; }
|
||||
|
||||
/* Table Headers
|
||||
* - Each summary table and details section begins with a 'header'
|
||||
* row. This row contains a section title (marked by
|
||||
* 'span.table-header') as well as a show/hide private link
|
||||
* (marked by 'span.options', defined above).
|
||||
* - Summary tables that contain user-defined groups mark those
|
||||
* groups using 'group header' rows.
|
||||
*/
|
||||
td.table-header { background: #70b0ff; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.table-header table { color: #000000; }
|
||||
td.table-header table a:link { color: #0000ff; }
|
||||
td.table-header table a:visited { color: #204080; }
|
||||
span.table-header { font-size: 120%; font-weight: bold; }
|
||||
th.group-header { background: #c0e0f8; color: #000000;
|
||||
text-align: left; font-style: italic;
|
||||
font-size: 115%;
|
||||
border: 1px solid #608090; }
|
||||
|
||||
/* Summary Tables (functions, variables, etc)
|
||||
* - Each object is described by a single row of the table with
|
||||
* two cells. The left cell gives the object's type, and is
|
||||
* marked with 'code.summary-type'. The right cell gives the
|
||||
* object's name and a summary description.
|
||||
* - CSS styles for the table's header and group headers are
|
||||
* defined above, under 'Table Headers'
|
||||
*/
|
||||
table.summary { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin-bottom: 0.5em; }
|
||||
td.summary { border: 1px solid #608090; }
|
||||
code.summary-type { font-size: 85%; }
|
||||
table.summary a:link { color: #0000ff; }
|
||||
table.summary a:visited { color: #204080; }
|
||||
|
||||
|
||||
/* Details Tables (functions, variables, etc)
|
||||
* - Each object is described in its own div.
|
||||
* - A single-row summary table w/ table-header is used as
|
||||
* a header for each details section (CSS style for table-header
|
||||
* is defined above, under 'Table Headers').
|
||||
*/
|
||||
table.details { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
table.details table { color: #000000; }
|
||||
table.details a:link { color: #0000ff; }
|
||||
table.details a:visited { color: #204080; }
|
||||
|
||||
/* Fields */
|
||||
dl.fields { margin-left: 2em; margin-top: 1em;
|
||||
margin-bottom: 1em; }
|
||||
dl.fields dd ul { margin-left: 0em; padding-left: 0em; }
|
||||
dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; }
|
||||
div.fields { margin-left: 2em; }
|
||||
div.fields p { margin-bottom: 0.5em; }
|
||||
|
||||
/* Index tables (identifier index, term index, etc)
|
||||
* - link-index is used for indices containing lists of links
|
||||
* (namely, the identifier index & term index).
|
||||
* - index-where is used in link indices for the text indicating
|
||||
* the container/source for each link.
|
||||
* - metadata-index is used for indices containing metadata
|
||||
* extracted from fields (namely, the bug index & todo index).
|
||||
*/
|
||||
table.link-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090; }
|
||||
td.link-index { border-width: 0px; }
|
||||
table.link-index a:link { color: #0000ff; }
|
||||
table.link-index a:visited { color: #204080; }
|
||||
span.index-where { font-size: 70%; }
|
||||
table.metadata-index { border-collapse: collapse;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #608090;
|
||||
margin: .2em 0 0 0; }
|
||||
td.metadata-index { border-width: 1px; border-style: solid; }
|
||||
table.metadata-index a:link { color: #0000ff; }
|
||||
table.metadata-index a:visited { color: #204080; }
|
||||
|
||||
/* Function signatures
|
||||
* - sig* is used for the signature in the details section.
|
||||
* - .summary-sig* is used for the signature in the summary
|
||||
* table, and when listing property accessor functions.
|
||||
* */
|
||||
.sig-name { color: #006080; }
|
||||
.sig-arg { color: #008060; }
|
||||
.sig-default { color: #602000; }
|
||||
.summary-sig { font-family: monospace; }
|
||||
.summary-sig-name { color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:link
|
||||
{ color: #006080; font-weight: bold; }
|
||||
table.summary a.summary-sig-name:visited
|
||||
{ color: #006080; font-weight: bold; }
|
||||
.summary-sig-arg { color: #006040; }
|
||||
.summary-sig-default { color: #501800; }
|
||||
|
||||
/* Subclass list
|
||||
*/
|
||||
ul.subclass-list { display: inline; margin: 0; padding: 0; }
|
||||
ul.subclass-list li { display: inline; margin: 0; padding: 0; }
|
||||
|
||||
/* To render variables, classes etc. like functions */
|
||||
table.summary .summary-name { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:link { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
table.summary
|
||||
a.summary-name:visited { color: #006080; font-weight: bold;
|
||||
font-family: monospace; }
|
||||
|
||||
/* Variable values
|
||||
* - In the 'variable details' sections, each varaible's value is
|
||||
* listed in a 'pre.variable' box. The width of this box is
|
||||
* restricted to 80 chars; if the value's repr is longer than
|
||||
* this it will be wrapped, using a backslash marked with
|
||||
* class 'variable-linewrap'. If the value's repr is longer
|
||||
* than 3 lines, the rest will be ellided; and an ellipsis
|
||||
* marker ('...' marked with 'variable-ellipsis') will be used.
|
||||
* - If the value is a string, its quote marks will be marked
|
||||
* with 'variable-quote'.
|
||||
* - If the variable is a regexp, it is syntax-highlighted using
|
||||
* the re* CSS classes.
|
||||
*/
|
||||
pre.variable { padding: .5em; margin: 0;
|
||||
background: #dce4ec; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
.variable-linewrap { color: #604000; font-weight: bold; }
|
||||
.variable-ellipsis { color: #604000; font-weight: bold; }
|
||||
.variable-quote { color: #604000; font-weight: bold; }
|
||||
.variable-group { color: #008000; font-weight: bold; }
|
||||
.variable-op { color: #604000; font-weight: bold; }
|
||||
.variable-string { color: #006030; }
|
||||
.variable-unknown { color: #a00000; font-weight: bold; }
|
||||
.re { color: #000000; }
|
||||
.re-char { color: #006030; }
|
||||
.re-op { color: #600000; }
|
||||
.re-group { color: #003060; }
|
||||
.re-ref { color: #404040; }
|
||||
|
||||
/* Base tree
|
||||
* - Used by class pages to display the base class hierarchy.
|
||||
*/
|
||||
pre.base-tree { font-size: 80%; margin: 0; }
|
||||
|
||||
/* Frames-based table of contents headers
|
||||
* - Consists of two frames: one for selecting modules; and
|
||||
* the other listing the contents of the selected module.
|
||||
* - h1.toc is used for each frame's heading
|
||||
* - h2.toc is used for subheadings within each frame.
|
||||
*/
|
||||
h1.toc { text-align: center; font-size: 105%;
|
||||
margin: 0; font-weight: bold;
|
||||
padding: 0; }
|
||||
h2.toc { font-size: 100%; font-weight: bold;
|
||||
margin: 0.5em 0 0 -0.3em; }
|
||||
|
||||
/* Syntax Highlighting for Source Code
|
||||
* - doctest examples are displayed in a 'pre.py-doctest' block.
|
||||
* If the example is in a details table entry, then it will use
|
||||
* the colors specified by the 'table pre.py-doctest' line.
|
||||
* - Source code listings are displayed in a 'pre.py-src' block.
|
||||
* Each line is marked with 'span.py-line' (used to draw a line
|
||||
* down the left margin, separating the code from the line
|
||||
* numbers). Line numbers are displayed with 'span.py-lineno'.
|
||||
* The expand/collapse block toggle button is displayed with
|
||||
* 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not
|
||||
* modify the font size of the text.)
|
||||
* - If a source code page is opened with an anchor, then the
|
||||
* corresponding code block will be highlighted. The code
|
||||
* block's header is highlighted with 'py-highlight-hdr'; and
|
||||
* the code block's body is highlighted with 'py-highlight'.
|
||||
* - The remaining py-* classes are used to perform syntax
|
||||
* highlighting (py-string for string literals, py-name for names,
|
||||
* etc.)
|
||||
*/
|
||||
pre.py-doctest { padding: .5em; margin: 1em;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #708890; }
|
||||
table pre.py-doctest { background: #dce4ec;
|
||||
color: #000000; }
|
||||
pre.py-src { border: 2px solid #000000;
|
||||
background: #f0f0f0; color: #000000; }
|
||||
.py-line { border-left: 2px solid #000000;
|
||||
margin-left: .2em; padding-left: .4em; }
|
||||
.py-lineno { font-style: italic; font-size: 90%;
|
||||
padding-left: .5em; }
|
||||
a.py-toggle { text-decoration: none; }
|
||||
div.py-highlight-hdr { border-top: 2px solid #000000;
|
||||
border-bottom: 2px solid #000000;
|
||||
background: #d8e8e8; }
|
||||
div.py-highlight { border-bottom: 2px solid #000000;
|
||||
background: #d0e0e0; }
|
||||
.py-prompt { color: #005050; font-weight: bold;}
|
||||
.py-more { color: #005050; font-weight: bold;}
|
||||
.py-string { color: #006030; }
|
||||
.py-comment { color: #003060; }
|
||||
.py-keyword { color: #600000; }
|
||||
.py-output { color: #404040; }
|
||||
.py-name { color: #000050; }
|
||||
.py-name:link { color: #000050 !important; }
|
||||
.py-name:visited { color: #000050 !important; }
|
||||
.py-number { color: #005000; }
|
||||
.py-defname { color: #000060; font-weight: bold; }
|
||||
.py-def-name { color: #000060; font-weight: bold; }
|
||||
.py-base-class { color: #000060; }
|
||||
.py-param { color: #000060; }
|
||||
.py-docstring { color: #006030; }
|
||||
.py-decorator { color: #804020; }
|
||||
/* Use this if you don't want links to names underlined: */
|
||||
/*a.py-name { text-decoration: none; }*/
|
||||
|
||||
/* Graphs & Diagrams
|
||||
* - These CSS styles are used for graphs & diagrams generated using
|
||||
* Graphviz dot. 'img.graph-without-title' is used for bare
|
||||
* diagrams (to remove the border created by making the image
|
||||
* clickable).
|
||||
*/
|
||||
img.graph-without-title { border: none; }
|
||||
img.graph-with-title { border: 1px solid #000000; }
|
||||
span.graph-title { font-weight: bold; }
|
||||
span.graph-caption { }
|
||||
|
||||
/* General-purpose classes
|
||||
* - 'p.indent-wrapped-lines' defines a paragraph whose first line
|
||||
* is not indented, but whose subsequent lines are.
|
||||
* - The 'nomargin-top' class is used to remove the top margin (e.g.
|
||||
* from lists). The 'nomargin' class is used to remove both the
|
||||
* top and bottom margin (but not the left or right margin --
|
||||
* for lists, that would cause the bullets to disappear.)
|
||||
*/
|
||||
p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em;
|
||||
margin: 0; }
|
||||
.nomargin-top { margin-top: 0; }
|
||||
.nomargin { margin-top: 0; margin-bottom: 0; }
|
||||
|
||||
/* HTML Log */
|
||||
div.log-block { padding: 0; margin: .5em 0 .5em 0;
|
||||
background: #e8f0f8; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-error { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffb0b0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-warning { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #ffffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
div.log-info { padding: .1em .3em .1em .3em; margin: 4px;
|
||||
background: #b0ffb0; color: #000000;
|
||||
border: 1px solid #000000; }
|
||||
h2.log-hdr { background: #70b0ff; color: #000000;
|
||||
margin: 0; padding: 0em 0.5em 0em 0.5em;
|
||||
border-bottom: 1px solid #000000; font-size: 110%; }
|
||||
p.log { font-weight: bold; margin: .5em 0 .5em 0; }
|
||||
tr.opt-changed { color: #000000; font-weight: bold; }
|
||||
tr.opt-default { color: #606060; }
|
||||
pre.log { margin: 0; padding: 0; padding-left: 1em; }
|
|
@ -1,293 +0,0 @@
|
|||
function toggle_private() {
|
||||
// Search for any private/public links on this page. Store
|
||||
// their old text in "cmd," so we will know what action to
|
||||
// take; and change their text to the opposite action.
|
||||
var cmd = "?";
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")?
|
||||
"hide private":"show private");
|
||||
}
|
||||
}
|
||||
// Update all DIVs containing private objects.
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
else if (elts[i].className == "public") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none");
|
||||
}
|
||||
}
|
||||
// Update all table rows containing private objects. Note, we
|
||||
// use "" instead of "block" becaue IE & firefox disagree on what
|
||||
// this should be (block vs table-row), and "" just gives the
|
||||
// default for both browsers.
|
||||
var elts = document.getElementsByTagName("tr");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("li");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?
|
||||
"none":"");
|
||||
}
|
||||
}
|
||||
// Update all list items containing private objects.
|
||||
var elts = document.getElementsByTagName("ul");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "private") {
|
||||
elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block");
|
||||
}
|
||||
}
|
||||
// Set a cookie to remember the current option.
|
||||
document.cookie = "EpydocPrivate="+cmd;
|
||||
}
|
||||
function show_private() {
|
||||
var elts = document.getElementsByTagName("a");
|
||||
for(var i=0; i<elts.length; i++) {
|
||||
if (elts[i].className == "privatelink") {
|
||||
cmd = elts[i].innerHTML;
|
||||
if (cmd && cmd.substr(0,4)=="show")
|
||||
toggle_private();
|
||||
}
|
||||
}
|
||||
}
|
||||
function getCookie(name) {
|
||||
var dc = document.cookie;
|
||||
var prefix = name + "=";
|
||||
var begin = dc.indexOf("; " + prefix);
|
||||
if (begin == -1) {
|
||||
begin = dc.indexOf(prefix);
|
||||
if (begin != 0) return null;
|
||||
} else
|
||||
{ begin += 2; }
|
||||
var end = document.cookie.indexOf(";", begin);
|
||||
if (end == -1)
|
||||
{ end = dc.length; }
|
||||
return unescape(dc.substring(begin + prefix.length, end));
|
||||
}
|
||||
function setFrame(url1, url2) {
|
||||
parent.frames[1].location.href = url1;
|
||||
parent.frames[2].location.href = url2;
|
||||
}
|
||||
function checkCookie() {
|
||||
var cmd=getCookie("EpydocPrivate");
|
||||
if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0)
|
||||
toggle_private();
|
||||
}
|
||||
function toggleCallGraph(id) {
|
||||
var elt = document.getElementById(id);
|
||||
if (elt.style.display == "none")
|
||||
elt.style.display = "block";
|
||||
else
|
||||
elt.style.display = "none";
|
||||
}
|
||||
function expand(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "block";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = ""; elt.style.display = "none"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "-"; }
|
||||
}
|
||||
|
||||
function collapse(id) {
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-expanded-linenums");
|
||||
if (elt) elt.style.display = "none";
|
||||
var elt = document.getElementById(id+"-collapsed-linenums");
|
||||
if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; }
|
||||
var elt = document.getElementById(id+"-toggle");
|
||||
if (elt) { elt.innerHTML = "+"; }
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) {
|
||||
elt.style.display = "block";
|
||||
|
||||
var indent = elt.getAttribute("indent");
|
||||
var pad = elt.getAttribute("pad");
|
||||
var s = "<tt class='py-lineno'>";
|
||||
for (var i=0; i<pad.length; i++) { s += " " }
|
||||
s += "</tt>";
|
||||
s += " <tt class='py-line'>";
|
||||
for (var i=0; i<indent.length; i++) { s += " " }
|
||||
s += "<a href='#' onclick='expand(\"" + id;
|
||||
s += "\");return false'>...</a></tt><br />";
|
||||
elt.innerHTML = s;
|
||||
}
|
||||
}
|
||||
|
||||
function toggle(id) {
|
||||
elt = document.getElementById(id+"-toggle");
|
||||
if (elt.innerHTML == "-")
|
||||
collapse(id);
|
||||
else
|
||||
expand(id);
|
||||
return false;
|
||||
}
|
||||
|
||||
function highlight(id) {
|
||||
var elt = document.getElementById(id+"-def");
|
||||
if (elt) elt.className = "py-highlight-hdr";
|
||||
var elt = document.getElementById(id+"-expanded");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
var elt = document.getElementById(id+"-collapsed");
|
||||
if (elt) elt.className = "py-highlight";
|
||||
}
|
||||
|
||||
function num_lines(s) {
|
||||
var n = 1;
|
||||
var pos = s.indexOf("\n");
|
||||
while ( pos > 0) {
|
||||
n += 1;
|
||||
pos = s.indexOf("\n", pos+1);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
// Collapse all blocks that mave more than `min_lines` lines.
|
||||
function collapse_all(min_lines) {
|
||||
var elts = document.getElementsByTagName("div");
|
||||
for (var i=0; i<elts.length; i++) {
|
||||
var elt = elts[i];
|
||||
var split = elt.id.indexOf("-");
|
||||
if (split > 0)
|
||||
if (elt.id.substring(split, elt.id.length) == "-expanded")
|
||||
if (num_lines(elt.innerHTML) > min_lines)
|
||||
collapse(elt.id.substring(0, split));
|
||||
}
|
||||
}
|
||||
|
||||
function expandto(href) {
|
||||
var start = href.indexOf("#")+1;
|
||||
if (start != 0 && start != href.length) {
|
||||
if (href.substring(start, href.length) != "-") {
|
||||
collapse_all(4);
|
||||
pos = href.indexOf(".", start);
|
||||
while (pos != -1) {
|
||||
var id = href.substring(start, pos);
|
||||
expand(id);
|
||||
pos = href.indexOf(".", pos+1);
|
||||
}
|
||||
var id = href.substring(start, href.length);
|
||||
expand(id);
|
||||
highlight(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function kill_doclink(id) {
|
||||
var parent = document.getElementById(id);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
function auto_kill_doclink(ev) {
|
||||
if (!ev) var ev = window.event;
|
||||
if (!this.contains(ev.toElement)) {
|
||||
var parent = document.getElementById(this.parentID);
|
||||
parent.removeChild(parent.childNodes.item(0));
|
||||
}
|
||||
}
|
||||
|
||||
function doclink(id, name, targets_id) {
|
||||
var elt = document.getElementById(id);
|
||||
|
||||
// If we already opened the box, then destroy it.
|
||||
// (This case should never occur, but leave it in just in case.)
|
||||
if (elt.childNodes.length > 1) {
|
||||
elt.removeChild(elt.childNodes.item(0));
|
||||
}
|
||||
else {
|
||||
// The outer box: relative + inline positioning.
|
||||
var box1 = document.createElement("div");
|
||||
box1.style.position = "relative";
|
||||
box1.style.display = "inline";
|
||||
box1.style.top = 0;
|
||||
box1.style.left = 0;
|
||||
|
||||
// A shadow for fun
|
||||
var shadow = document.createElement("div");
|
||||
shadow.style.position = "absolute";
|
||||
shadow.style.left = "-1.3em";
|
||||
shadow.style.top = "-1.3em";
|
||||
shadow.style.background = "#404040";
|
||||
|
||||
// The inner box: absolute positioning.
|
||||
var box2 = document.createElement("div");
|
||||
box2.style.position = "relative";
|
||||
box2.style.border = "1px solid #a0a0a0";
|
||||
box2.style.left = "-.2em";
|
||||
box2.style.top = "-.2em";
|
||||
box2.style.background = "white";
|
||||
box2.style.padding = ".3em .4em .3em .4em";
|
||||
box2.style.fontStyle = "normal";
|
||||
box2.onmouseout=auto_kill_doclink;
|
||||
box2.parentID = id;
|
||||
|
||||
// Get the targets
|
||||
var targets_elt = document.getElementById(targets_id);
|
||||
var targets = targets_elt.getAttribute("targets");
|
||||
var links = "";
|
||||
target_list = targets.split(",");
|
||||
for (var i=0; i<target_list.length; i++) {
|
||||
var target = target_list[i].split("=");
|
||||
links += "<li><a href='" + target[1] +
|
||||
"' style='text-decoration:none'>" +
|
||||
target[0] + "</a></li>";
|
||||
}
|
||||
|
||||
// Put it all together.
|
||||
elt.insertBefore(box1, elt.childNodes.item(0));
|
||||
//box1.appendChild(box2);
|
||||
box1.appendChild(shadow);
|
||||
shadow.appendChild(box2);
|
||||
box2.innerHTML =
|
||||
"Which <b>"+name+"</b> do you want to see documentation for?" +
|
||||
"<ul style='margin-bottom: 0;'>" +
|
||||
links +
|
||||
"<li><a href='#' style='text-decoration:none' " +
|
||||
"onclick='kill_doclink(\""+id+"\");return false;'>"+
|
||||
"<i>None of the above</i></a></li></ul>";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_anchor() {
|
||||
var href = location.href;
|
||||
var start = href.indexOf("#")+1;
|
||||
if ((start != 0) && (start != href.length))
|
||||
return href.substring(start, href.length);
|
||||
}
|
||||
function redirect_url(dottedName) {
|
||||
// Scan through each element of the "pages" list, and check
|
||||
// if "name" matches with any of them.
|
||||
for (var i=0; i<pages.length; i++) {
|
||||
|
||||
// Each page has the form "<pagename>-m" or "<pagename>-c";
|
||||
// extract the <pagename> portion & compare it to dottedName.
|
||||
var pagename = pages[i].substring(0, pages[i].length-2);
|
||||
if (pagename == dottedName.substring(0,pagename.length)) {
|
||||
|
||||
// We've found a page that matches `dottedName`;
|
||||
// construct its URL, using leftover `dottedName`
|
||||
// content to form an anchor.
|
||||
var pagetype = pages[i].charAt(pages[i].length-1);
|
||||
var url = pagename + ((pagetype=="m")?"-module.html":
|
||||
"-class.html");
|
||||
if (dottedName.length > pagename.length)
|
||||
url += "#" + dottedName.substring(pagename.length+1,
|
||||
dottedName.length);
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> PyAudio-0.2.0 </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,277 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Help</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="help.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1 class="epydoc"> API Documentation </h1>
|
||||
|
||||
<p> This document contains the API (Application Programming Interface)
|
||||
documentation for PyAudio-0.2.0. Documentation for the Python
|
||||
objects defined by the project is divided into separate pages for each
|
||||
package, module, and class. The API documentation also includes two
|
||||
pages containing information about the project as a whole: a trees
|
||||
page, and an index page. </p>
|
||||
|
||||
<h2> Object Documentation </h2>
|
||||
|
||||
<p>Each <strong>Package Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A description of the package. </li>
|
||||
<li> A list of the modules and sub-packages contained by the
|
||||
package. </li>
|
||||
<li> A summary of the classes defined by the package. </li>
|
||||
<li> A summary of the functions defined by the package. </li>
|
||||
<li> A summary of the variables defined by the package. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
package. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
package. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Module Documentation</strong> page contains:</p>
|
||||
<ul>
|
||||
<li> A description of the module. </li>
|
||||
<li> A summary of the classes defined by the module. </li>
|
||||
<li> A summary of the functions defined by the module. </li>
|
||||
<li> A summary of the variables defined by the module. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
module. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
module. </li>
|
||||
</ul>
|
||||
|
||||
<p>Each <strong>Class Documentation</strong> page contains: </p>
|
||||
<ul>
|
||||
<li> A class inheritance diagram. </li>
|
||||
<li> A list of known subclasses. </li>
|
||||
<li> A description of the class. </li>
|
||||
<li> A summary of the methods defined by the class. </li>
|
||||
<li> A summary of the instance variables defined by the class. </li>
|
||||
<li> A summary of the class (static) variables defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each method defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each instance variable defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each class (static) variable defined
|
||||
by the class. </li>
|
||||
</ul>
|
||||
|
||||
<h2> Project Documentation </h2>
|
||||
|
||||
<p> The <strong>Trees</strong> page contains the module and class hierarchies: </p>
|
||||
<ul>
|
||||
<li> The <em>module hierarchy</em> lists every package and module, with
|
||||
modules grouped into packages. At the top level, and within each
|
||||
package, modules and sub-packages are listed alphabetically. </li>
|
||||
<li> The <em>class hierarchy</em> lists every class, grouped by base
|
||||
class. If a class has more than one base class, then it will be
|
||||
listed under each base class. At the top level, and under each base
|
||||
class, classes are listed alphabetically. </li>
|
||||
</ul>
|
||||
|
||||
<p> The <strong>Index</strong> page contains indices of terms and
|
||||
identifiers: </p>
|
||||
<ul>
|
||||
<li> The <em>term index</em> lists every term indexed by any object's
|
||||
documentation. For each term, the index provides links to each
|
||||
place where the term is indexed. </li>
|
||||
<li> The <em>identifier index</em> lists the (short) name of every package,
|
||||
module, class, method, function, variable, and parameter. For each
|
||||
identifier, the index provides a short description, and a link to
|
||||
its documentation. </li>
|
||||
</ul>
|
||||
|
||||
<h2> The Table of Contents </h2>
|
||||
|
||||
<p> The table of contents occupies the two frames on the left side of
|
||||
the window. The upper-left frame displays the <em>project
|
||||
contents</em>, and the lower-left frame displays the <em>module
|
||||
contents</em>: </p>
|
||||
|
||||
<table class="help summary" border="1" cellspacing="0" cellpadding="3">
|
||||
<tr style="height: 30%">
|
||||
<td align="center" style="font-size: small">
|
||||
Project<br />Contents<hr />...</td>
|
||||
<td align="center" style="font-size: small" rowspan="2" width="70%">
|
||||
API<br />Documentation<br />Frame<br /><br /><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="font-size: small">
|
||||
Module<br />Contents<hr /> <br />...<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table><br />
|
||||
|
||||
<p> The <strong>project contents frame</strong> contains a list of all packages
|
||||
and modules that are defined by the project. Clicking on an entry
|
||||
will display its contents in the module contents frame. Clicking on a
|
||||
special entry, labeled "Everything," will display the contents of
|
||||
the entire project. </p>
|
||||
|
||||
<p> The <strong>module contents frame</strong> contains a list of every
|
||||
submodule, class, type, exception, function, and variable defined by a
|
||||
module or package. Clicking on an entry will display its
|
||||
documentation in the API documentation frame. Clicking on the name of
|
||||
the module, at the top of the frame, will display the documentation
|
||||
for the module itself. </p>
|
||||
|
||||
<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top
|
||||
navigation bar can be used to control whether the table of contents is
|
||||
displayed or not. </p>
|
||||
|
||||
<h2> The Navigation Bar </h2>
|
||||
|
||||
<p> A navigation bar is located at the top and bottom of every page.
|
||||
It indicates what type of page you are currently viewing, and allows
|
||||
you to go to related pages. The following table describes the labels
|
||||
on the navigation bar. Note that not some labels (such as
|
||||
[Parent]) are not displayed on all pages. </p>
|
||||
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
|
||||
<tr class="summary">
|
||||
<th>Label</th>
|
||||
<th>Highlighted when...</th>
|
||||
<th>Links to...</th>
|
||||
</tr>
|
||||
<tr><td valign="top"><strong>[Parent]</strong></td>
|
||||
<td valign="top"><em>(never highlighted)</em></td>
|
||||
<td valign="top"> the parent of the current package </td></tr>
|
||||
<tr><td valign="top"><strong>[Package]</strong></td>
|
||||
<td valign="top">viewing a package</td>
|
||||
<td valign="top">the package containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Module]</strong></td>
|
||||
<td valign="top">viewing a module</td>
|
||||
<td valign="top">the module containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><strong>[Class]</strong></td>
|
||||
<td valign="top">viewing a class </td>
|
||||
<td valign="top">the class containing the current object</td></tr>
|
||||
<tr><td valign="top"><strong>[Trees]</strong></td>
|
||||
<td valign="top">viewing the trees page</td>
|
||||
<td valign="top"> the trees page </td></tr>
|
||||
<tr><td valign="top"><strong>[Index]</strong></td>
|
||||
<td valign="top">viewing the index page</td>
|
||||
<td valign="top"> the index page </td></tr>
|
||||
<tr><td valign="top"><strong>[Help]</strong></td>
|
||||
<td valign="top">viewing the help page</td>
|
||||
<td valign="top"> the help page </td></tr>
|
||||
</table>
|
||||
|
||||
<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below
|
||||
the top navigation bar can be used to control whether documentation
|
||||
for private objects is displayed. Private objects are usually defined
|
||||
as objects whose (short) names begin with a single underscore, but do
|
||||
not end with an underscore. For example, "<code>_x</code>",
|
||||
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
|
||||
are private objects; but "<code>re.sub</code>",
|
||||
"<code>__init__</code>", and "<code>type_</code>" are not. However,
|
||||
if a module defines the "<code>__all__</code>" variable, then its
|
||||
contents are used to decide which objects are private. </p>
|
||||
|
||||
<p> A timestamp below the bottom navigation bar indicates when each
|
||||
page was last updated. </p>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Help </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:45 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,504 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Identifier Index</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="identifier-index.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="bottom"><td>
|
||||
<h1 class="epydoc">Identifier Index</h1>
|
||||
</td><td>
|
||||
[
|
||||
A
|
||||
B
|
||||
<a href="#C">C</a>
|
||||
D
|
||||
E
|
||||
F
|
||||
<a href="#G">G</a>
|
||||
H
|
||||
<a href="#I">I</a>
|
||||
J
|
||||
K
|
||||
L
|
||||
M
|
||||
N
|
||||
<a href="#O">O</a>
|
||||
<a href="#P">P</a>
|
||||
Q
|
||||
<a href="#R">R</a>
|
||||
<a href="#S">S</a>
|
||||
<a href="#T">T</a>
|
||||
U
|
||||
V
|
||||
<a href="#W">W</a>
|
||||
X
|
||||
Y
|
||||
Z
|
||||
<a href="#_">_</a>
|
||||
]
|
||||
</td></table>
|
||||
<table border="0" width="100%">
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#close">close()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#close">close()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#get_channel_map">get_channel_map()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#get_flags">get_flags()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#get_portaudio_version">get_portaudio_version()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_cpu_load">get_cpu_load()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_format_from_width">get_format_from_width()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#get_portaudio_version_text">get_portaudio_version_text()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info">get_default_host_api_info()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#get_format_from_width">get_format_from_width()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_read_available">get_read_available()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info">get_default_input_device_info()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_host_api_count">get_host_api_count()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_sample_size">get_sample_size()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info">get_default_output_device_info()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index">get_host_api_info_by_index()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#get_sample_size">get_sample_size()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_device_count">get_device_count()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type">get_host_api_info_by_type()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_time">get_time()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index">get_device_info_by_host_api_device_index()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_input_latency">get_input_latency()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_write_available">get_write_available()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index">get_device_info_by_index()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#get_output_latency">get_output_latency()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#is_active">is_active()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#is_format_supported">is_format_supported()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#is_stopped">is_stopped()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="O">O</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#open">open()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="P">P</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paAL">paAL</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInputOverflowed">paInputOverflowed</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCorePro">paMacCorePro</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paALSA">paALSA</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInsufficientMemory">paInsufficientMemory</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paASIO">paASIO</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInt16">paInt16</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paMME">paMME</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paBadIODeviceCombination">paBadIODeviceCombination</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInt24">paInt24</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paNoDevice">paNoDevice</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paBadStreamPtr">paBadStreamPtr</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInt32">paInt32</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paNoError">paNoError</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paBeOS">paBeOS</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInt8">paInt8</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paNotInitialized">paNotInitialized</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paBufferTooBig">paBufferTooBig</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInternalError">paInternalError</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paNullCallback">paNullCallback</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paBufferTooSmall">paBufferTooSmall</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInvalidChannelCount">paInvalidChannelCount</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paOSS">paOSS</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCanNotReadFromACallbackStream">paCanNotReadFromACallbackStream</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInvalidDevice">paInvalidDevice</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paOutputUnderflowed">paOutputUnderflowed</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream">paCanNotReadFromAnOutputOnlyStream</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInvalidFlag">paInvalidFlag</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#PaSampleFormat">PaSampleFormat</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCanNotWriteToACallbackStream">paCanNotWriteToACallbackStream</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInvalidHostApi">paInvalidHostApi</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paSampleFormatNotSupported">paSampleFormatNotSupported</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream">paCanNotWriteToAnInputOnlyStream</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInvalidSampleRate">paInvalidSampleRate</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paSoundManager">paSoundManager</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCoreAudio">paCoreAudio</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paJACK">paJACK</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paStreamIsNotStopped">paStreamIsNotStopped</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paCustomFormat">paCustomFormat</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreChangeDeviceParameters">paMacCoreChangeDeviceParameters</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paStreamIsStopped">paStreamIsStopped</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paDeviceUnavailable">paDeviceUnavailable</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityHigh">paMacCoreConversionQualityHigh</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paTimedOut">paTimedOut</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paDirectSound">paDirectSound</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityLow">paMacCoreConversionQualityLow</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paUInt8">paUInt8</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#PaErrorCode">PaErrorCode</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMax">paMacCoreConversionQualityMax</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paUnanticipatedHostError">paUnanticipatedHostError</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paFloat32">paFloat32</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMedium">paMacCoreConversionQualityMedium</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paWASAPI">paWASAPI</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paHostApiNotFound">paHostApiNotFound</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreConversionQualityMin">paMacCoreConversionQualityMin</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paWDMKS">paWDMKS</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#PaHostApiTypeId">PaHostApiTypeId</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreFailIfConversionRequired">paMacCoreFailIfConversionRequired</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html">pyaudio</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo">paIncompatibleHostApiSpecificStreamInfo</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreMinimizeCPU">paMacCoreMinimizeCPU</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html">PyAudio</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paIncompatibleStreamHostApi">paIncompatibleStreamHostApi</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCoreMinimizeCPUButPlayNice">paMacCoreMinimizeCPUButPlayNice</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#paInDevelopment">paInDevelopment</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#paMacCorePlayNice">paMacCorePlayNice</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#read">read()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#start_stream">start_stream()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#stop_stream">stop_stream()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html">Stream</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#terminate">terminate()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="W">W</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#write">write()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td>
|
||||
<td valign="top">
|
||||
<table class="link-index" width="100%" border="1">
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PaMacCoreStreamInfo-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PaMacCoreStreamInfo-class.html">PaMacCoreStreamInfo</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.Stream-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.Stream-class.html">Stream</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="33%" class="link-index"><a href="pyaudio.PyAudio-class.html#__init__">__init__()</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio.PyAudio-class.html">PyAudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"><a href="pyaudio-module.html#__revision__">__revision__</a><br />
|
||||
<span class="index-where">(in <a href="pyaudio-module.html">pyaudio</a>)</span></td>
|
||||
<td width="33%" class="link-index"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br /><br /><!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Indices </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:44 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title> PyAudio-0.2.0 </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame"
|
||||
id="moduleListFrame" />
|
||||
<frame src="toc-everything.html" name="moduleFrame"
|
||||
id="moduleFrame" />
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame" id="mainFrame" />
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,114 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module Hierarchy</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%"> </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="module-tree.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><b>
|
||||
[ <a href="module-tree.html">Module Hierarchy</a>
|
||||
| <a href="class-tree.html">Class Hierarchy</a> ]
|
||||
</b></center><br />
|
||||
<h1 class="epydoc">Module Hierarchy</h1>
|
||||
<ul class="nomargin-top">
|
||||
<li> <strong class="uidlink"><a href="pyaudio-module.html">pyaudio</a></strong>: <em class="summary">PyAudio : Python Bindings for PortAudio v19.</em> </li>
|
||||
</ul>
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Trees </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:44 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,100 +0,0 @@
|
|||
|
||||
/* Body color */
|
||||
body { background: #ffffff; color: #000000; }
|
||||
|
||||
/* Tables */
|
||||
table.summary, table.details, table.index
|
||||
{ background: #e8f0f8; color: #000000; }
|
||||
tr.summary, tr.details, tr.index
|
||||
{ background: #70b0f0; color: #000000;
|
||||
text-align: left; font-size: 120%; }
|
||||
tr.group { background: #c0e0f8; color: #000000;
|
||||
text-align: left; font-size: 120%;
|
||||
font-style: italic; }
|
||||
|
||||
/* Documentation page titles */
|
||||
h2.module { margin-top: 0.2em; }
|
||||
h2.class { margin-top: 0.2em; }
|
||||
|
||||
/* Headings */
|
||||
h1.heading { font-size: +140%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h2.heading { font-size: +125%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h3.heading { font-size: +110%; font-style: italic;
|
||||
font-weight: normal; }
|
||||
|
||||
/* Base tree */
|
||||
pre.base-tree { font-size: 80%; margin: 0; }
|
||||
|
||||
/* Details Sections */
|
||||
table.func-details { background: #e8f0f8; color: #000000;
|
||||
border: 2px groove #c0d0d0;
|
||||
padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
|
||||
h3.func-detail { background: transparent; color: #000000;
|
||||
margin: 0 0 1em 0; }
|
||||
|
||||
table.var-details { background: #e8f0f8; color: #000000;
|
||||
border: 2px groove #c0d0d0;
|
||||
padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
|
||||
h3.var-details { background: transparent; color: #000000;
|
||||
margin: 0 0 1em 0; }
|
||||
|
||||
/* Function signatures */
|
||||
.sig { background: transparent; color: #000000;
|
||||
font-weight: bold; }
|
||||
.sig-name { background: transparent; color: #006080; }
|
||||
.sig-arg, .sig-kwarg, .sig-vararg
|
||||
{ background: transparent; color: #008060; }
|
||||
.sig-default { background: transparent; color: #602000; }
|
||||
.summary-sig { background: transparent; color: #000000; }
|
||||
.summary-sig-name { background: transparent; color: #204080; }
|
||||
.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg
|
||||
{ background: transparent; color: #008060; }
|
||||
|
||||
/* Doctest blocks */
|
||||
.py-src { background: transparent; color: #000000; }
|
||||
.py-prompt { background: transparent; color: #005050;
|
||||
font-weight: bold;}
|
||||
.py-string { background: transparent; color: #006030; }
|
||||
.py-comment { background: transparent; color: #003060; }
|
||||
.py-keyword { background: transparent; color: #600000; }
|
||||
.py-output { background: transparent; color: #404040; }
|
||||
pre.doctestblock { background: #f4faff; color: #000000;
|
||||
padding: .5em; margin: 1em;
|
||||
border: 1px solid #708890; }
|
||||
table pre.doctestblock
|
||||
{ background: #dce4ec; color: #000000;
|
||||
padding: .5em; margin: 1em;
|
||||
border: 1px solid #708890; }
|
||||
|
||||
/* Variable values */
|
||||
pre.variable { background: #dce4ec; color: #000000;
|
||||
padding: .5em; margin: 0;
|
||||
border: 1px solid #708890; }
|
||||
.variable-linewrap { background: transparent; color: #604000; }
|
||||
.variable-ellipsis { background: transparent; color: #604000; }
|
||||
.variable-quote { background: transparent; color: #604000; }
|
||||
.re { background: transparent; color: #000000; }
|
||||
.re-char { background: transparent; color: #006030; }
|
||||
.re-op { background: transparent; color: #600000; }
|
||||
.re-group { background: transparent; color: #003060; }
|
||||
.re-ref { background: transparent; color: #404040; }
|
||||
|
||||
/* Navigation bar */
|
||||
table.navbar { background: #a0c0ff; color: #0000ff;
|
||||
border: 2px groove #c0d0d0; }
|
||||
th.navbar { background: #a0c0ff; color: #0000ff; }
|
||||
th.navselect { background: #70b0ff; color: #000000; }
|
||||
.nomargin { margin: 0; }
|
||||
|
||||
/* Links */
|
||||
a:link { background: transparent; color: #0000ff; }
|
||||
a:visited { background: transparent; color: #204080; }
|
||||
a.navbar:link { background: transparent; color: #0000ff;
|
||||
text-decoration: none; }
|
||||
a.navbar:visited { background: transparent; color: #204080;
|
||||
text-decoration: none; }
|
||||
|
||||
/* Lists */
|
||||
ul { margin-top: 0; }
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title> PyAudio </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame">
|
||||
<frame src="toc-everything.html" name="moduleFrame">
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,236 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Help</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Help </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[show private | <a href="../public/help.html">hide private</a>]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="help.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<center><h2> API Documentation </h2></center>
|
||||
|
||||
<p> This document contains the API (Application Programming Interface)
|
||||
documentation for PyAudio. Documentation for the Python
|
||||
objects defined by the project is divided into separate pages for each
|
||||
package, module, and class. The API documentation also includes two
|
||||
pages containing information about the project as a whole: a trees
|
||||
page, and an index page. </p>
|
||||
|
||||
<h2> Object Documentation </h2>
|
||||
|
||||
<p>Each <b>Package Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A description of the package. </li>
|
||||
<li> A list of the modules and sub-packages contained by the
|
||||
package. </li>
|
||||
<li> A summary of the classes defined by the package. </li>
|
||||
<li> A summary of the functions defined by the package. </li>
|
||||
<li> A summary of the variables defined by the package. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
package. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
package. </li>
|
||||
</ul></p>
|
||||
|
||||
<p>Each <b>Module Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A description of the module. </li>
|
||||
<li> A summary of the classes defined by the module. </li>
|
||||
<li> A summary of the functions defined by the module. </li>
|
||||
<li> A summary of the variables defined by the module. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
module. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
module. </li>
|
||||
</ul></p>
|
||||
|
||||
<p>Each <b>Class Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A class inheritance diagram. </li>
|
||||
<li> A list of known subclasses. </li>
|
||||
<li> A description of the class. </li>
|
||||
<li> A summary of the methods defined by the class. </li>
|
||||
<li> A summary of the instance variables defined by the class. </li>
|
||||
<li> A summary of the class (static) variables defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each method defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each instance variable defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each class (static) variable defined
|
||||
by the class. </li>
|
||||
</ul></p>
|
||||
|
||||
<h2> Project Documentation </h2>
|
||||
|
||||
<p> The <b>Trees</b> page contains the module and class hierarchies:
|
||||
<ul>
|
||||
<li> The <i>module hierarchy</i> lists every package and module, with
|
||||
modules grouped into packages. At the top level, and within each
|
||||
package, modules and sub-packages are listed alphabetically. </li>
|
||||
<li> The <i>class hierarchy</i> lists every class, grouped by base
|
||||
class. If a class has more than one base class, then it will be
|
||||
listed under each base class. At the top level, and under each base
|
||||
class, classes are listed alphabetically. </li>
|
||||
</ul></p>
|
||||
|
||||
<p> The <b>Index</b> page contains indices of terms and
|
||||
identifiers:
|
||||
<ul>
|
||||
<li> The <i>term index</i> lists every term indexed by any object's
|
||||
documentation. For each term, the index provides links to each
|
||||
place where the term is indexed. </li>
|
||||
<li> The <i>identifier index</i> lists the (short) name of every package,
|
||||
module, class, method, function, variable, and parameter. For each
|
||||
identifier, the index provides a short description, and a link to
|
||||
its documentation. </li>
|
||||
</ul></p>
|
||||
|
||||
<h2> The Table of Contents </h2>
|
||||
|
||||
<p> The table of contents occupies the two frames on the left side of
|
||||
the window. The upper-left frame displays the <i>project
|
||||
contents</i>, and the lower-left frame displays the <i>module
|
||||
contents</i>: </p>
|
||||
|
||||
<center>
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3">
|
||||
<tr heigh="30%">
|
||||
<td align="center">
|
||||
<font size="-1">Project<br>Contents<hr>...</font></td>
|
||||
<td align="center" rowspan="2" width="70%">
|
||||
API<br>Documentation<br>Frame<br><br><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<font size="-1">Module<br>Contents<hr> <br>...<br> </font>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</center>
|
||||
|
||||
<p> The <b>project contents frame</b> contains a list of all packages
|
||||
and modules that are defined by the project. Clicking on an entry
|
||||
will display its contents in the module contents frame. Clicking on a
|
||||
special entry, labeled "Everything," will display the contents of
|
||||
the entire project. </p>
|
||||
|
||||
<p> The <b>module contents frame</b> contains a list of every
|
||||
submodule, class, type, exception, function, and variable defined by a
|
||||
module or package. Clicking on an entry will display its
|
||||
documentation in the API documentation frame. Clicking on the name of
|
||||
the module, at the top of the frame, will display the documentation
|
||||
for the module itself. </p>
|
||||
|
||||
<p> The "<b>frames</b>" and "<b>no frames</b>" buttons below the top
|
||||
navigation bar can be used to control whether the table of contents is
|
||||
displayed or not. </p>
|
||||
|
||||
<h2> The Navigation Bar </h2>
|
||||
|
||||
<p> A navigation bar is located at the top and bottom of every page.
|
||||
It indicates what type of page you are currently viewing, and allows
|
||||
you to go to related pages. The following table describes the labels
|
||||
on the navigation bar. Note that not some labels (such as
|
||||
[Parent]) are not displayed on all pages. </p>
|
||||
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
|
||||
<tr class="summary">
|
||||
<th>Label</th>
|
||||
<th>Highlighted when...</th>
|
||||
<th>Links to...</th>
|
||||
</tr>
|
||||
<tr><td valign="top"><b>[Parent]</b></td>
|
||||
<td valign="top"><i>(never highlighted)</i></td>
|
||||
<td valign="top"> the parent of the current package </td></tr>
|
||||
<tr><td valign="top"><b>[Package]</b></td>
|
||||
<td valign="top">viewing a package</td>
|
||||
<td valign="top">the package containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><b>[Module]</b></td>
|
||||
<td valign="top">viewing a module</td>
|
||||
<td valign="top">the module containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><b>[Class]</b></td>
|
||||
<td valign="top">viewing a class </td>
|
||||
<td valign="top">the class containing the current object</td></tr>
|
||||
<tr><td valign="top"><b>[Trees]</b></td>
|
||||
<td valign="top">viewing the trees page</td>
|
||||
<td valign="top"> the trees page </td></tr>
|
||||
<tr><td valign="top"><b>[Index]</b></td>
|
||||
<td valign="top">viewing the index page</td>
|
||||
<td valign="top"> the index page </td></tr>
|
||||
<tr><td valign="top"><b>[Help]</b></td>
|
||||
<td valign="top">viewing the help page</td>
|
||||
<td valign="top"> the help page </td></tr>
|
||||
</table>
|
||||
|
||||
<p> The "<b>show private</b>" and "<b>hide private</b>" buttons below
|
||||
the top navigation bar can be used to control whether documentation
|
||||
for private objects is displayed. Private objects are usually defined
|
||||
as objects whose (short) names begin with a single underscore, but do
|
||||
not end with an underscore. For example, "<code>_x</code>",
|
||||
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
|
||||
are private objects; but "<code>re.sub</code>",
|
||||
"<code>__init__</code>", and "<code>type_</code>" are not. However,
|
||||
if a module defines the "<code>__all__</code>" variable, then its
|
||||
contents are used to decide which objects are private. </p>
|
||||
|
||||
<p> A timestamp below the bottom navigation bar indicates when each
|
||||
page was last updated. </p>
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Help </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title> PyAudio </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame">
|
||||
<frame src="toc-everything.html" name="moduleFrame">
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,263 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Index</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Index </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[show private | <a href="../public/indices.html">hide private</a>]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="indices.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF IDENTIFIER INDEX =========== -->
|
||||
<table class="index" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="index">
|
||||
<th colspan="2">Identifier Index</th></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__author__"><code>__author__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#__init__"><code>__init__</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#__init__"><code>__init__</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__revision__"><code>__revision__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__version__"><code>__version__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="../private/pyaudio.PyAudio-class.html#_make_device_info_dictionary"><code>_make_device_info_dictionary</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="../private/pyaudio.PyAudio-class.html#_make_host_api_dictionary"><code>_make_host_api_dictionary</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="../private/pyaudio.PyAudio-class.html#_remove_stream"><code>_remove_stream</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#close"><code>close</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#close"><code>close</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_cpu_load"><code>get_cpu_load</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info"><code>get_default_host_api_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info"><code>get_default_input_device_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info"><code>get_default_output_device_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_count"><code>get_device_count</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index"><code>get_device_info_by_host_api_device_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index"><code>get_device_info_by_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_format_from_width"><code>get_format_from_width</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_format_from_width"><code>get_format_from_width</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_count"><code>get_host_api_count</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index"><code>get_host_api_info_by_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type"><code>get_host_api_info_by_type</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_input_latency"><code>get_input_latency</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_output_latency"><code>get_output_latency</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_portaudio_version"><code>get_portaudio_version</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_portaudio_version_text"><code>get_portaudio_version_text</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_read_available"><code>get_read_available</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_sample_size"><code>get_sample_size</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_sample_size"><code>get_sample_size</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_time"><code>get_time</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_write_available"><code>get_write_available</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#is_active"><code>is_active</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#is_format_supported"><code>is_format_supported</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#is_stopped"><code>is_stopped</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#open"><code>open</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paAL"><code>paAL</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paALSA"><code>paALSA</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paASIO"><code>paASIO</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBadIODeviceCombination"><code>paBadIODeviceCombination</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBadStreamPtr"><code>paBadStreamPtr</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBeOS"><code>paBeOS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBufferTooBig"><code>paBufferTooBig</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBufferTooSmall"><code>paBufferTooSmall</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotReadFromACallbackStream"><code>paCanNotReadFromACallbackStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream"><code>paCanNotReadFromAnOutputOnlyStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotWriteToACallbackStream"><code>paCanNotWriteToACallbackStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream"><code>paCanNotWriteToAnInputOnlyStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCoreAudio"><code>paCoreAudio</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCustomFormat"><code>paCustomFormat</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paDeviceUnavailable"><code>paDeviceUnavailable</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paDirectSound"><code>paDirectSound</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaErrorCode"><code>PaErrorCode</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paFloat32"><code>paFloat32</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paHostApiNotFound"><code>paHostApiNotFound</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaHostApiTypeId"><code>PaHostApiTypeId</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo"><code>paIncompatibleHostApiSpecificStreamInfo</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paIncompatibleStreamHostApi"><code>paIncompatibleStreamHostApi</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInDevelopment"><code>paInDevelopment</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInputOverflowed"><code>paInputOverflowed</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInsufficientMemory"><code>paInsufficientMemory</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt16"><code>paInt16</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt24"><code>paInt24</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt32"><code>paInt32</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt8"><code>paInt8</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInternalError"><code>paInternalError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidChannelCount"><code>paInvalidChannelCount</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidDevice"><code>paInvalidDevice</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidFlag"><code>paInvalidFlag</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidHostApi"><code>paInvalidHostApi</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidSampleRate"><code>paInvalidSampleRate</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paJACK"><code>paJACK</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paMME"><code>paMME</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNoDevice"><code>paNoDevice</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNoError"><code>paNoError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNotInitialized"><code>paNotInitialized</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNullCallback"><code>paNullCallback</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paOSS"><code>paOSS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paOutputUnderflowed"><code>paOutputUnderflowed</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaSampleFormat"><code>PaSampleFormat</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paSampleFormatNotSupported"><code>paSampleFormatNotSupported</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paSoundManager"><code>paSoundManager</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paStreamIsNotStopped"><code>paStreamIsNotStopped</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paStreamIsStopped"><code>paStreamIsStopped</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paTimedOut"><code>paTimedOut</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paUInt8"><code>paUInt8</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paUnanticipatedHostError"><code>paUnanticipatedHostError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paWASAPI"><code>paWASAPI</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paWDMKS"><code>paWDMKS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html"><code>pyaudio</code></a></td>
|
||||
<td>Module</td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html"><code>PyAudio</code></a></td>
|
||||
<td>Class in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#read"><code>read</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#start_stream"><code>start_stream</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#stop_stream"><code>stop_stream</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html"><code>Stream</code></a></td>
|
||||
<td>Class in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#terminate"><code>terminate</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#write"><code>write</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Index </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,642 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.PyAudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<font size="-1"><b class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class PyAudio
|
||||
</b></font></br>
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[show private | <a href="../public/pyaudio.PyAudio-class.html">hide private</a>]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="pyaudio.PyAudio-class.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF CLASS DESCRIPTION =========== -->
|
||||
<h2 class="class">Class PyAudio</h2>
|
||||
|
||||
<hr/>
|
||||
|
||||
<dl class="docutils">
|
||||
<dt>Python interface to PortAudio. Provides methods to:</dt>
|
||||
<dd><ul class="first last rst-simple">
|
||||
<li>initialize and terminate PortAudio</li>
|
||||
<li>open and close streams</li>
|
||||
<li>query and inspect the available PortAudio Host APIs</li>
|
||||
<li>query and inspect the available PortAudio audio
|
||||
devices</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Use this class to open and close streams.</p>
|
||||
<hr/>
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD SUMMARY =========== -->
|
||||
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="summary">
|
||||
<th colspan="2">Method Summary</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Initialize PortAudio.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#terminate" class="summary-sig-name"><code>terminate</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Terminate PortAudio.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="../private/pyaudio.PyAudio-class.html#_make_device_info_dictionary" class="summary-sig-name"><code>_make_device_info_dictionary</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>index</span>,
|
||||
<span class=summary-sig-arg>device_info</span>)</span></code>
|
||||
<br />
|
||||
Internal method to create Device Info dictionary
|
||||
that mirrors PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="../private/pyaudio.PyAudio-class.html#_make_host_api_dictionary" class="summary-sig-name"><code>_make_host_api_dictionary</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>index</span>,
|
||||
<span class=summary-sig-arg>host_api_struct</span>)</span></code>
|
||||
<br />
|
||||
Internal method to create Host API dictionary
|
||||
that mirrors PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt> structure.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="../private/pyaudio.PyAudio-class.html#_remove_stream" class="summary-sig-name"><code>_remove_stream</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>stream</span>)</span></code>
|
||||
<br />
|
||||
Internal method.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Management</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#open" class="summary-sig-name"><code>open</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class="summary-sig-vararg">*args</span>,
|
||||
<span class="summary-sig-kwarg">**kwargs</span>)</span></code>
|
||||
<br />
|
||||
Open a new stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#close" class="summary-sig-name"><code>close</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>stream</span>)</span></code>
|
||||
<br />
|
||||
Close a stream.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Host API</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_count" class="summary-sig-name"><code>get_host_api_count</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of PortAudio Host APIs.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info" class="summary-sig-name"><code>get_default_host_api_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the default Host API
|
||||
parameters.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="summary-sig-name"><code>get_host_api_info_by_type</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_type</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="summary-sig-name"><code>get_host_api_info_by_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_index</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index" class="summary-sig-name"><code>get_device_info_by_host_api_device_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_index</span>,
|
||||
<span class=summary-sig-arg>host_api_device_index</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Device API</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_count" class="summary-sig-name"><code>get_device_count</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of PortAudio Host APIs.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#is_format_supported" class="summary-sig-name"><code>is_format_supported</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>rate</span>,
|
||||
<span class=summary-sig-arg>input_device</span>,
|
||||
<span class=summary-sig-arg>input_channels</span>,
|
||||
<span class=summary-sig-arg>input_format</span>,
|
||||
<span class=summary-sig-arg>output_device</span>,
|
||||
<span class=summary-sig-arg>output_channels</span>,
|
||||
<span class=summary-sig-arg>output_format</span>)</span></code>
|
||||
<br />
|
||||
Check to see if specified device configuration
|
||||
is supported.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info" class="summary-sig-name"><code>get_default_input_device_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the default input Device parameters as a
|
||||
dictionary.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info" class="summary-sig-name"><code>get_default_output_device_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the default output Device parameters as a
|
||||
dictionary.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="summary-sig-name"><code>get_device_info_by_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>device_index</span>)</span></code>
|
||||
<br />
|
||||
Return the Device parameters for device specified in
|
||||
<a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a> as a dictionary.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Format Conversion</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_sample_size" class="summary-sig-name"><code>get_sample_size</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>format</span>)</span></code>
|
||||
<br />
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a> (a <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a> constant).</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p><a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a></p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_format_from_width" class="summary-sig-name"><code>get_format_from_width</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>width</span>,
|
||||
<span class=summary-sig-arg>unsigned</span>)</span></code>
|
||||
<br />
|
||||
Returns a PortAudio format constant for
|
||||
the specified <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a>.</td></tr>
|
||||
</table><br />
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD DETAILS =========== -->
|
||||
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="details">
|
||||
<th colspan="2">Method Details</th></tr>
|
||||
</table>
|
||||
|
||||
<a name="open"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">open</span>(<span class=sig-arg>self</span>,
|
||||
<span class="sig-vararg">*args</span>,
|
||||
<span class="sig-kwarg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
<p>Open a new stream. See constructor for
|
||||
<a href="pyaudio.Stream-class.html#__init__" class="link"><code>Stream.__init__</code></a> for parameter details.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="close"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">close</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>stream</span>)</span>
|
||||
</h3>
|
||||
<p>Close a stream. Typically use <a href="pyaudio.Stream-class.html#close" class="link"><code>Stream.close</code></a> instead.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>stream</b></code> -
|
||||
<p>An instance of the <a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>if stream does not exist.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_count"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_count</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of PortAudio Host APIs.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_host_api_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_host_api_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the default Host API
|
||||
parameters. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if no default input device available</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_info_by_type"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_info_by_type</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_type</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_type</b></code> -
|
||||
<p>The desired Host API (<a href="pyaudio-module.html#PaHostApiTypeId" class="link"><code>PaHostApiTypeId</code></a> constant).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_info_by_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_info_by_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_index</b></code> -
|
||||
<p>The host api index.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_info_by_host_api_device_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_info_by_host_api_device_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_index</span>,
|
||||
<span class=sig-arg>host_api_device_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_index</b></code> -
|
||||
<p>The Host API index number.</p>
|
||||
<dd><code><b>host_api_device_index</b></code> -
|
||||
<p>The <em>n</em> 'th device of the host API.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid indices</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_count"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_count</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of PortAudio Host APIs.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_format_supported"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_format_supported</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>rate</span>,
|
||||
<span class=sig-arg>input_device</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>input_channels</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>input_format</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_device</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_channels</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_format</span>=<span class=sig-default>None</span>)</span>
|
||||
</h3>
|
||||
<p>Check to see if specified device configuration
|
||||
is supported.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>rate</b></code> -
|
||||
<p>Specifies the desired rate (in Hz)</p>
|
||||
<dd><code><b>input_device</b></code> -
|
||||
<p>The input device index. Specify <code>None</code> (default) for
|
||||
half-duplex output-only streams.</p>
|
||||
<dd><code><b>input_channels</b></code> -
|
||||
<p>The desired number of input channels. Ignored if
|
||||
<a href="pyaudio.PyAudio-class.html#is_format_supported" class="link"><code>input_device</code></a> is not specified (or <code>None</code>).</p>
|
||||
<dd><code><b>input_format</b></code> -
|
||||
<p>PortAudio sample format constant defined
|
||||
in this module</p>
|
||||
<dd><code><b>output_device</b></code> -
|
||||
<p>The output device index. Specify <code>None</code> (default) for
|
||||
half-duplex input-only streams.</p>
|
||||
<dd><code><b>output_channels</b></code> -
|
||||
<p>The desired number of output channels. Ignored if
|
||||
<a href="pyaudio.PyAudio-class.html#is_format_supported" class="link"><code>input_device</code></a> is not specified (or <code>None</code>).</p>
|
||||
<dd><code><b>output_format</b></code> -
|
||||
<p>PortAudio sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>PortAudio error or invalid devices.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_input_device_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_input_device_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the default input Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>No default input device available.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_output_device_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_output_device_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the default output Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>No default output device available.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_info_by_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_info_by_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>device_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return the Device parameters for device specified in
|
||||
<a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a> as a dictionary. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>device_index</b></code> -
|
||||
<p>The device index.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>Invalid <a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a>.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_sample_size"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_sample_size</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>format</span>)</span>
|
||||
</h3>
|
||||
<p>Returns the size (in bytes) for the specified
|
||||
sample <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a> (a <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a> constant).</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>format</b></code> -
|
||||
<p>Sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>Invalid specified <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a>.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_format_from_width"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_format_from_width</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>width</span>,
|
||||
<span class=sig-arg>unsigned</span>=<span class=sig-default>True</span>)</span>
|
||||
</h3>
|
||||
<p>Returns a PortAudio format constant for
|
||||
the specified <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a>.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>width</b></code> -
|
||||
<p>The desired sample width in bytes (1, 2, 3, or 4)</p>
|
||||
<dd><code><b>unsigned</b></code> -
|
||||
<p>For 1 byte width, specifies signed or unsigned format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="__init__"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>)</span>
|
||||
<br /><i>(Constructor)</i>
|
||||
</h3>
|
||||
<p>Initialize PortAudio.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="terminate"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">terminate</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Terminate PortAudio.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<p><b>Attention:</b> <p>Be sure to call this method for every
|
||||
instance of this object to release PortAudio resources.</p>
|
||||
</p>
|
||||
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="_make_device_info_dictionary"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">_make_device_info_dictionary</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>index</span>,
|
||||
<span class=sig-arg>device_info</span>)</span>
|
||||
</h3>
|
||||
<p>Internal method to create Device Info dictionary
|
||||
that mirrors PortAudio's <tt class="docutils literal docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="_make_host_api_dictionary"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">_make_host_api_dictionary</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>index</span>,
|
||||
<span class=sig-arg>host_api_struct</span>)</span>
|
||||
</h3>
|
||||
<p>Internal method to create Host API dictionary
|
||||
that mirrors PortAudio's <tt class="docutils literal docutils literal"><span class="pre">PaHostApiInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="_remove_stream"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">_remove_stream</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>stream</span>)</span>
|
||||
</h3>
|
||||
<p>Internal method. Removes a stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>stream</b></code> -
|
||||
<p>An instance of the <a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
<br />
|
||||
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,445 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.Stream</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<font size="-1"><b class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class Stream
|
||||
</b></font></br>
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[show private | <a href="../public/pyaudio.Stream-class.html">hide private</a>]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="pyaudio.Stream-class.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF CLASS DESCRIPTION =========== -->
|
||||
<h2 class="class">Class Stream</h2>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>PortAudio Stream Wrapper. Use <a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a> to make a new
|
||||
<a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a>.</p>
|
||||
<hr/>
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD SUMMARY =========== -->
|
||||
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="summary">
|
||||
<th colspan="2">Method Summary</th></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Opening and Closing</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>PA_manager</span>,
|
||||
<span class=summary-sig-arg>rate</span>,
|
||||
<span class=summary-sig-arg>channels</span>,
|
||||
<span class=summary-sig-arg>format</span>,
|
||||
<span class=summary-sig-arg>input</span>,
|
||||
<span class=summary-sig-arg>output</span>,
|
||||
<span class=summary-sig-arg>input_device_index</span>,
|
||||
<span class=summary-sig-arg>output_device_index</span>,
|
||||
<span class=summary-sig-arg>frames_per_buffer</span>,
|
||||
<span class=summary-sig-arg>start</span>)</span></code>
|
||||
<br />
|
||||
Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#close" class="summary-sig-name"><code>close</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Close the stream</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Info</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_input_latency" class="summary-sig-name"><code>get_input_latency</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the input latency.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_output_latency" class="summary-sig-name"><code>get_output_latency</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the input latency.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_time" class="summary-sig-name"><code>get_time</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return stream time.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_cpu_load" class="summary-sig-name"><code>get_cpu_load</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the CPU load.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Management</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#start_stream" class="summary-sig-name"><code>start_stream</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Start the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#stop_stream" class="summary-sig-name"><code>stop_stream</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Stop the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#is_active" class="summary-sig-name"><code>is_active</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Returns whether the stream is active.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#is_stopped" class="summary-sig-name"><code>is_stopped</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Returns whether the stream is stopped.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Input Output</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p><code>None</code></p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#write" class="summary-sig-name"><code>write</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>frames</span>,
|
||||
<span class=summary-sig-arg>num_frames</span>,
|
||||
<span class=summary-sig-arg>exception_on_underflow</span>)</span></code>
|
||||
<br />
|
||||
Write samples to the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#read" class="summary-sig-name"><code>read</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>num_frames</span>)</span></code>
|
||||
<br />
|
||||
Read samples from the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_read_available" class="summary-sig-name"><code>get_read_available</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of frames that can be read
|
||||
without waiting.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_write_available" class="summary-sig-name"><code>get_write_available</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of frames that can be written
|
||||
without waiting.</td></tr>
|
||||
</table><br />
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD DETAILS =========== -->
|
||||
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="details">
|
||||
<th colspan="2">Method Details</th></tr>
|
||||
</table>
|
||||
|
||||
<a name="__init__"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>PA_manager</span>,
|
||||
<span class=sig-arg>rate</span>,
|
||||
<span class=sig-arg>channels</span>,
|
||||
<span class=sig-arg>format</span>,
|
||||
<span class=sig-arg>input</span>=<span class=sig-default>False</span>,
|
||||
<span class=sig-arg>output</span>=<span class=sig-default>False</span>,
|
||||
<span class=sig-arg>input_device_index</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_device_index</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>frames_per_buffer</span>=<span class=sig-default>1024</span>,
|
||||
<span class=sig-arg>start</span>=<span class=sig-default>True</span>)</span>
|
||||
<br /><i>(Constructor)</i>
|
||||
</h3>
|
||||
<p>Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a>. A stream can either be input, output, or both.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>PA_manager</b></code> -
|
||||
<p>A reference to the managing <a href="pyaudio.PyAudio-class.html" class="link"><code>PyAudio</code></a> instance</p>
|
||||
<dd><code><b>rate</b></code> -
|
||||
<p>Sampling rate</p>
|
||||
<dd><code><b>channels</b></code> -
|
||||
<p>Number of channels</p>
|
||||
<dd><code><b>format</b></code> -
|
||||
<p>Sampling size and format. See <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>.</p>
|
||||
<dd><code><b>input</b></code> -
|
||||
<p>Specifies whether this is an input stream.
|
||||
Defaults to False.</p>
|
||||
<dd><code><b>output</b></code> -
|
||||
<p>Specifies whether this is an output stream.
|
||||
Defaults to False.</p>
|
||||
<dd><code><b>input_device_index</b></code> -
|
||||
<p>Index of Input Device to use.
|
||||
Unspecified (or None) uses default device.
|
||||
Ignored if <a href="pyaudio.Stream-class.html#__init__" class="link"><code>input</code></a> is False.</p>
|
||||
<dd><code><b>output_device_index</b></code> -
|
||||
<p>Index of Output Device to use.
|
||||
Unspecified (or None) uses the default device.
|
||||
Ignored if <a href="pyaudio.Stream-class.html#__init__" class="link"><code>output</code></a> is False.</p>
|
||||
<dd><code><b>frames_per_buffer</b></code> -
|
||||
<p>Specifies the number of frames per buffer.</p>
|
||||
<dd><code><b>start</b></code> -
|
||||
<p>Start the stream running immediately.
|
||||
Defaults to True. In general, there is no reason to set
|
||||
this to false.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>Neither input nor output
|
||||
are set True.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="close"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">close</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Close the stream</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_input_latency"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_input_latency</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the input latency.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_output_latency"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_output_latency</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the input latency.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_time"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_time</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return stream time.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_cpu_load"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_cpu_load</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the CPU load.</p>
|
||||
<p>(Note: this is always 0.0 for the blocking API.)</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="start_stream"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">start_stream</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Start the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="stop_stream"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">stop_stream</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Stop the stream. Once the stream is stopped,
|
||||
one may not call write or read. However, one may
|
||||
call start_stream to resume the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_active"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_active</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Returns whether the stream is active.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_stopped"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_stopped</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Returns whether the stream is stopped.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="write"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">write</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>frames</span>,
|
||||
<span class=sig-arg>num_frames</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>exception_on_underflow</span>=<span class=sig-default>False</span>)</span>
|
||||
</h3>
|
||||
<p>Write samples to the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>frames</b></code> -
|
||||
<p>The frames of data.</p>
|
||||
<dd><code><b>num_frames</b></code> -
|
||||
<p>The number of frames to write.
|
||||
Defaults to None, in which this value will be
|
||||
automatically computed.</p>
|
||||
<dd><code><b>exception_on_underflow</b></code> -
|
||||
<p>Specifies whether an exception should be thrown
|
||||
(or silently ignored) on buffer underflow. Defaults
|
||||
to False for improved performance, especially on
|
||||
slower platforms.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><code>None</code></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if the stream is not an output stream
|
||||
or if the write operation was unsuccessful.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="read"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">read</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>num_frames</span>)</span>
|
||||
</h3>
|
||||
<p>Read samples from the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>num_frames</b></code> -
|
||||
<p>The number of frames to read.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>str</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if stream is not an input stream
|
||||
or if the read operation was unsuccessful.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_read_available"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_read_available</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of frames that can be read
|
||||
without waiting.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_write_available"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_write_available</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of frames that can be written
|
||||
without waiting.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
<br />
|
||||
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Everything</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b>Everything</b></font></center>
|
||||
<hr>
|
||||
|
||||
<!-- =========== START OF ALL CLASSES =========== -->
|
||||
<font size="+1"><b>All Classes</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio.PyAudio-class.html">pyaudio.PyAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio.Stream-class.html">pyaudio.Stream</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF ALL FUNCTIONS =========== -->
|
||||
<font size="+1"><b>All Functions</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width">get_format_from_width</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version">get_portaudio_version</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text">get_portaudio_version_text</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_sample_size">get_sample_size</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF ALL VARIABLES =========== -->
|
||||
<font size="+1"><b>All Variables</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__author__">__author__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__revision__">__revision__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__version__">__version__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paAL">paAL</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paALSA">paALSA</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paASIO">paASIO</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination">paBadIODeviceCombination</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr">paBadStreamPtr</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBeOS">paBeOS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooBig">paBufferTooBig</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall">paBufferTooSmall</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream">paCanNotReadFromACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream">paCanNotReadFromAnOutputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream">paCanNotWriteToACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream">paCanNotWriteToAnInputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCoreAudio">paCoreAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCustomFormat">paCustomFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable">paDeviceUnavailable</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDirectSound">paDirectSound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode">PaErrorCode</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paFloat32">paFloat32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound">paHostApiNotFound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId">PaHostApiTypeId</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo">paIncompatibleHostApiSpecificStreamInfo</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi">paIncompatibleStreamHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInDevelopment">paInDevelopment</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInputOverflowed">paInputOverflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory">paInsufficientMemory</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt16">paInt16</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt24">paInt24</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt32">paInt32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt8">paInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInternalError">paInternalError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount">paInvalidChannelCount</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidDevice">paInvalidDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidFlag">paInvalidFlag</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi">paInvalidHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate">paInvalidSampleRate</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paJACK">paJACK</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paMME">paMME</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoDevice">paNoDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoError">paNoError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNotInitialized">paNotInitialized</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNullCallback">paNullCallback</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOSS">paOSS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed">paOutputUnderflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaSampleFormat">PaSampleFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported">paSampleFormatNotSupported</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSoundManager">paSoundManager</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped">paStreamIsNotStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped">paStreamIsStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paTimedOut">paTimedOut</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUInt8">paUInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError">paUnanticipatedHostError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWASAPI">paWASAPI</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWDMKS">paWDMKS</a><br />
|
||||
<br />
|
||||
|
||||
<hr>
|
||||
<font size="-2">[show private | <a href="../public/toc-everything.html">hide private</a>]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b><a target="mainFrame" href="pyaudio-module.html">pyaudio</a></b></font></center>
|
||||
<hr>
|
||||
|
||||
<!-- =========== START OF CLASSES =========== -->
|
||||
<font size="+1"><b>Classes</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio.PyAudio-class.html">PyAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio.Stream-class.html">Stream</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF FUNCTIONS =========== -->
|
||||
<font size="+1"><b>Functions</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width">get_format_from_width</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version">get_portaudio_version</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text">get_portaudio_version_text</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_sample_size">get_sample_size</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF VARIABLES =========== -->
|
||||
<font size="+1"><b>Variables</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__author__">__author__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__revision__">__revision__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__version__">__version__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paAL">paAL</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paALSA">paALSA</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paASIO">paASIO</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination">paBadIODeviceCombination</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr">paBadStreamPtr</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBeOS">paBeOS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooBig">paBufferTooBig</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall">paBufferTooSmall</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream">paCanNotReadFromACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream">paCanNotReadFromAnOutputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream">paCanNotWriteToACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream">paCanNotWriteToAnInputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCoreAudio">paCoreAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCustomFormat">paCustomFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable">paDeviceUnavailable</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDirectSound">paDirectSound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode">PaErrorCode</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paFloat32">paFloat32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound">paHostApiNotFound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId">PaHostApiTypeId</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo">paIncompatibleHostApiSpecificStreamInfo</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi">paIncompatibleStreamHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInDevelopment">paInDevelopment</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInputOverflowed">paInputOverflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory">paInsufficientMemory</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt16">paInt16</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt24">paInt24</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt32">paInt32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt8">paInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInternalError">paInternalError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount">paInvalidChannelCount</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidDevice">paInvalidDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidFlag">paInvalidFlag</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi">paInvalidHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate">paInvalidSampleRate</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paJACK">paJACK</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paMME">paMME</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoDevice">paNoDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoError">paNoError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNotInitialized">paNotInitialized</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNullCallback">paNullCallback</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOSS">paOSS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed">paOutputUnderflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaSampleFormat">PaSampleFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported">paSampleFormatNotSupported</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSoundManager">paSoundManager</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped">paStreamIsNotStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped">paStreamIsStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paTimedOut">paTimedOut</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUInt8">paUInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError">paUnanticipatedHostError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWASAPI">paWASAPI</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWDMKS">paWDMKS</a><br />
|
||||
<br />
|
||||
|
||||
<hr>
|
||||
<font size="-2">[show private | <a href="../public/toc-pyaudio-module.html">hide private</a>]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Table of Contents</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b>Table of Contents</b></font></center>
|
||||
<hr>
|
||||
<a target="moduleFrame" href="toc-everything.html">Everything</a><br />
|
||||
|
||||
<!-- =========== START OF PACKAGES =========== -->
|
||||
<br /><font size="+1"><b>Packages</b></font><br />
|
||||
|
||||
<!-- =========== START OF MODULES =========== -->
|
||||
<br /><font size="+1"><b>Modules</b></font><br />
|
||||
<a target="moduleFrame" href="toc-pyaudio-module.html">pyaudio</a><br />
|
||||
|
||||
<br /><hr>
|
||||
<font size="-2">[show private | <a href="../public/toc.html">hide private</a>]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module and Class Hierarchies</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Trees </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[show private | <a href="../public/trees.html">hide private</a>]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="trees.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF MODULE HIERARCHY =========== -->
|
||||
<h2>Module Hierarchy</h2>
|
||||
<ul>
|
||||
<li> <b><a href="pyaudio-module.html"><code>pyaudio</code></a></b>: <i>pyAudio : Python Bindings for PortAudio v19.</i>
|
||||
</ul>
|
||||
|
||||
<!-- =========== START OF CLASS HIERARCHY =========== -->
|
||||
<h2>Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li> <b><a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></b>: <i>
|
||||
initialize and terminate PortAudio</i>
|
||||
<li> <b><a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></b>: <i>
|
||||
PortAudio Stream Wrapper.</i>
|
||||
</ul>
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,100 +0,0 @@
|
|||
|
||||
/* Body color */
|
||||
body { background: #ffffff; color: #000000; }
|
||||
|
||||
/* Tables */
|
||||
table.summary, table.details, table.index
|
||||
{ background: #e8f0f8; color: #000000; }
|
||||
tr.summary, tr.details, tr.index
|
||||
{ background: #70b0f0; color: #000000;
|
||||
text-align: left; font-size: 120%; }
|
||||
tr.group { background: #c0e0f8; color: #000000;
|
||||
text-align: left; font-size: 120%;
|
||||
font-style: italic; }
|
||||
|
||||
/* Documentation page titles */
|
||||
h2.module { margin-top: 0.2em; }
|
||||
h2.class { margin-top: 0.2em; }
|
||||
|
||||
/* Headings */
|
||||
h1.heading { font-size: +140%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h2.heading { font-size: +125%; font-style: italic;
|
||||
font-weight: bold; }
|
||||
h3.heading { font-size: +110%; font-style: italic;
|
||||
font-weight: normal; }
|
||||
|
||||
/* Base tree */
|
||||
pre.base-tree { font-size: 80%; margin: 0; }
|
||||
|
||||
/* Details Sections */
|
||||
table.func-details { background: #e8f0f8; color: #000000;
|
||||
border: 2px groove #c0d0d0;
|
||||
padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
|
||||
h3.func-detail { background: transparent; color: #000000;
|
||||
margin: 0 0 1em 0; }
|
||||
|
||||
table.var-details { background: #e8f0f8; color: #000000;
|
||||
border: 2px groove #c0d0d0;
|
||||
padding: 0 1em 0 1em; margin: 0.4em 0 0 0; }
|
||||
h3.var-details { background: transparent; color: #000000;
|
||||
margin: 0 0 1em 0; }
|
||||
|
||||
/* Function signatures */
|
||||
.sig { background: transparent; color: #000000;
|
||||
font-weight: bold; }
|
||||
.sig-name { background: transparent; color: #006080; }
|
||||
.sig-arg, .sig-kwarg, .sig-vararg
|
||||
{ background: transparent; color: #008060; }
|
||||
.sig-default { background: transparent; color: #602000; }
|
||||
.summary-sig { background: transparent; color: #000000; }
|
||||
.summary-sig-name { background: transparent; color: #204080; }
|
||||
.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg
|
||||
{ background: transparent; color: #008060; }
|
||||
|
||||
/* Doctest blocks */
|
||||
.py-src { background: transparent; color: #000000; }
|
||||
.py-prompt { background: transparent; color: #005050;
|
||||
font-weight: bold;}
|
||||
.py-string { background: transparent; color: #006030; }
|
||||
.py-comment { background: transparent; color: #003060; }
|
||||
.py-keyword { background: transparent; color: #600000; }
|
||||
.py-output { background: transparent; color: #404040; }
|
||||
pre.doctestblock { background: #f4faff; color: #000000;
|
||||
padding: .5em; margin: 1em;
|
||||
border: 1px solid #708890; }
|
||||
table pre.doctestblock
|
||||
{ background: #dce4ec; color: #000000;
|
||||
padding: .5em; margin: 1em;
|
||||
border: 1px solid #708890; }
|
||||
|
||||
/* Variable values */
|
||||
pre.variable { background: #dce4ec; color: #000000;
|
||||
padding: .5em; margin: 0;
|
||||
border: 1px solid #708890; }
|
||||
.variable-linewrap { background: transparent; color: #604000; }
|
||||
.variable-ellipsis { background: transparent; color: #604000; }
|
||||
.variable-quote { background: transparent; color: #604000; }
|
||||
.re { background: transparent; color: #000000; }
|
||||
.re-char { background: transparent; color: #006030; }
|
||||
.re-op { background: transparent; color: #600000; }
|
||||
.re-group { background: transparent; color: #003060; }
|
||||
.re-ref { background: transparent; color: #404040; }
|
||||
|
||||
/* Navigation bar */
|
||||
table.navbar { background: #a0c0ff; color: #0000ff;
|
||||
border: 2px groove #c0d0d0; }
|
||||
th.navbar { background: #a0c0ff; color: #0000ff; }
|
||||
th.navselect { background: #70b0ff; color: #000000; }
|
||||
.nomargin { margin: 0; }
|
||||
|
||||
/* Links */
|
||||
a:link { background: transparent; color: #0000ff; }
|
||||
a:visited { background: transparent; color: #204080; }
|
||||
a.navbar:link { background: transparent; color: #0000ff;
|
||||
text-decoration: none; }
|
||||
a.navbar:visited { background: transparent; color: #204080;
|
||||
text-decoration: none; }
|
||||
|
||||
/* Lists */
|
||||
ul { margin-top: 0; }
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title> PyAudio </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame">
|
||||
<frame src="toc-everything.html" name="moduleFrame">
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,236 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Help</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Help </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[<a href="../private/help.html">show private</a> | hide private]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="help.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<center><h2> API Documentation </h2></center>
|
||||
|
||||
<p> This document contains the API (Application Programming Interface)
|
||||
documentation for PyAudio. Documentation for the Python
|
||||
objects defined by the project is divided into separate pages for each
|
||||
package, module, and class. The API documentation also includes two
|
||||
pages containing information about the project as a whole: a trees
|
||||
page, and an index page. </p>
|
||||
|
||||
<h2> Object Documentation </h2>
|
||||
|
||||
<p>Each <b>Package Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A description of the package. </li>
|
||||
<li> A list of the modules and sub-packages contained by the
|
||||
package. </li>
|
||||
<li> A summary of the classes defined by the package. </li>
|
||||
<li> A summary of the functions defined by the package. </li>
|
||||
<li> A summary of the variables defined by the package. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
package. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
package. </li>
|
||||
</ul></p>
|
||||
|
||||
<p>Each <b>Module Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A description of the module. </li>
|
||||
<li> A summary of the classes defined by the module. </li>
|
||||
<li> A summary of the functions defined by the module. </li>
|
||||
<li> A summary of the variables defined by the module. </li>
|
||||
<li> A detailed description of each function defined by the
|
||||
module. </li>
|
||||
<li> A detailed description of each variable defined by the
|
||||
module. </li>
|
||||
</ul></p>
|
||||
|
||||
<p>Each <b>Class Documentation</b> page contains:
|
||||
<ul>
|
||||
<li> A class inheritance diagram. </li>
|
||||
<li> A list of known subclasses. </li>
|
||||
<li> A description of the class. </li>
|
||||
<li> A summary of the methods defined by the class. </li>
|
||||
<li> A summary of the instance variables defined by the class. </li>
|
||||
<li> A summary of the class (static) variables defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each method defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each instance variable defined by the
|
||||
class. </li>
|
||||
<li> A detailed description of each class (static) variable defined
|
||||
by the class. </li>
|
||||
</ul></p>
|
||||
|
||||
<h2> Project Documentation </h2>
|
||||
|
||||
<p> The <b>Trees</b> page contains the module and class hierarchies:
|
||||
<ul>
|
||||
<li> The <i>module hierarchy</i> lists every package and module, with
|
||||
modules grouped into packages. At the top level, and within each
|
||||
package, modules and sub-packages are listed alphabetically. </li>
|
||||
<li> The <i>class hierarchy</i> lists every class, grouped by base
|
||||
class. If a class has more than one base class, then it will be
|
||||
listed under each base class. At the top level, and under each base
|
||||
class, classes are listed alphabetically. </li>
|
||||
</ul></p>
|
||||
|
||||
<p> The <b>Index</b> page contains indices of terms and
|
||||
identifiers:
|
||||
<ul>
|
||||
<li> The <i>term index</i> lists every term indexed by any object's
|
||||
documentation. For each term, the index provides links to each
|
||||
place where the term is indexed. </li>
|
||||
<li> The <i>identifier index</i> lists the (short) name of every package,
|
||||
module, class, method, function, variable, and parameter. For each
|
||||
identifier, the index provides a short description, and a link to
|
||||
its documentation. </li>
|
||||
</ul></p>
|
||||
|
||||
<h2> The Table of Contents </h2>
|
||||
|
||||
<p> The table of contents occupies the two frames on the left side of
|
||||
the window. The upper-left frame displays the <i>project
|
||||
contents</i>, and the lower-left frame displays the <i>module
|
||||
contents</i>: </p>
|
||||
|
||||
<center>
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3">
|
||||
<tr heigh="30%">
|
||||
<td align="center">
|
||||
<font size="-1">Project<br>Contents<hr>...</font></td>
|
||||
<td align="center" rowspan="2" width="70%">
|
||||
API<br>Documentation<br>Frame<br><br><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<font size="-1">Module<br>Contents<hr> <br>...<br> </font>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
</center>
|
||||
|
||||
<p> The <b>project contents frame</b> contains a list of all packages
|
||||
and modules that are defined by the project. Clicking on an entry
|
||||
will display its contents in the module contents frame. Clicking on a
|
||||
special entry, labeled "Everything," will display the contents of
|
||||
the entire project. </p>
|
||||
|
||||
<p> The <b>module contents frame</b> contains a list of every
|
||||
submodule, class, type, exception, function, and variable defined by a
|
||||
module or package. Clicking on an entry will display its
|
||||
documentation in the API documentation frame. Clicking on the name of
|
||||
the module, at the top of the frame, will display the documentation
|
||||
for the module itself. </p>
|
||||
|
||||
<p> The "<b>frames</b>" and "<b>no frames</b>" buttons below the top
|
||||
navigation bar can be used to control whether the table of contents is
|
||||
displayed or not. </p>
|
||||
|
||||
<h2> The Navigation Bar </h2>
|
||||
|
||||
<p> A navigation bar is located at the top and bottom of every page.
|
||||
It indicates what type of page you are currently viewing, and allows
|
||||
you to go to related pages. The following table describes the labels
|
||||
on the navigation bar. Note that not some labels (such as
|
||||
[Parent]) are not displayed on all pages. </p>
|
||||
|
||||
<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%">
|
||||
<tr class="summary">
|
||||
<th>Label</th>
|
||||
<th>Highlighted when...</th>
|
||||
<th>Links to...</th>
|
||||
</tr>
|
||||
<tr><td valign="top"><b>[Parent]</b></td>
|
||||
<td valign="top"><i>(never highlighted)</i></td>
|
||||
<td valign="top"> the parent of the current package </td></tr>
|
||||
<tr><td valign="top"><b>[Package]</b></td>
|
||||
<td valign="top">viewing a package</td>
|
||||
<td valign="top">the package containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><b>[Module]</b></td>
|
||||
<td valign="top">viewing a module</td>
|
||||
<td valign="top">the module containing the current object
|
||||
</td></tr>
|
||||
<tr><td valign="top"><b>[Class]</b></td>
|
||||
<td valign="top">viewing a class </td>
|
||||
<td valign="top">the class containing the current object</td></tr>
|
||||
<tr><td valign="top"><b>[Trees]</b></td>
|
||||
<td valign="top">viewing the trees page</td>
|
||||
<td valign="top"> the trees page </td></tr>
|
||||
<tr><td valign="top"><b>[Index]</b></td>
|
||||
<td valign="top">viewing the index page</td>
|
||||
<td valign="top"> the index page </td></tr>
|
||||
<tr><td valign="top"><b>[Help]</b></td>
|
||||
<td valign="top">viewing the help page</td>
|
||||
<td valign="top"> the help page </td></tr>
|
||||
</table>
|
||||
|
||||
<p> The "<b>show private</b>" and "<b>hide private</b>" buttons below
|
||||
the top navigation bar can be used to control whether documentation
|
||||
for private objects is displayed. Private objects are usually defined
|
||||
as objects whose (short) names begin with a single underscore, but do
|
||||
not end with an underscore. For example, "<code>_x</code>",
|
||||
"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>"
|
||||
are private objects; but "<code>re.sub</code>",
|
||||
"<code>__init__</code>", and "<code>type_</code>" are not. However,
|
||||
if a module defines the "<code>__all__</code>" variable, then its
|
||||
contents are used to decide which objects are private. </p>
|
||||
|
||||
<p> A timestamp below the bottom navigation bar indicates when each
|
||||
page was last updated. </p>
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Help </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title> PyAudio </title>
|
||||
</head>
|
||||
<frameset cols="20%,80%">
|
||||
<frameset rows="30%,70%">
|
||||
<frame src="toc.html" name="moduleListFrame">
|
||||
<frame src="toc-everything.html" name="moduleFrame">
|
||||
</frameset>
|
||||
<frame src="pyaudio-module.html" name="mainFrame">
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,257 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Index</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Index </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[<a href="../private/indices.html">show private</a> | hide private]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="indices.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF IDENTIFIER INDEX =========== -->
|
||||
<table class="index" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="index">
|
||||
<th colspan="2">Identifier Index</th></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__author__"><code>__author__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#__init__"><code>__init__</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#__init__"><code>__init__</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__revision__"><code>__revision__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#__version__"><code>__version__</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#close"><code>close</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#close"><code>close</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_cpu_load"><code>get_cpu_load</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info"><code>get_default_host_api_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info"><code>get_default_input_device_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info"><code>get_default_output_device_info</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_count"><code>get_device_count</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index"><code>get_device_info_by_host_api_device_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index"><code>get_device_info_by_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_format_from_width"><code>get_format_from_width</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_format_from_width"><code>get_format_from_width</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_count"><code>get_host_api_count</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index"><code>get_host_api_info_by_index</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type"><code>get_host_api_info_by_type</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_input_latency"><code>get_input_latency</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_output_latency"><code>get_output_latency</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_portaudio_version"><code>get_portaudio_version</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_portaudio_version_text"><code>get_portaudio_version_text</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_read_available"><code>get_read_available</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#get_sample_size"><code>get_sample_size</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#get_sample_size"><code>get_sample_size</code></a></td>
|
||||
<td>Function in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_time"><code>get_time</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#get_write_available"><code>get_write_available</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#is_active"><code>is_active</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#is_format_supported"><code>is_format_supported</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#is_stopped"><code>is_stopped</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#open"><code>open</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paAL"><code>paAL</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paALSA"><code>paALSA</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paASIO"><code>paASIO</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBadIODeviceCombination"><code>paBadIODeviceCombination</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBadStreamPtr"><code>paBadStreamPtr</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBeOS"><code>paBeOS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBufferTooBig"><code>paBufferTooBig</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paBufferTooSmall"><code>paBufferTooSmall</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotReadFromACallbackStream"><code>paCanNotReadFromACallbackStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream"><code>paCanNotReadFromAnOutputOnlyStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotWriteToACallbackStream"><code>paCanNotWriteToACallbackStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream"><code>paCanNotWriteToAnInputOnlyStream</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCoreAudio"><code>paCoreAudio</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paCustomFormat"><code>paCustomFormat</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paDeviceUnavailable"><code>paDeviceUnavailable</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paDirectSound"><code>paDirectSound</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaErrorCode"><code>PaErrorCode</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paFloat32"><code>paFloat32</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paHostApiNotFound"><code>paHostApiNotFound</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaHostApiTypeId"><code>PaHostApiTypeId</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo"><code>paIncompatibleHostApiSpecificStreamInfo</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paIncompatibleStreamHostApi"><code>paIncompatibleStreamHostApi</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInDevelopment"><code>paInDevelopment</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInputOverflowed"><code>paInputOverflowed</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInsufficientMemory"><code>paInsufficientMemory</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt16"><code>paInt16</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt24"><code>paInt24</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt32"><code>paInt32</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInt8"><code>paInt8</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInternalError"><code>paInternalError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidChannelCount"><code>paInvalidChannelCount</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidDevice"><code>paInvalidDevice</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidFlag"><code>paInvalidFlag</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidHostApi"><code>paInvalidHostApi</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paInvalidSampleRate"><code>paInvalidSampleRate</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paJACK"><code>paJACK</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paMME"><code>paMME</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNoDevice"><code>paNoDevice</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNoError"><code>paNoError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNotInitialized"><code>paNotInitialized</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paNullCallback"><code>paNullCallback</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paOSS"><code>paOSS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paOutputUnderflowed"><code>paOutputUnderflowed</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#PaSampleFormat"><code>PaSampleFormat</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paSampleFormatNotSupported"><code>paSampleFormatNotSupported</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paSoundManager"><code>paSoundManager</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paStreamIsNotStopped"><code>paStreamIsNotStopped</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paStreamIsStopped"><code>paStreamIsStopped</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paTimedOut"><code>paTimedOut</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paUInt8"><code>paUInt8</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paUnanticipatedHostError"><code>paUnanticipatedHostError</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paWASAPI"><code>paWASAPI</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html#paWDMKS"><code>paWDMKS</code></a></td>
|
||||
<td>Variable in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio-module.html"><code>pyaudio</code></a></td>
|
||||
<td>Module</td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html"><code>PyAudio</code></a></td>
|
||||
<td>Class in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#read"><code>read</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#start_stream"><code>start_stream</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#stop_stream"><code>stop_stream</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html"><code>Stream</code></a></td>
|
||||
<td>Class in module <a href="pyaudio-module.html"><code>pyaudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.PyAudio-class.html#terminate"><code>terminate</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></td></tr>
|
||||
<tr><td width="15%"><a href="pyaudio.Stream-class.html#write"><code>write</code></a></td>
|
||||
<td>Method in class <a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></td></tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Index </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,572 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.PyAudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<font size="-1"><b class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class PyAudio
|
||||
</b></font></br>
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[<a href="../private/pyaudio.PyAudio-class.html">show private</a> | hide private]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="pyaudio.PyAudio-class.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF CLASS DESCRIPTION =========== -->
|
||||
<h2 class="class">Class PyAudio</h2>
|
||||
|
||||
<hr/>
|
||||
|
||||
<dl class="docutils">
|
||||
<dt>Python interface to PortAudio. Provides methods to:</dt>
|
||||
<dd><ul class="first last rst-simple">
|
||||
<li>initialize and terminate PortAudio</li>
|
||||
<li>open and close streams</li>
|
||||
<li>query and inspect the available PortAudio Host APIs</li>
|
||||
<li>query and inspect the available PortAudio audio
|
||||
devices</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Use this class to open and close streams.</p>
|
||||
<hr/>
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD SUMMARY =========== -->
|
||||
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="summary">
|
||||
<th colspan="2">Method Summary</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Initialize PortAudio.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#terminate" class="summary-sig-name"><code>terminate</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Terminate PortAudio.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Management</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#open" class="summary-sig-name"><code>open</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class="summary-sig-vararg">*args</span>,
|
||||
<span class="summary-sig-kwarg">**kwargs</span>)</span></code>
|
||||
<br />
|
||||
Open a new stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#close" class="summary-sig-name"><code>close</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>stream</span>)</span></code>
|
||||
<br />
|
||||
Close a stream.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Host API</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_count" class="summary-sig-name"><code>get_host_api_count</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of PortAudio Host APIs.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info" class="summary-sig-name"><code>get_default_host_api_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the default Host API
|
||||
parameters.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="summary-sig-name"><code>get_host_api_info_by_type</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_type</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="summary-sig-name"><code>get_host_api_info_by_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_index</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index" class="summary-sig-name"><code>get_device_info_by_host_api_device_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>host_api_index</span>,
|
||||
<span class=summary-sig-arg>host_api_device_index</span>)</span></code>
|
||||
<br />
|
||||
Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Device API</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_count" class="summary-sig-name"><code>get_device_count</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of PortAudio Host APIs.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#is_format_supported" class="summary-sig-name"><code>is_format_supported</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>rate</span>,
|
||||
<span class=summary-sig-arg>input_device</span>,
|
||||
<span class=summary-sig-arg>input_channels</span>,
|
||||
<span class=summary-sig-arg>input_format</span>,
|
||||
<span class=summary-sig-arg>output_device</span>,
|
||||
<span class=summary-sig-arg>output_channels</span>,
|
||||
<span class=summary-sig-arg>output_format</span>)</span></code>
|
||||
<br />
|
||||
Check to see if specified device configuration
|
||||
is supported.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info" class="summary-sig-name"><code>get_default_input_device_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the default input Device parameters as a
|
||||
dictionary.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info" class="summary-sig-name"><code>get_default_output_device_info</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the default output Device parameters as a
|
||||
dictionary.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>dict</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="summary-sig-name"><code>get_device_info_by_index</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>device_index</span>)</span></code>
|
||||
<br />
|
||||
Return the Device parameters for device specified in
|
||||
<a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a> as a dictionary.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Format Conversion</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_sample_size" class="summary-sig-name"><code>get_sample_size</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>format</span>)</span></code>
|
||||
<br />
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a> (a <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a> constant).</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p><a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a></p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_format_from_width" class="summary-sig-name"><code>get_format_from_width</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>width</span>,
|
||||
<span class=summary-sig-arg>unsigned</span>)</span></code>
|
||||
<br />
|
||||
Returns a PortAudio format constant for
|
||||
the specified <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a>.</td></tr>
|
||||
</table><br />
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD DETAILS =========== -->
|
||||
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="details">
|
||||
<th colspan="2">Method Details</th></tr>
|
||||
</table>
|
||||
|
||||
<a name="open"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">open</span>(<span class=sig-arg>self</span>,
|
||||
<span class="sig-vararg">*args</span>,
|
||||
<span class="sig-kwarg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
<p>Open a new stream. See constructor for
|
||||
<a href="pyaudio.Stream-class.html#__init__" class="link"><code>Stream.__init__</code></a> for parameter details.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="close"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">close</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>stream</span>)</span>
|
||||
</h3>
|
||||
<p>Close a stream. Typically use <a href="pyaudio.Stream-class.html#close" class="link"><code>Stream.close</code></a> instead.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>stream</b></code> -
|
||||
<p>An instance of the <a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a> object.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>if stream does not exist.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_count"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_count</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of PortAudio Host APIs.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_host_api_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_host_api_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the default Host API
|
||||
parameters. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if no default input device available</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_info_by_type"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_info_by_type</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_type</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_type</b></code> -
|
||||
<p>The desired Host API (<a href="pyaudio-module.html#PaHostApiTypeId" class="link"><code>PaHostApiTypeId</code></a> constant).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="link"><code>host_api_type</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_host_api_info_by_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_host_api_info_by_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_index</b></code> -
|
||||
<p>The host api index.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="link"><code>host_api_index</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_info_by_host_api_device_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_info_by_host_api_device_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>host_api_index</span>,
|
||||
<span class=sig-arg>host_api_device_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>host_api_index</b></code> -
|
||||
<p>The Host API index number.</p>
|
||||
<dd><code><b>host_api_device_index</b></code> -
|
||||
<p>The <em>n</em> 'th device of the host API.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>for invalid indices</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_count"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_count</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of PortAudio Host APIs.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_format_supported"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_format_supported</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>rate</span>,
|
||||
<span class=sig-arg>input_device</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>input_channels</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>input_format</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_device</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_channels</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_format</span>=<span class=sig-default>None</span>)</span>
|
||||
</h3>
|
||||
<p>Check to see if specified device configuration
|
||||
is supported.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>rate</b></code> -
|
||||
<p>Specifies the desired rate (in Hz)</p>
|
||||
<dd><code><b>input_device</b></code> -
|
||||
<p>The input device index. Specify <code>None</code> (default) for
|
||||
half-duplex output-only streams.</p>
|
||||
<dd><code><b>input_channels</b></code> -
|
||||
<p>The desired number of input channels. Ignored if
|
||||
<a href="pyaudio.PyAudio-class.html#is_format_supported" class="link"><code>input_device</code></a> is not specified (or <code>None</code>).</p>
|
||||
<dd><code><b>input_format</b></code> -
|
||||
<p>PortAudio sample format constant defined
|
||||
in this module</p>
|
||||
<dd><code><b>output_device</b></code> -
|
||||
<p>The output device index. Specify <code>None</code> (default) for
|
||||
half-duplex input-only streams.</p>
|
||||
<dd><code><b>output_channels</b></code> -
|
||||
<p>The desired number of output channels. Ignored if
|
||||
<a href="pyaudio.PyAudio-class.html#is_format_supported" class="link"><code>input_device</code></a> is not specified (or <code>None</code>).</p>
|
||||
<dd><code><b>output_format</b></code> -
|
||||
<p>PortAudio sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>PortAudio error or invalid devices.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_input_device_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_input_device_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the default input Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>No default input device available.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_default_output_device_info"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_default_output_device_info</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the default output Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>No default output device available.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_device_info_by_index"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_device_info_by_index</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>device_index</span>)</span>
|
||||
</h3>
|
||||
<p>Return the Device parameters for device specified in
|
||||
<a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a> as a dictionary. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="docutils literal"><span class="pre">PaDeviceInfo</span></tt>
|
||||
structure.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>device_index</b></code> -
|
||||
<p>The device index.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>dict</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>Invalid <a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="link"><code>device_index</code></a>.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_sample_size"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_sample_size</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>format</span>)</span>
|
||||
</h3>
|
||||
<p>Returns the size (in bytes) for the specified
|
||||
sample <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a> (a <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a> constant).</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>format</b></code> -
|
||||
<p>Sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>Invalid specified <a href="pyaudio.PyAudio-class.html#get_sample_size" class="link"><code>format</code></a>.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_format_from_width"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_format_from_width</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>width</span>,
|
||||
<span class=sig-arg>unsigned</span>=<span class=sig-default>True</span>)</span>
|
||||
</h3>
|
||||
<p>Returns a PortAudio format constant for
|
||||
the specified <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a>.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>width</b></code> -
|
||||
<p>The desired sample width in bytes (1, 2, 3, or 4)</p>
|
||||
<dd><code><b>unsigned</b></code> -
|
||||
<p>For 1 byte width, specifies signed or unsigned format.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>for invalid <a href="pyaudio.PyAudio-class.html#get_format_from_width" class="link"><code>width</code></a></p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="__init__"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>)</span>
|
||||
<br /><i>(Constructor)</i>
|
||||
</h3>
|
||||
<p>Initialize PortAudio.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="terminate"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">terminate</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Terminate PortAudio.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<p><b>Attention:</b> <p>Be sure to call this method for every
|
||||
instance of this object to release PortAudio resources.</p>
|
||||
</p>
|
||||
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
<br />
|
||||
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,445 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.Stream</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<font size="-1"><b class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class Stream
|
||||
</b></font></br>
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[<a href="../private/pyaudio.Stream-class.html">show private</a> | hide private]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="pyaudio.Stream-class.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF CLASS DESCRIPTION =========== -->
|
||||
<h2 class="class">Class Stream</h2>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>PortAudio Stream Wrapper. Use <a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a> to make a new
|
||||
<a href="pyaudio.Stream-class.html" class="link"><code>Stream</code></a>.</p>
|
||||
<hr/>
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD SUMMARY =========== -->
|
||||
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="summary">
|
||||
<th colspan="2">Method Summary</th></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Opening and Closing</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>PA_manager</span>,
|
||||
<span class=summary-sig-arg>rate</span>,
|
||||
<span class=summary-sig-arg>channels</span>,
|
||||
<span class=summary-sig-arg>format</span>,
|
||||
<span class=summary-sig-arg>input</span>,
|
||||
<span class=summary-sig-arg>output</span>,
|
||||
<span class=summary-sig-arg>input_device_index</span>,
|
||||
<span class=summary-sig-arg>output_device_index</span>,
|
||||
<span class=summary-sig-arg>frames_per_buffer</span>,
|
||||
<span class=summary-sig-arg>start</span>)</span></code>
|
||||
<br />
|
||||
Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a>.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#close" class="summary-sig-name"><code>close</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Close the stream</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Info</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_input_latency" class="summary-sig-name"><code>get_input_latency</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the input latency.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_output_latency" class="summary-sig-name"><code>get_output_latency</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the input latency.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_time" class="summary-sig-name"><code>get_time</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return stream time.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>float</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_cpu_load" class="summary-sig-name"><code>get_cpu_load</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the CPU load.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Stream Management</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#start_stream" class="summary-sig-name"><code>start_stream</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Start the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"> </font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#stop_stream" class="summary-sig-name"><code>stop_stream</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Stop the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#is_active" class="summary-sig-name"><code>is_active</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Returns whether the stream is active.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>bool</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#is_stopped" class="summary-sig-name"><code>is_stopped</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Returns whether the stream is stopped.</td></tr>
|
||||
<tr bgcolor="#e8f0f8" class="group">
|
||||
<th colspan="2"> Input Output</th></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p><code>None</code></p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#write" class="summary-sig-name"><code>write</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>frames</span>,
|
||||
<span class=summary-sig-arg>num_frames</span>,
|
||||
<span class=summary-sig-arg>exception_on_underflow</span>)</span></code>
|
||||
<br />
|
||||
Write samples to the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>str</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#read" class="summary-sig-name"><code>read</code></a>(<span class=summary-sig-arg>self</span>,
|
||||
<span class=summary-sig-arg>num_frames</span>)</span></code>
|
||||
<br />
|
||||
Read samples from the stream.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_read_available" class="summary-sig-name"><code>get_read_available</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of frames that can be read
|
||||
without waiting.</td></tr>
|
||||
<tr><td align="right" valign="top" width="15%"><font size="-1"><p>int</p>
|
||||
</font></td>
|
||||
<td><code><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_write_available" class="summary-sig-name"><code>get_write_available</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
|
||||
<br />
|
||||
Return the number of frames that can be written
|
||||
without waiting.</td></tr>
|
||||
</table><br />
|
||||
|
||||
|
||||
<!-- =========== START OF METHOD DETAILS =========== -->
|
||||
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="details">
|
||||
<th colspan="2">Method Details</th></tr>
|
||||
</table>
|
||||
|
||||
<a name="__init__"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>PA_manager</span>,
|
||||
<span class=sig-arg>rate</span>,
|
||||
<span class=sig-arg>channels</span>,
|
||||
<span class=sig-arg>format</span>,
|
||||
<span class=sig-arg>input</span>=<span class=sig-default>False</span>,
|
||||
<span class=sig-arg>output</span>=<span class=sig-default>False</span>,
|
||||
<span class=sig-arg>input_device_index</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>output_device_index</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>frames_per_buffer</span>=<span class=sig-default>1024</span>,
|
||||
<span class=sig-arg>start</span>=<span class=sig-default>True</span>)</span>
|
||||
<br /><i>(Constructor)</i>
|
||||
</h3>
|
||||
<p>Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link"><code>PyAudio.open</code></a>. A stream can either be input, output, or both.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>PA_manager</b></code> -
|
||||
<p>A reference to the managing <a href="pyaudio.PyAudio-class.html" class="link"><code>PyAudio</code></a> instance</p>
|
||||
<dd><code><b>rate</b></code> -
|
||||
<p>Sampling rate</p>
|
||||
<dd><code><b>channels</b></code> -
|
||||
<p>Number of channels</p>
|
||||
<dd><code><b>format</b></code> -
|
||||
<p>Sampling size and format. See <a href="pyaudio-module.html#PaSampleFormat" class="link"><code>PaSampleFormat</code></a>.</p>
|
||||
<dd><code><b>input</b></code> -
|
||||
<p>Specifies whether this is an input stream.
|
||||
Defaults to False.</p>
|
||||
<dd><code><b>output</b></code> -
|
||||
<p>Specifies whether this is an output stream.
|
||||
Defaults to False.</p>
|
||||
<dd><code><b>input_device_index</b></code> -
|
||||
<p>Index of Input Device to use.
|
||||
Unspecified (or None) uses default device.
|
||||
Ignored if <a href="pyaudio.Stream-class.html#__init__" class="link"><code>input</code></a> is False.</p>
|
||||
<dd><code><b>output_device_index</b></code> -
|
||||
<p>Index of Output Device to use.
|
||||
Unspecified (or None) uses the default device.
|
||||
Ignored if <a href="pyaudio.Stream-class.html#__init__" class="link"><code>output</code></a> is False.</p>
|
||||
<dd><code><b>frames_per_buffer</b></code> -
|
||||
<p>Specifies the number of frames per buffer.</p>
|
||||
<dd><code><b>start</b></code> -
|
||||
<p>Start the stream running immediately.
|
||||
Defaults to True. In general, there is no reason to set
|
||||
this to false.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>ValueError</b></code> -
|
||||
<p>Neither input nor output
|
||||
are set True.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="close"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">close</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Close the stream</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_input_latency"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_input_latency</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the input latency.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_output_latency"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_output_latency</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the input latency.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_time"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_time</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return stream time.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_cpu_load"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_cpu_load</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the CPU load.</p>
|
||||
<p>(Note: this is always 0.0 for the blocking API.)</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>float</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="start_stream"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">start_stream</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Start the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="stop_stream"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">stop_stream</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Stop the stream. Once the stream is stopped,
|
||||
one may not call write or read. However, one may
|
||||
call start_stream to resume the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_active"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_active</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Returns whether the stream is active.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="is_stopped"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">is_stopped</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Returns whether the stream is stopped.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>bool</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="write"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">write</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>frames</span>,
|
||||
<span class=sig-arg>num_frames</span>=<span class=sig-default>None</span>,
|
||||
<span class=sig-arg>exception_on_underflow</span>=<span class=sig-default>False</span>)</span>
|
||||
</h3>
|
||||
<p>Write samples to the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>frames</b></code> -
|
||||
<p>The frames of data.</p>
|
||||
<dd><code><b>num_frames</b></code> -
|
||||
<p>The number of frames to write.
|
||||
Defaults to None, in which this value will be
|
||||
automatically computed.</p>
|
||||
<dd><code><b>exception_on_underflow</b></code> -
|
||||
<p>Specifies whether an exception should be thrown
|
||||
(or silently ignored) on buffer underflow. Defaults
|
||||
to False for improved performance, especially on
|
||||
slower platforms.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p><code>None</code></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if the stream is not an output stream
|
||||
or if the write operation was unsuccessful.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="read"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">read</span>(<span class=sig-arg>self</span>,
|
||||
<span class=sig-arg>num_frames</span>)</span>
|
||||
</h3>
|
||||
<p>Read samples from the stream.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Parameters:</b></dt>
|
||||
<dd><code><b>num_frames</b></code> -
|
||||
<p>The number of frames to read.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>str</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl><dt><b>Raises:</b></dt>
|
||||
<dd><code><b>IOError</b></code> -
|
||||
<p>if stream is not an input stream
|
||||
or if the read operation was unsuccessful.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_read_available"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_read_available</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of frames that can be read
|
||||
without waiting.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
|
||||
<a name="get_write_available"></a>
|
||||
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
|
||||
<h3><span class="sig"><span class="sig-name">get_write_available</span>(<span class=sig-arg>self</span>)</span>
|
||||
</h3>
|
||||
<p>Return the number of frames that can be written
|
||||
without waiting.</p>
|
||||
<dl><dt></dt><dd>
|
||||
<dl><dt><b>Returns:</b></dt>
|
||||
<dd>
|
||||
<p>int</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
</td></tr></table>
|
||||
<br />
|
||||
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Everything</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b>Everything</b></font></center>
|
||||
<hr>
|
||||
|
||||
<!-- =========== START OF ALL CLASSES =========== -->
|
||||
<font size="+1"><b>All Classes</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio.PyAudio-class.html">pyaudio.PyAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio.Stream-class.html">pyaudio.Stream</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF ALL FUNCTIONS =========== -->
|
||||
<font size="+1"><b>All Functions</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width">get_format_from_width</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version">get_portaudio_version</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text">get_portaudio_version_text</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_sample_size">get_sample_size</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF ALL VARIABLES =========== -->
|
||||
<font size="+1"><b>All Variables</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__author__">__author__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__revision__">__revision__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__version__">__version__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paAL">paAL</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paALSA">paALSA</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paASIO">paASIO</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination">paBadIODeviceCombination</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr">paBadStreamPtr</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBeOS">paBeOS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooBig">paBufferTooBig</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall">paBufferTooSmall</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream">paCanNotReadFromACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream">paCanNotReadFromAnOutputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream">paCanNotWriteToACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream">paCanNotWriteToAnInputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCoreAudio">paCoreAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCustomFormat">paCustomFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable">paDeviceUnavailable</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDirectSound">paDirectSound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode">PaErrorCode</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paFloat32">paFloat32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound">paHostApiNotFound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId">PaHostApiTypeId</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo">paIncompatibleHostApiSpecificStreamInfo</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi">paIncompatibleStreamHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInDevelopment">paInDevelopment</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInputOverflowed">paInputOverflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory">paInsufficientMemory</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt16">paInt16</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt24">paInt24</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt32">paInt32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt8">paInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInternalError">paInternalError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount">paInvalidChannelCount</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidDevice">paInvalidDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidFlag">paInvalidFlag</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi">paInvalidHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate">paInvalidSampleRate</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paJACK">paJACK</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paMME">paMME</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoDevice">paNoDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoError">paNoError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNotInitialized">paNotInitialized</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNullCallback">paNullCallback</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOSS">paOSS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed">paOutputUnderflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaSampleFormat">PaSampleFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported">paSampleFormatNotSupported</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSoundManager">paSoundManager</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped">paStreamIsNotStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped">paStreamIsStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paTimedOut">paTimedOut</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUInt8">paUInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError">paUnanticipatedHostError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWASAPI">paWASAPI</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWDMKS">paWDMKS</a><br />
|
||||
<br />
|
||||
|
||||
<hr>
|
||||
<font size="-2">[<a href="../private/toc-everything.html">show private</a> | hide private]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b><a target="mainFrame" href="pyaudio-module.html">pyaudio</a></b></font></center>
|
||||
<hr>
|
||||
|
||||
<!-- =========== START OF CLASSES =========== -->
|
||||
<font size="+1"><b>Classes</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio.PyAudio-class.html">PyAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio.Stream-class.html">Stream</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF FUNCTIONS =========== -->
|
||||
<font size="+1"><b>Functions</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width">get_format_from_width</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version">get_portaudio_version</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text">get_portaudio_version_text</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_sample_size">get_sample_size</a><br />
|
||||
<br />
|
||||
|
||||
<!-- =========== START OF VARIABLES =========== -->
|
||||
<font size="+1"><b>Variables</b></font><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__author__">__author__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__revision__">__revision__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#__version__">__version__</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paAL">paAL</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paALSA">paALSA</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paASIO">paASIO</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination">paBadIODeviceCombination</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr">paBadStreamPtr</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBeOS">paBeOS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooBig">paBufferTooBig</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall">paBufferTooSmall</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream">paCanNotReadFromACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream">paCanNotReadFromAnOutputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream">paCanNotWriteToACallbackStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream">paCanNotWriteToAnInputOnlyStream</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCoreAudio">paCoreAudio</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paCustomFormat">paCustomFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable">paDeviceUnavailable</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paDirectSound">paDirectSound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode">PaErrorCode</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paFloat32">paFloat32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound">paHostApiNotFound</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId">PaHostApiTypeId</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo">paIncompatibleHostApiSpecificStreamInfo</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi">paIncompatibleStreamHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInDevelopment">paInDevelopment</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInputOverflowed">paInputOverflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory">paInsufficientMemory</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt16">paInt16</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt24">paInt24</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt32">paInt32</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInt8">paInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInternalError">paInternalError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount">paInvalidChannelCount</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidDevice">paInvalidDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidFlag">paInvalidFlag</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi">paInvalidHostApi</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate">paInvalidSampleRate</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paJACK">paJACK</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paMME">paMME</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoDevice">paNoDevice</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNoError">paNoError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNotInitialized">paNotInitialized</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paNullCallback">paNullCallback</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOSS">paOSS</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed">paOutputUnderflowed</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaSampleFormat">PaSampleFormat</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported">paSampleFormatNotSupported</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paSoundManager">paSoundManager</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped">paStreamIsNotStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped">paStreamIsStopped</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paTimedOut">paTimedOut</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUInt8">paUInt8</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError">paUnanticipatedHostError</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWASAPI">paWASAPI</a><br />
|
||||
<a target="mainFrame" href="pyaudio-module.html#paWDMKS">paWDMKS</a><br />
|
||||
<br />
|
||||
|
||||
<hr>
|
||||
<font size="-2">[<a href="../private/toc-pyaudio-module.html">show private</a> | hide private]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Table of Contents</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<center><font size="+1"><b>Table of Contents</b></font></center>
|
||||
<hr>
|
||||
<a target="moduleFrame" href="toc-everything.html">Everything</a><br />
|
||||
|
||||
<!-- =========== START OF PACKAGES =========== -->
|
||||
<br /><font size="+1"><b>Packages</b></font><br />
|
||||
|
||||
<!-- =========== START OF MODULES =========== -->
|
||||
<br /><font size="+1"><b>Modules</b></font><br />
|
||||
<a target="moduleFrame" href="toc-pyaudio-module.html">pyaudio</a><br />
|
||||
|
||||
<br /><hr>
|
||||
<font size="-2">[<a href="../private/toc.html">show private</a> | hide private]</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module and Class Hierarchies</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th bgcolor="#70b0f0" class="navselect"> Trees </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
</td>
|
||||
<td><table cellpadding="0" cellspacing="0">
|
||||
<tr><td align="right"><font size="-2">[<a href="../private/trees.html">show private</a> | hide private]</font></td></tr>
|
||||
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="trees.html" target="_top">no frames</a>]</font></td></tr>
|
||||
</table></td>
|
||||
</tr></table>
|
||||
|
||||
<!-- =========== START OF MODULE HIERARCHY =========== -->
|
||||
<h2>Module Hierarchy</h2>
|
||||
<ul>
|
||||
<li> <b><a href="pyaudio-module.html"><code>pyaudio</code></a></b>: <i>pyAudio : Python Bindings for PortAudio v19.</i>
|
||||
</ul>
|
||||
|
||||
<!-- =========== START OF CLASS HIERARCHY =========== -->
|
||||
<h2>Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li> <b><a href="pyaudio.PyAudio-class.html"><code>pyaudio.PyAudio</code></a></b>: <i>
|
||||
initialize and terminate PortAudio</i>
|
||||
<li> <b><a href="pyaudio.Stream-class.html"><code>pyaudio.Stream</code></a></b>: <i>
|
||||
PortAudio Stream Wrapper.</i>
|
||||
</ul>
|
||||
|
||||
<!-- =========== START OF NAVBAR =========== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="center">
|
||||
<th class="navbar"> <a class="navbar" href="pyaudio-module.html">Home</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
|
||||
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center">
|
||||
<p class="nomargin">
|
||||
PyAudio
|
||||
</p></th></tr></table>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td align="left"><font size="-2">Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006</font></td>
|
||||
<td align="right"><a href="http://epydoc.sourceforge.net"
|
||||
><font size="-2">http://epydoc.sf.net</font></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,825 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
Module pyaudio
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pyaudio-module.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== MODULE DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Module pyaudio</h1><p class="nomargin-top"><span class="codelink"><a href="pyaudio-pysrc.html">source code</a></span></p>
|
||||
<p>PyAudio : Python Bindings for PortAudio v19.</p>
|
||||
<p><strong>These bindings only support PortAudio blocking mode.</strong></p>
|
||||
|
||||
<hr />
|
||||
<div class="fields"> <p><strong>Version:</strong>
|
||||
0.2.0
|
||||
</p>
|
||||
<p><strong>Author:</strong>
|
||||
Hubert Pham
|
||||
</p>
|
||||
</div><!-- ==================== CLASSES ==================== -->
|
||||
<a name="section-Classes"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Classes</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="summary" colspan="2">
|
||||
<a href="pyaudio.Stream-class.html" class="summary-name">Stream</a><br />
|
||||
PortAudio Stream Wrapper.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="summary" colspan="2">
|
||||
<a href="pyaudio.PyAudio-class.html" class="summary-name">PyAudio</a><br />
|
||||
initialize and terminate PortAudio
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="summary" colspan="2">
|
||||
<a href="pyaudio.PaMacCoreStreamInfo-class.html" class="summary-name">PaMacCoreStreamInfo</a><br />
|
||||
Mac OS X-only: PaMacCoreStreamInfo is a PortAudio Host API
|
||||
Specific Stream Info data structure for specifying Mac OS
|
||||
X-only settings.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== FUNCTIONS ==================== -->
|
||||
<a name="section-Functions"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Functions</span></td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Stream Conversion Convenience Functions</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio-module.html#get_sample_size" class="summary-sig-name">get_sample_size</a>(<span class="summary-sig-arg">format</span>)</span><br />
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <code class="link">format</code> (a <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a> constant).</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#get_sample_size">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"><a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a></span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio-module.html#get_format_from_width" class="summary-sig-name">get_format_from_width</a>(<span class="summary-sig-arg">width</span>,
|
||||
<span class="summary-sig-arg">unsigned</span>=<span class="summary-sig-default">True</span>)</span><br />
|
||||
Returns a PortAudio format constant for
|
||||
the specified <code class="link">width</code>.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#get_format_from_width">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> PortAudio version</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">str</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_portaudio_version"></a><span class="summary-sig-name">get_portaudio_version</span>()</span><br />
|
||||
Returns portaudio version.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#get_portaudio_version">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">str</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_portaudio_version_text"></a><span class="summary-sig-name">get_portaudio_version_text</span>()</span><br />
|
||||
Returns PortAudio version as a text string.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#get_portaudio_version_text">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== VARIABLES ==================== -->
|
||||
<a name="section-Variables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Variables</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="__revision__"></a><span class="summary-name">__revision__</span> = <code title="'$Revision: 6 $'"><code class="variable-quote">'</code><code class="variable-string">$Revision: 6 $</code><code class="variable-quote">'</code></code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> PortAudio Constants</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pyaudio-module.html#PaSampleFormat" class="summary-name">PaSampleFormat</a> = <code title="['paFloat32',
|
||||
'paInt32',
|
||||
'paInt24',
|
||||
'paInt16',
|
||||
'paInt8',
|
||||
'paUInt8',
|
||||
'paCustomFormat']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paFloat32</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paInt32</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paInt24</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paInt16</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code><br />
|
||||
A list of all PortAudio <tt class="rst-docutils literal"><span class="pre">PaSampleFormat</span></tt> value constants.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pyaudio-module.html#PaHostApiTypeId" class="summary-name">PaHostApiTypeId</a> = <code title="['paInDevelopment',
|
||||
'paDirectSound',
|
||||
'paMME',
|
||||
'paASIO',
|
||||
'paSoundManager',
|
||||
'paCoreAudio',
|
||||
'paOSS',
|
||||
'paALSA',
|
||||
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paInDevelopment</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paDirectSound</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paMME</code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code><br />
|
||||
A list of all PortAudio <tt class="rst-docutils literal"><span class="pre">PaHostApiTypeId</span></tt> constants.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a href="pyaudio-module.html#PaErrorCode" class="summary-name">PaErrorCode</a> = <code title="['paNoError',
|
||||
'paNotInitialized',
|
||||
'paUnanticipatedHostError',
|
||||
'paInvalidChannelCount',
|
||||
'paInvalidSampleRate',
|
||||
'paInvalidDevice',
|
||||
'paInvalidFlag',
|
||||
'paSampleFormatNotSupported',
|
||||
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paNoError</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paNotInitialized</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">paUnanticipat</code><code class="variable-ellipsis">...</code></code><br />
|
||||
A list of all PortAudio <tt class="rst-docutils literal"><span class="pre">PaErrorCode</span></tt> constants.
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> PaSampleFormat Values</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paFloat32"></a><span class="summary-name">paFloat32</span> = <code title="1">1</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInt32"></a><span class="summary-name">paInt32</span> = <code title="2">2</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInt24"></a><span class="summary-name">paInt24</span> = <code title="4">4</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInt16"></a><span class="summary-name">paInt16</span> = <code title="8">8</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInt8"></a><span class="summary-name">paInt8</span> = <code title="16">16</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paUInt8"></a><span class="summary-name">paUInt8</span> = <code title="32">32</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCustomFormat"></a><span class="summary-name">paCustomFormat</span> = <code title="65536">65536</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> PaHostApiTypeId Values</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInDevelopment"></a><span class="summary-name">paInDevelopment</span> = <code title="0">0</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paDirectSound"></a><span class="summary-name">paDirectSound</span> = <code title="1">1</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMME"></a><span class="summary-name">paMME</span> = <code title="2">2</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paASIO"></a><span class="summary-name">paASIO</span> = <code title="3">3</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paSoundManager"></a><span class="summary-name">paSoundManager</span> = <code title="4">4</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCoreAudio"></a><span class="summary-name">paCoreAudio</span> = <code title="5">5</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paOSS"></a><span class="summary-name">paOSS</span> = <code title="7">7</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paALSA"></a><span class="summary-name">paALSA</span> = <code title="8">8</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paAL"></a><span class="summary-name">paAL</span> = <code title="9">9</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paBeOS"></a><span class="summary-name">paBeOS</span> = <code title="10">10</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paWDMKS"></a><span class="summary-name">paWDMKS</span> = <code title="11">11</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paJACK"></a><span class="summary-name">paJACK</span> = <code title="12">12</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paWASAPI"></a><span class="summary-name">paWASAPI</span> = <code title="13">13</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paNoDevice"></a><span class="summary-name">paNoDevice</span> = <code title="-1">-1</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> PaErrorCode Values</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paNoError"></a><span class="summary-name">paNoError</span> = <code title="0">0</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paNotInitialized"></a><span class="summary-name">paNotInitialized</span> = <code title="-10000">-10000</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paUnanticipatedHostError"></a><span class="summary-name">paUnanticipatedHostError</span> = <code title="-9999">-9999</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInvalidChannelCount"></a><span class="summary-name">paInvalidChannelCount</span> = <code title="-9998">-9998</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInvalidSampleRate"></a><span class="summary-name">paInvalidSampleRate</span> = <code title="-9997">-9997</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInvalidDevice"></a><span class="summary-name">paInvalidDevice</span> = <code title="-9996">-9996</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInvalidFlag"></a><span class="summary-name">paInvalidFlag</span> = <code title="-9995">-9995</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paSampleFormatNotSupported"></a><span class="summary-name">paSampleFormatNotSupported</span> = <code title="-9994">-9994</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paBadIODeviceCombination"></a><span class="summary-name">paBadIODeviceCombination</span> = <code title="-9993">-9993</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInsufficientMemory"></a><span class="summary-name">paInsufficientMemory</span> = <code title="-9992">-9992</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paBufferTooBig"></a><span class="summary-name">paBufferTooBig</span> = <code title="-9991">-9991</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paBufferTooSmall"></a><span class="summary-name">paBufferTooSmall</span> = <code title="-9990">-9990</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paNullCallback"></a><span class="summary-name">paNullCallback</span> = <code title="-9989">-9989</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paBadStreamPtr"></a><span class="summary-name">paBadStreamPtr</span> = <code title="-9988">-9988</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paTimedOut"></a><span class="summary-name">paTimedOut</span> = <code title="-9987">-9987</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInternalError"></a><span class="summary-name">paInternalError</span> = <code title="-9986">-9986</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paDeviceUnavailable"></a><span class="summary-name">paDeviceUnavailable</span> = <code title="-9985">-9985</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paIncompatibleHostApiSpecificStreamInfo"></a><span class="summary-name">paIncompatibleHostApiSpecificStreamInfo</span> = <code title="-9984">-9984</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paStreamIsStopped"></a><span class="summary-name">paStreamIsStopped</span> = <code title="-9983">-9983</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paStreamIsNotStopped"></a><span class="summary-name">paStreamIsNotStopped</span> = <code title="-9982">-9982</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInputOverflowed"></a><span class="summary-name">paInputOverflowed</span> = <code title="-9981">-9981</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paOutputUnderflowed"></a><span class="summary-name">paOutputUnderflowed</span> = <code title="-9980">-9980</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paHostApiNotFound"></a><span class="summary-name">paHostApiNotFound</span> = <code title="-9979">-9979</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paInvalidHostApi"></a><span class="summary-name">paInvalidHostApi</span> = <code title="-9978">-9978</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCanNotReadFromACallbackStream"></a><span class="summary-name">paCanNotReadFromACallbackStream</span> = <code title="-9977">-9977</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCanNotWriteToACallbackStream"></a><span class="summary-name">paCanNotWriteToACallbackStream</span> = <code title="-9976">-9976</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCanNotReadFromAnOutputOnlyStream"></a><span class="summary-name">paCanNotReadFromAnOutputOnlyStream</span> = <code title="-9975">-9975</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paCanNotWriteToAnInputOnlyStream"></a><span class="summary-name">paCanNotWriteToAnInputOnlyStream</span> = <code title="-9974">-9974</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paIncompatibleStreamHostApi"></a><span class="summary-name">paIncompatibleStreamHostApi</span> = <code title="-9973">-9973</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== FUNCTION DETAILS ==================== -->
|
||||
<a name="section-FunctionDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Function Details</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="get_sample_size"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_sample_size</span>(<span class="sig-arg">format</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#get_sample_size">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <code class="link">format</code> (a <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a> constant).
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>format</code></strong> - PortAudio sample format constant <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a>.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: int</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - Invalid specified <code class="link">format</code>.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_format_from_width"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_format_from_width</span>(<span class="sig-arg">width</span>,
|
||||
<span class="sig-arg">unsigned</span>=<span class="sig-default">True</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#get_format_from_width">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Returns a PortAudio format constant for
|
||||
the specified <code class="link">width</code>.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>width</code></strong> - The desired sample width in bytes (1, 2, 3, or 4)</li>
|
||||
<li><strong class="pname"><code>unsigned</code></strong> - For 1 byte width, specifies signed or unsigned
|
||||
format.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a></dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - for invalid <code class="link">width</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== VARIABLES DETAILS ==================== -->
|
||||
<a name="section-VariablesDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Variables Details</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="PaSampleFormat"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">PaSampleFormat</h3>
|
||||
<p>A list of all PortAudio <tt class="rst-rst-docutils literal rst-docutils literal"><span class="pre">PaSampleFormat</span></tt> value constants.</p>
|
||||
<p>See: <a href="pyaudio-module.html#paInt32" class="link">paInt32</a>, <a href="pyaudio-module.html#paInt24" class="link">paInt24</a>, <a href="pyaudio-module.html#paInt16" class="link">paInt16</a>, <a href="pyaudio-module.html#paInt8" class="link">paInt8</a>, and <a href="pyaudio-module.html#paUInt8" class="link">paUInt8</a>.</p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paFloat32</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInt32</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInt24</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInt16</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInt8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paUInt8</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paCustomFormat</code><code class="variable-quote">'</code><code class="variable-group">]</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="PaHostApiTypeId"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">PaHostApiTypeId</h3>
|
||||
<p>A list of all PortAudio <tt class="rst-rst-docutils literal rst-docutils literal"><span class="pre">PaHostApiTypeId</span></tt> constants.</p>
|
||||
<p>See: <a href="pyaudio-module.html#paInDevelopment" class="link">paInDevelopment</a>, <a href="pyaudio-module.html#paDirectSound" class="link">paDirectSound</a>, <a href="pyaudio-module.html#paMME" class="link">paMME</a>, <a href="pyaudio-module.html#paASIO" class="link">paASIO</a>,
|
||||
<a href="pyaudio-module.html#paSoundManager" class="link">paSoundManager</a>, <a href="pyaudio-module.html#paCoreAudio" class="link">paCoreAudio</a>, <a href="pyaudio-module.html#paOSS" class="link">paOSS</a>, <a href="pyaudio-module.html#paALSA" class="link">paALSA</a>, <a href="pyaudio-module.html#paAL" class="link">paAL</a>, <em>et al...</em></p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paInDevelopment</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paDirectSound</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paMME</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paASIO</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paSoundManager</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paCoreAudio</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paOSS</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paALSA</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-ellipsis">...</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="PaErrorCode"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<h3 class="epydoc">PaErrorCode</h3>
|
||||
<p>A list of all PortAudio <tt class="rst-rst-docutils literal rst-docutils literal"><span class="pre">PaErrorCode</span></tt> constants.
|
||||
Typically, error code constants are included in Python
|
||||
exception objects (as the second argument).</p>
|
||||
<p>See: <a href="pyaudio-module.html#paNoError" class="link">paNoError</a>, <a href="pyaudio-module.html#paNotInitialized" class="link">paNotInitialized</a>, <a href="pyaudio-module.html#paUnanticipatedHostError" class="link">paUnanticipatedHostError</a>,
|
||||
<em>et al...</em></p>
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<dl class="fields">
|
||||
<dt>Value:</dt>
|
||||
<dd><table><tr><td><pre class="variable">
|
||||
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">paNoError</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paNotInitialized</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paUnanticipatedHostError</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInvalidChannelCount</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInvalidSampleRate</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInvalidDevice</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paInvalidFlag</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-quote">'</code><code class="variable-string">paSampleFormatNotSupported</code><code class="variable-quote">'</code><code class="variable-op">,</code>
|
||||
<code class="variable-ellipsis">...</code>
|
||||
</pre></td></tr></table>
|
||||
</dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th bgcolor="#70b0f0" class="navbar-select"
|
||||
> Home </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:45 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,319 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.PaMacCoreStreamInfo</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class PaMacCoreStreamInfo
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pyaudio.PaMacCoreStreamInfo-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class PaMacCoreStreamInfo</h1><p class="nomargin-top"><span class="codelink"><a href="pyaudio-pysrc.html#PaMacCoreStreamInfo">source code</a></span></p>
|
||||
Mac OS X-only: PaMacCoreStreamInfo is a PortAudio Host API
|
||||
Specific Stream Info data structure for specifying Mac OS
|
||||
X-only settings. Instantiate this class (if desired) and pass
|
||||
the instance as the argument in <a href="pyaudio.PyAudio-class.html#open" class="link">PyAudio.open</a> to parameters
|
||||
<tt class="rst-docutils literal"><span class="pre">input_host_api_specific_stream_info</span></tt> or
|
||||
<tt class="rst-docutils literal"><span class="pre">output_host_api_specific_stream_info</span></tt>. (See <a href="pyaudio.Stream-class.html#__init__" class="link">Stream.\_\_init\_\_</a>.)
|
||||
|
||||
<hr />
|
||||
<div class="fields"> <p><strong>Note:</strong>
|
||||
Mac OS X only.
|
||||
</p>
|
||||
</div><!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Instance Methods</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PaMacCoreStreamInfo-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">flags</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">channel_map</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
Initialize with flags and channel_map.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PaMacCoreStreamInfo.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Settings</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_flags"></a><span class="summary-sig-name">get_flags</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the flags set at instantiation.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PaMacCoreStreamInfo.get_flags">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">tuple or None</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_channel_map"></a><span class="summary-sig-name">get_channel_map</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the channel map set at instantiation.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PaMacCoreStreamInfo.get_channel_map">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS VARIABLES ==================== -->
|
||||
<a name="section-ClassVariables"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Class Variables</span></td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Flags (constants)</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreChangeDeviceParameters"></a><span class="summary-name">paMacCoreChangeDeviceParameters</span> = <code title="1">1</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreFailIfConversionRequired"></a><span class="summary-name">paMacCoreFailIfConversionRequired</span> = <code title="2">2</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreConversionQualityMin"></a><span class="summary-name">paMacCoreConversionQualityMin</span> = <code title="256">256</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreConversionQualityMedium"></a><span class="summary-name">paMacCoreConversionQualityMedium</span> = <code title="512">512</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreConversionQualityLow"></a><span class="summary-name">paMacCoreConversionQualityLow</span> = <code title="768">768</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreConversionQualityHigh"></a><span class="summary-name">paMacCoreConversionQualityHigh</span> = <code title="1024">1024</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreConversionQualityMax"></a><span class="summary-name">paMacCoreConversionQualityMax</span> = <code title="0">0</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCorePlayNice"></a><span class="summary-name">paMacCorePlayNice</span> = <code title="0">0</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCorePro"></a><span class="summary-name">paMacCorePro</span> = <code title="1">1</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreMinimizeCPUButPlayNice"></a><span class="summary-name">paMacCoreMinimizeCPUButPlayNice</span> = <code title="256">256</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<a name="paMacCoreMinimizeCPU"></a><span class="summary-name">paMacCoreMinimizeCPU</span> = <code title="257">257</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Method Details</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">flags</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">channel_map</span>=<span class="sig-default">None</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PaMacCoreStreamInfo.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Initialize with flags and channel_map. See PortAudio
|
||||
documentation for more details on these parameters; they are
|
||||
passed almost verbatim to the PortAudio library.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>flags</code></strong> - paMacCore* flags OR'ed together.
|
||||
See <a href="pyaudio.PaMacCoreStreamInfo-class.html" class="link">PaMacCoreStreamInfo</a>.</li>
|
||||
<li><strong class="pname"><code>channel_map</code></strong> - An array describing the channel mapping.
|
||||
See PortAudio documentation for usage.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:45 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,848 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.PyAudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class PyAudio
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pyaudio.PyAudio-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class PyAudio</h1><p class="nomargin-top"><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio">source code</a></span></p>
|
||||
<dl class="rst-docutils">
|
||||
<dt>Python interface to PortAudio. Provides methods to:</dt>
|
||||
<dd><ul class="rst-first rst-last rst-simple">
|
||||
<li>initialize and terminate PortAudio</li>
|
||||
<li>open and close streams</li>
|
||||
<li>query and inspect the available PortAudio Host APIs</li>
|
||||
<li>query and inspect the available PortAudio audio
|
||||
devices</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Use this class to open and close streams.</p>
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Instance Methods</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Initialize PortAudio.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#terminate" class="summary-sig-name">terminate</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Terminate PortAudio.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.terminate">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Stream Management</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#open" class="summary-sig-name">open</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">*args</span>,
|
||||
<span class="summary-sig-arg">**kwargs</span>)</span><br />
|
||||
Open a new stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.open">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">stream</span>)</span><br />
|
||||
Close a stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.close">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Host API</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_host_api_count"></a><span class="summary-sig-name">get_host_api_count</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the number of PortAudio Host APIs.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_host_api_count">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_host_api_info" class="summary-sig-name">get_default_host_api_info</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return a dictionary containing the default Host API
|
||||
parameters.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_host_api_info">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_type" class="summary-sig-name">get_host_api_info_by_type</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">host_api_type</span>)</span><br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <code class="link">host\_api\_type</code>.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_host_api_info_by_type">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_host_api_info_by_index" class="summary-sig-name">get_host_api_info_by_index</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">host_api_index</span>)</span><br />
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <code class="link">host\_api\_index</code>.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_host_api_info_by_index">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_host_api_device_index" class="summary-sig-name">get_device_info_by_host_api_device_index</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">host_api_index</span>,
|
||||
<span class="summary-sig-arg">host_api_device_index</span>)</span><br />
|
||||
Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_device_info_by_host_api_device_index">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Device API</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_device_count"></a><span class="summary-sig-name">get_device_count</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the number of PortAudio Host APIs.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_device_count">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">bool</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#is_format_supported" class="summary-sig-name">is_format_supported</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">rate</span>,
|
||||
<span class="summary-sig-arg">input_device</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">input_channels</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">input_format</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">output_device</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">output_channels</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">output_format</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
Check to see if specified device configuration
|
||||
is supported.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.is_format_supported">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_input_device_info" class="summary-sig-name">get_default_input_device_info</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the default input Device parameters as a
|
||||
dictionary.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_input_device_info">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_default_output_device_info" class="summary-sig-name">get_default_output_device_info</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the default output Device parameters as a
|
||||
dictionary.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_output_device_info">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">dict</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_device_info_by_index" class="summary-sig-name">get_device_info_by_index</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">device_index</span>)</span><br />
|
||||
Return the Device parameters for device specified in
|
||||
<code class="link">device\_index</code> as a dictionary.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_device_info_by_index">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Stream Format Conversion</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_sample_size" class="summary-sig-name">get_sample_size</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">format</span>)</span><br />
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <code class="link">format</code> (a <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a> constant).</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_sample_size">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"><a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a></span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.PyAudio-class.html#get_format_from_width" class="summary-sig-name">get_format_from_width</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">width</span>,
|
||||
<span class="summary-sig-arg">unsigned</span>=<span class="summary-sig-default">True</span>)</span><br />
|
||||
Returns a PortAudio format constant for
|
||||
the specified <code class="link">width</code>.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_format_from_width">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Method Details</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="terminate"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">terminate</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.terminate">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Terminate PortAudio.
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
<div class="fields"> <p><strong>Attention:</strong>
|
||||
Be sure to call this method for every
|
||||
instance of this object to release PortAudio resources.
|
||||
</p>
|
||||
</div></td></tr></table>
|
||||
</div>
|
||||
<a name="get_sample_size"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_sample_size</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">format</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_sample_size">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Returns the size (in bytes) for the specified
|
||||
sample <code class="link">format</code> (a <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a> constant).
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>format</code></strong> - Sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a>).</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: int</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - Invalid specified <code class="link">format</code>.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_format_from_width"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_format_from_width</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">width</span>,
|
||||
<span class="sig-arg">unsigned</span>=<span class="sig-default">True</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_format_from_width">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Returns a PortAudio format constant for
|
||||
the specified <code class="link">width</code>.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>width</code></strong> - The desired sample width in bytes (1, 2, 3, or 4)</li>
|
||||
<li><strong class="pname"><code>unsigned</code></strong> - For 1 byte width, specifies signed or unsigned format.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a></dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - for invalid <code class="link">width</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="open"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">open</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">*args</span>,
|
||||
<span class="sig-arg">**kwargs</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.open">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Open a new stream. See constructor for
|
||||
<a href="pyaudio.Stream-class.html#__init__" class="link">Stream.\_\_init\_\_</a> for parameter details.
|
||||
<dl class="fields">
|
||||
<dt>Returns:</dt>
|
||||
<dd><a href="pyaudio.Stream-class.html" class="link">Stream</a></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="close"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">stream</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.close">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Close a stream. Typically use <a href="pyaudio.Stream-class.html#close" class="link">Stream.close</a> instead.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>stream</code></strong> - An instance of the <a href="pyaudio.Stream-class.html" class="link">Stream</a> object.</li>
|
||||
</ul></dd>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - if stream does not exist.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_default_host_api_info"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_default_host_api_info</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_host_api_info">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return a dictionary containing the default Host API
|
||||
parameters. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaHostApiInfo</span></tt> structure.
|
||||
<dl class="fields">
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - if no default input device available</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_host_api_info_by_type"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_host_api_info_by_type</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">host_api_type</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_host_api_info_by_type">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <code class="link">host\_api\_type</code>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>host_api_type</code></strong> - The desired Host API (<a href="pyaudio-module.html#PaHostApiTypeId" class="link">PaHostApiTypeId</a> constant).</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - for invalid <code class="link">host\_api\_type</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_host_api_info_by_index"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_host_api_info_by_index</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">host_api_index</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_host_api_info_by_index">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return a dictionary containing the Host API parameters for the
|
||||
host API specified by the <code class="link">host\_api\_index</code>. The keys of the
|
||||
dictionary mirror the data fields of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaHostApiInfo</span></tt>
|
||||
structure.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>host_api_index</code></strong> - The host api index.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - for invalid <code class="link">host\_api\_index</code></li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_device_info_by_host_api_device_index"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_device_info_by_host_api_device_index</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">host_api_index</span>,
|
||||
<span class="sig-arg">host_api_device_index</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_device_info_by_host_api_device_index">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return a dictionary containing the Device parameters for a
|
||||
given Host API's n'th device. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>host_api_index</code></strong> - The Host API index number.</li>
|
||||
<li><strong class="pname"><code>host_api_device_index</code></strong> - The <em>n</em> 'th device of the host API.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - for invalid indices</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="is_format_supported"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">is_format_supported</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">rate</span>,
|
||||
<span class="sig-arg">input_device</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">input_channels</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">input_format</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">output_device</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">output_channels</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">output_format</span>=<span class="sig-default">None</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.is_format_supported">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Check to see if specified device configuration
|
||||
is supported.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>rate</code></strong> - Specifies the desired rate (in Hz)</li>
|
||||
<li><strong class="pname"><code>input_device</code></strong> - The input device index. Specify <code class="link">None</code> (default) for
|
||||
half-duplex output-only streams.</li>
|
||||
<li><strong class="pname"><code>input_channels</code></strong> - The desired number of input channels. Ignored if
|
||||
<code class="link">input\_device</code> is not specified (or <code class="link">None</code>).</li>
|
||||
<li><strong class="pname"><code>input_format</code></strong> - PortAudio sample format constant defined
|
||||
in this module</li>
|
||||
<li><strong class="pname"><code>output_device</code></strong> - The output device index. Specify <code class="link">None</code> (default) for
|
||||
half-duplex input-only streams.</li>
|
||||
<li><strong class="pname"><code>output_channels</code></strong> - The desired number of output channels. Ignored if
|
||||
<code class="link">input\_device</code> is not specified (or <code class="link">None</code>).</li>
|
||||
<li><strong class="pname"><code>output_format</code></strong> - PortAudio sample format constant (<a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a>).</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: bool</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - PortAudio error or invalid devices.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_default_input_device_info"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_default_input_device_info</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_input_device_info">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return the default input Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.
|
||||
<dl class="fields">
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - No default input device available.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_default_output_device_info"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_default_output_device_info</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_default_output_device_info">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return the default output Device parameters as a
|
||||
dictionary. The keys of the dictionary mirror the data fields
|
||||
of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaDeviceInfo</span></tt> structure.
|
||||
<dl class="fields">
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - No default output device available.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_device_info_by_index"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_device_info_by_index</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">device_index</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#PyAudio.get_device_info_by_index">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Return the Device parameters for device specified in
|
||||
<code class="link">device\_index</code> as a dictionary. The keys of the dictionary
|
||||
mirror the data fields of PortAudio's <tt class="rst-docutils literal"><span class="pre">PaDeviceInfo</span></tt>
|
||||
structure.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>device_index</code></strong> - The device index.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: dict</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - Invalid <code class="link">device\_index</code>.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:46 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,580 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio.Stream</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<td width="100%">
|
||||
<span class="breadcrumbs">
|
||||
<a href="pyaudio-module.html">Module pyaudio</a> ::
|
||||
Class Stream
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<!-- hide/show private -->
|
||||
<tr><td align="right"><span class="options"
|
||||
>[<a href="frames.html" target="_top">frames</a
|
||||
>] | <a href="pyaudio.Stream-class.html"
|
||||
target="_top">no frames</a>]</span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== CLASS DESCRIPTION ==================== -->
|
||||
<h1 class="epydoc">Class Stream</h1><p class="nomargin-top"><span class="codelink"><a href="pyaudio-pysrc.html#Stream">source code</a></span></p>
|
||||
PortAudio Stream Wrapper. Use <a href="pyaudio.PyAudio-class.html#open" class="link">PyAudio.open</a> to make a new
|
||||
<a href="pyaudio.Stream-class.html" class="link">Stream</a>.
|
||||
|
||||
<!-- ==================== INSTANCE METHODS ==================== -->
|
||||
<a name="section-InstanceMethods"></a>
|
||||
<table class="summary" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Instance Methods</span></td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Opening and Closing</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.Stream-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">PA_manager</span>,
|
||||
<span class="summary-sig-arg">rate</span>,
|
||||
<span class="summary-sig-arg">channels</span>,
|
||||
<span class="summary-sig-arg">format</span>,
|
||||
<span class="summary-sig-arg">input</span>=<span class="summary-sig-default">False</span>,
|
||||
<span class="summary-sig-arg">output</span>=<span class="summary-sig-default">False</span>,
|
||||
<span class="summary-sig-arg">input_device_index</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">output_device_index</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">frames_per_buffer</span>=<span class="summary-sig-default">1024</span>,
|
||||
<span class="summary-sig-arg">start</span>=<span class="summary-sig-default">True</span>,
|
||||
<span class="summary-sig-arg">input_host_api_specific_stream_info</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">output_host_api_specific_stream_info</span>=<span class="summary-sig-default">None</span>)</span><br />
|
||||
Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link">PyAudio.open</a>.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.__init__">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="close"></a><span class="summary-sig-name">close</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Close the stream</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.close">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Stream Info</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">float</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_input_latency"></a><span class="summary-sig-name">get_input_latency</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the input latency.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_input_latency">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">float</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_output_latency"></a><span class="summary-sig-name">get_output_latency</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the input latency.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_output_latency">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">float</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_time"></a><span class="summary-sig-name">get_time</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return stream time.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_time">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">float</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.Stream-class.html#get_cpu_load" class="summary-sig-name">get_cpu_load</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the CPU load.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_cpu_load">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Stream Management</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="start_stream"></a><span class="summary-sig-name">start_stream</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Start the stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.start_stream">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"> </span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.Stream-class.html#stop_stream" class="summary-sig-name">stop_stream</a>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Stop the stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.stop_stream">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">bool</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="is_active"></a><span class="summary-sig-name">is_active</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Returns whether the stream is active.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.is_active">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">bool</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="is_stopped"></a><span class="summary-sig-name">is_stopped</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Returns whether the stream is stopped.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.is_stopped">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#e8f0f8" >
|
||||
<th colspan="2" class="group-header"
|
||||
> Input Output</th></tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type"><code class="link">None</code></span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.Stream-class.html#write" class="summary-sig-name">write</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">frames</span>,
|
||||
<span class="summary-sig-arg">num_frames</span>=<span class="summary-sig-default">None</span>,
|
||||
<span class="summary-sig-arg">exception_on_underflow</span>=<span class="summary-sig-default">False</span>)</span><br />
|
||||
Write samples to the stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.write">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">str</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a href="pyaudio.Stream-class.html#read" class="summary-sig-name">read</a>(<span class="summary-sig-arg">self</span>,
|
||||
<span class="summary-sig-arg">num_frames</span>)</span><br />
|
||||
Read samples from the stream.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.read">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_read_available"></a><span class="summary-sig-name">get_read_available</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the number of frames that can be read
|
||||
without waiting.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_read_available">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="right" valign="top" class="summary">
|
||||
<span class="summary-type">int</span>
|
||||
</td><td class="summary">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><span class="summary-sig"><a name="get_write_available"></a><span class="summary-sig-name">get_write_available</span>(<span class="summary-sig-arg">self</span>)</span><br />
|
||||
Return the number of frames that can be written
|
||||
without waiting.</td>
|
||||
<td align="right" valign="top">
|
||||
<span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_write_available">source code</a></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ==================== METHOD DETAILS ==================== -->
|
||||
<a name="section-MethodDetails"></a>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr bgcolor="#70b0f0" class="table-header">
|
||||
<td align="left" colspan="2" class="table-header">
|
||||
<span class="table-header">Method Details</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<a name="__init__"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">PA_manager</span>,
|
||||
<span class="sig-arg">rate</span>,
|
||||
<span class="sig-arg">channels</span>,
|
||||
<span class="sig-arg">format</span>,
|
||||
<span class="sig-arg">input</span>=<span class="sig-default">False</span>,
|
||||
<span class="sig-arg">output</span>=<span class="sig-default">False</span>,
|
||||
<span class="sig-arg">input_device_index</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">output_device_index</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">frames_per_buffer</span>=<span class="sig-default">1024</span>,
|
||||
<span class="sig-arg">start</span>=<span class="sig-default">True</span>,
|
||||
<span class="sig-arg">input_host_api_specific_stream_info</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">output_host_api_specific_stream_info</span>=<span class="sig-default">None</span>)</span>
|
||||
<br /><em class="fname">(Constructor)</em>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#Stream.__init__">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Initialize a stream; this should be called by
|
||||
<a href="pyaudio.PyAudio-class.html#open" class="link">PyAudio.open</a>. A stream can either be input, output, or both.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>PA_manager</code></strong> - A reference to the managing <a href="pyaudio.PyAudio-class.html" class="link">PyAudio</a> instance</li>
|
||||
<li><strong class="pname"><code>rate</code></strong> - Sampling rate</li>
|
||||
<li><strong class="pname"><code>channels</code></strong> - Number of channels</li>
|
||||
<li><strong class="pname"><code>format</code></strong> - Sampling size and format. See <a href="pyaudio-module.html#PaSampleFormat" class="link">PaSampleFormat</a>.</li>
|
||||
<li><strong class="pname"><code>input</code></strong> - Specifies whether this is an input stream.
|
||||
Defaults to False.</li>
|
||||
<li><strong class="pname"><code>output</code></strong> - Specifies whether this is an output stream.
|
||||
Defaults to False.</li>
|
||||
<li><strong class="pname"><code>input_device_index</code></strong> - Index of Input Device to use.
|
||||
Unspecified (or None) uses default device.
|
||||
Ignored if <code class="link">input</code> is False.</li>
|
||||
<li><strong class="pname"><code>output_device_index</code></strong> - Index of Output Device to use.
|
||||
Unspecified (or None) uses the default device.
|
||||
Ignored if <code class="link">output</code> is False.</li>
|
||||
<li><strong class="pname"><code>frames_per_buffer</code></strong> - Specifies the number of frames per buffer.</li>
|
||||
<li><strong class="pname"><code>start</code></strong> - Start the stream running immediately.
|
||||
Defaults to True. In general, there is no reason to set
|
||||
this to false.</li>
|
||||
<li><strong class="pname"><code>input_host_api_specific_stream_info</code></strong> - Specifies a host API
|
||||
specific stream information data structure for input.
|
||||
See <a href="pyaudio.PaMacCoreStreamInfo-class.html" class="link">PaMacCoreStreamInfo</a>.</li>
|
||||
<li><strong class="pname"><code>output_host_api_specific_stream_info</code></strong> - Specifies a host API
|
||||
specific stream information data structure for output.
|
||||
See <a href="pyaudio.PaMacCoreStreamInfo-class.html" class="link">PaMacCoreStreamInfo</a>.</li>
|
||||
</ul></dd>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>ValueError</strong></code> - Neither input nor output
|
||||
are set True.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="get_cpu_load"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">get_cpu_load</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#Stream.get_cpu_load">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
<p>Return the CPU load.</p>
|
||||
<p>(Note: this is always 0.0 for the blocking API.)</p>
|
||||
<dl class="fields">
|
||||
<dt>Returns: float</dt>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="stop_stream"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">stop_stream</span>(<span class="sig-arg">self</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#Stream.stop_stream">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Stop the stream. Once the stream is stopped,
|
||||
one may not call write or read. However, one may
|
||||
call start_stream to resume the stream.
|
||||
<dl class="fields">
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="write"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">write</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">frames</span>,
|
||||
<span class="sig-arg">num_frames</span>=<span class="sig-default">None</span>,
|
||||
<span class="sig-arg">exception_on_underflow</span>=<span class="sig-default">False</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#Stream.write">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Write samples to the stream.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>frames</code></strong> - The frames of data.</li>
|
||||
<li><strong class="pname"><code>num_frames</code></strong> - The number of frames to write.
|
||||
Defaults to None, in which this value will be
|
||||
automatically computed.</li>
|
||||
<li><strong class="pname"><code>exception_on_underflow</code></strong> - Specifies whether an exception should be thrown
|
||||
(or silently ignored) on buffer underflow. Defaults
|
||||
to False for improved performance, especially on
|
||||
slower platforms.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: <code class="link">None</code></dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - if the stream is not an output stream
|
||||
or if the write operation was unsuccessful.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a name="read"></a>
|
||||
<div>
|
||||
<table class="details" border="1" cellpadding="3"
|
||||
cellspacing="0" width="100%" bgcolor="white">
|
||||
<tr><td>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top"><td>
|
||||
<h3 class="epydoc"><span class="sig"><span class="sig-name">read</span>(<span class="sig-arg">self</span>,
|
||||
<span class="sig-arg">num_frames</span>)</span>
|
||||
</h3>
|
||||
</td><td align="right" valign="top"
|
||||
><span class="codelink"><a href="pyaudio-pysrc.html#Stream.read">source code</a></span>
|
||||
</td>
|
||||
</tr></table>
|
||||
|
||||
Read samples from the stream.
|
||||
<dl class="fields">
|
||||
<dt>Parameters:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><strong class="pname"><code>num_frames</code></strong> - The number of frames to read.</li>
|
||||
</ul></dd>
|
||||
<dt>Returns: str</dt>
|
||||
<dt>Raises:</dt>
|
||||
<dd><ul class="nomargin-top">
|
||||
<li><code><strong class='fraise'>IOError</strong></code> - if stream is not an input stream
|
||||
or if the read operation was unsuccessful.</li>
|
||||
</ul></dd>
|
||||
</dl>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<br />
|
||||
<!-- ==================== NAVIGATION BAR ==================== -->
|
||||
<table class="navbar" border="0" width="100%" cellpadding="0"
|
||||
bgcolor="#a0c0ff" cellspacing="0">
|
||||
<tr valign="middle">
|
||||
<!-- Home link -->
|
||||
<th> <a
|
||||
href="pyaudio-module.html">Home</a> </th>
|
||||
|
||||
<!-- Tree link -->
|
||||
<th> <a
|
||||
href="module-tree.html">Trees</a> </th>
|
||||
|
||||
<!-- Index link -->
|
||||
<th> <a
|
||||
href="identifier-index.html">Indices</a> </th>
|
||||
|
||||
<!-- Help link -->
|
||||
<th> <a
|
||||
href="help.html">Help</a> </th>
|
||||
|
||||
<!-- Project homepage -->
|
||||
<th class="navbar" align="right" width="100%">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><th class="navbar" align="center"
|
||||
><a class="navbar" target="_top" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio-0.2.0</a></th>
|
||||
</tr></table></th>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
|
||||
<tr>
|
||||
<td align="left" class="footer">
|
||||
Generated by Epydoc 3.0.1
|
||||
on Mon Mar 3 14:22:46 2008
|
||||
</td>
|
||||
<td align="right" class="footer">
|
||||
<a target="mainFrame" href="http://epydoc.sourceforge.net"
|
||||
>http://epydoc.sourceforge.net</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,38 +0,0 @@
|
|||
<html><head><title>Epydoc Redirect Page</title>
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta http-equiv="expires" content="0" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var pages = ["pyaudio.PaMacCoreStreamInfo-c", "pyaudio.PyAudio-c", "pyaudio.Stream-c", "pyaudio-m"];
|
||||
var dottedName = get_anchor();
|
||||
if (dottedName) {
|
||||
var target = redirect_url(dottedName);
|
||||
if (target) window.location.replace(target);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<h3>Epydoc Auto-redirect page</h3>
|
||||
|
||||
<p>When javascript is enabled, this page will redirect URLs of
|
||||
the form <tt>redirect.html#<i>dotted.name</i></tt> to the
|
||||
documentation for the object with the given fully-qualified
|
||||
dotted name.</p>
|
||||
<p><a id="message"> </a></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
if (dottedName) {
|
||||
var msg = document.getElementById("message");
|
||||
msg.innerHTML = "No documentation found for <tt>"+
|
||||
dottedName+"</tt>";
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Everything</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Everything</h1>
|
||||
<hr />
|
||||
<h2 class="toc">All Classes</h2>
|
||||
<a target="mainFrame" href="pyaudio.PaMacCoreStreamInfo-class.html"
|
||||
>pyaudio.PaMacCoreStreamInfo</a><br /> <a target="mainFrame" href="pyaudio.PyAudio-class.html"
|
||||
>pyaudio.PyAudio</a><br /> <a target="mainFrame" href="pyaudio.Stream-class.html"
|
||||
>pyaudio.Stream</a><br /> <h2 class="toc">All Functions</h2>
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width"
|
||||
>pyaudio.get_format_from_width</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_portaudio_version"
|
||||
>pyaudio.get_portaudio_version</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text"
|
||||
>pyaudio.get_portaudio_version_text</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_sample_size"
|
||||
>pyaudio.get_sample_size</a><br /> <h2 class="toc">All Variables</h2>
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode"
|
||||
>pyaudio.PaErrorCode</a><br /> <a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId"
|
||||
>pyaudio.PaHostApiTypeId</a><br /> <a target="mainFrame" href="pyaudio-module.html#PaSampleFormat"
|
||||
>pyaudio.PaSampleFormat</a><br /> <a target="mainFrame" href="pyaudio-module.html#__revision__"
|
||||
>pyaudio.__revision__</a><br /> <a target="mainFrame" href="pyaudio-module.html#paAL"
|
||||
>pyaudio.paAL</a><br /> <a target="mainFrame" href="pyaudio-module.html#paALSA"
|
||||
>pyaudio.paALSA</a><br /> <a target="mainFrame" href="pyaudio-module.html#paASIO"
|
||||
>pyaudio.paASIO</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination"
|
||||
>pyaudio.paBadIODeviceCombination</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr"
|
||||
>pyaudio.paBadStreamPtr</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBeOS"
|
||||
>pyaudio.paBeOS</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBufferTooBig"
|
||||
>pyaudio.paBufferTooBig</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall"
|
||||
>pyaudio.paBufferTooSmall</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream"
|
||||
>pyaudio.paCanNotReadFromACallbackStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream"
|
||||
>pyaudio.paCanNotReadFromAnOutputOnlyStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream"
|
||||
>pyaudio.paCanNotWriteToACallbackStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream"
|
||||
>pyaudio.paCanNotWriteToAnInputOnlyStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCoreAudio"
|
||||
>pyaudio.paCoreAudio</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCustomFormat"
|
||||
>pyaudio.paCustomFormat</a><br /> <a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable"
|
||||
>pyaudio.paDeviceUnavailable</a><br /> <a target="mainFrame" href="pyaudio-module.html#paDirectSound"
|
||||
>pyaudio.paDirectSound</a><br /> <a target="mainFrame" href="pyaudio-module.html#paFloat32"
|
||||
>pyaudio.paFloat32</a><br /> <a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound"
|
||||
>pyaudio.paHostApiNotFound</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInDevelopment"
|
||||
>pyaudio.paInDevelopment</a><br /> <a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo"
|
||||
>pyaudio.paIncompatibleHostApiSpecificStreamInfo</a><br /> <a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi"
|
||||
>pyaudio.paIncompatibleStreamHostApi</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInputOverflowed"
|
||||
>pyaudio.paInputOverflowed</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory"
|
||||
>pyaudio.paInsufficientMemory</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt16"
|
||||
>pyaudio.paInt16</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt24"
|
||||
>pyaudio.paInt24</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt32"
|
||||
>pyaudio.paInt32</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt8"
|
||||
>pyaudio.paInt8</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInternalError"
|
||||
>pyaudio.paInternalError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount"
|
||||
>pyaudio.paInvalidChannelCount</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidDevice"
|
||||
>pyaudio.paInvalidDevice</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidFlag"
|
||||
>pyaudio.paInvalidFlag</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi"
|
||||
>pyaudio.paInvalidHostApi</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate"
|
||||
>pyaudio.paInvalidSampleRate</a><br /> <a target="mainFrame" href="pyaudio-module.html#paJACK"
|
||||
>pyaudio.paJACK</a><br /> <a target="mainFrame" href="pyaudio-module.html#paMME"
|
||||
>pyaudio.paMME</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNoDevice"
|
||||
>pyaudio.paNoDevice</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNoError"
|
||||
>pyaudio.paNoError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNotInitialized"
|
||||
>pyaudio.paNotInitialized</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNullCallback"
|
||||
>pyaudio.paNullCallback</a><br /> <a target="mainFrame" href="pyaudio-module.html#paOSS"
|
||||
>pyaudio.paOSS</a><br /> <a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed"
|
||||
>pyaudio.paOutputUnderflowed</a><br /> <a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported"
|
||||
>pyaudio.paSampleFormatNotSupported</a><br /> <a target="mainFrame" href="pyaudio-module.html#paSoundManager"
|
||||
>pyaudio.paSoundManager</a><br /> <a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped"
|
||||
>pyaudio.paStreamIsNotStopped</a><br /> <a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped"
|
||||
>pyaudio.paStreamIsStopped</a><br /> <a target="mainFrame" href="pyaudio-module.html#paTimedOut"
|
||||
>pyaudio.paTimedOut</a><br /> <a target="mainFrame" href="pyaudio-module.html#paUInt8"
|
||||
>pyaudio.paUInt8</a><br /> <a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError"
|
||||
>pyaudio.paUnanticipatedHostError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paWASAPI"
|
||||
>pyaudio.paWASAPI</a><br /> <a target="mainFrame" href="pyaudio-module.html#paWDMKS"
|
||||
>pyaudio.paWDMKS</a><br /><hr />
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,91 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>pyaudio</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Module pyaudio</h1>
|
||||
<hr />
|
||||
<h2 class="toc">Classes</h2>
|
||||
<a target="mainFrame" href="pyaudio.PaMacCoreStreamInfo-class.html"
|
||||
>PaMacCoreStreamInfo</a><br /> <a target="mainFrame" href="pyaudio.PyAudio-class.html"
|
||||
>PyAudio</a><br /> <a target="mainFrame" href="pyaudio.Stream-class.html"
|
||||
>Stream</a><br /> <h2 class="toc">Functions</h2>
|
||||
<a target="mainFrame" href="pyaudio-module.html#get_format_from_width"
|
||||
>get_format_from_width</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_portaudio_version"
|
||||
>get_portaudio_version</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_portaudio_version_text"
|
||||
>get_portaudio_version_text</a><br /> <a target="mainFrame" href="pyaudio-module.html#get_sample_size"
|
||||
>get_sample_size</a><br /> <h2 class="toc">Variables</h2>
|
||||
<a target="mainFrame" href="pyaudio-module.html#PaErrorCode"
|
||||
>PaErrorCode</a><br /> <a target="mainFrame" href="pyaudio-module.html#PaHostApiTypeId"
|
||||
>PaHostApiTypeId</a><br /> <a target="mainFrame" href="pyaudio-module.html#PaSampleFormat"
|
||||
>PaSampleFormat</a><br /> <a target="mainFrame" href="pyaudio-module.html#__revision__"
|
||||
>__revision__</a><br /> <a target="mainFrame" href="pyaudio-module.html#paAL"
|
||||
>paAL</a><br /> <a target="mainFrame" href="pyaudio-module.html#paALSA"
|
||||
>paALSA</a><br /> <a target="mainFrame" href="pyaudio-module.html#paASIO"
|
||||
>paASIO</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBadIODeviceCombination"
|
||||
>paBadIODeviceCombination</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBadStreamPtr"
|
||||
>paBadStreamPtr</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBeOS"
|
||||
>paBeOS</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBufferTooBig"
|
||||
>paBufferTooBig</a><br /> <a target="mainFrame" href="pyaudio-module.html#paBufferTooSmall"
|
||||
>paBufferTooSmall</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromACallbackStream"
|
||||
>paCanNotReadFromACallbackStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotReadFromAnOutputOnlyStream"
|
||||
>paCanNotReadFromAnOutputOnlyStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToACallbackStream"
|
||||
>paCanNotWriteToACallbackStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCanNotWriteToAnInputOnlyStream"
|
||||
>paCanNotWriteToAnInputOnlyStream</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCoreAudio"
|
||||
>paCoreAudio</a><br /> <a target="mainFrame" href="pyaudio-module.html#paCustomFormat"
|
||||
>paCustomFormat</a><br /> <a target="mainFrame" href="pyaudio-module.html#paDeviceUnavailable"
|
||||
>paDeviceUnavailable</a><br /> <a target="mainFrame" href="pyaudio-module.html#paDirectSound"
|
||||
>paDirectSound</a><br /> <a target="mainFrame" href="pyaudio-module.html#paFloat32"
|
||||
>paFloat32</a><br /> <a target="mainFrame" href="pyaudio-module.html#paHostApiNotFound"
|
||||
>paHostApiNotFound</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInDevelopment"
|
||||
>paInDevelopment</a><br /> <a target="mainFrame" href="pyaudio-module.html#paIncompatibleHostApiSpecificStreamInfo"
|
||||
>paIncompatibleHostApiSpecificStreamInfo</a><br /> <a target="mainFrame" href="pyaudio-module.html#paIncompatibleStreamHostApi"
|
||||
>paIncompatibleStreamHostApi</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInputOverflowed"
|
||||
>paInputOverflowed</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInsufficientMemory"
|
||||
>paInsufficientMemory</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt16"
|
||||
>paInt16</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt24"
|
||||
>paInt24</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt32"
|
||||
>paInt32</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInt8"
|
||||
>paInt8</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInternalError"
|
||||
>paInternalError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidChannelCount"
|
||||
>paInvalidChannelCount</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidDevice"
|
||||
>paInvalidDevice</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidFlag"
|
||||
>paInvalidFlag</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidHostApi"
|
||||
>paInvalidHostApi</a><br /> <a target="mainFrame" href="pyaudio-module.html#paInvalidSampleRate"
|
||||
>paInvalidSampleRate</a><br /> <a target="mainFrame" href="pyaudio-module.html#paJACK"
|
||||
>paJACK</a><br /> <a target="mainFrame" href="pyaudio-module.html#paMME"
|
||||
>paMME</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNoDevice"
|
||||
>paNoDevice</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNoError"
|
||||
>paNoError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNotInitialized"
|
||||
>paNotInitialized</a><br /> <a target="mainFrame" href="pyaudio-module.html#paNullCallback"
|
||||
>paNullCallback</a><br /> <a target="mainFrame" href="pyaudio-module.html#paOSS"
|
||||
>paOSS</a><br /> <a target="mainFrame" href="pyaudio-module.html#paOutputUnderflowed"
|
||||
>paOutputUnderflowed</a><br /> <a target="mainFrame" href="pyaudio-module.html#paSampleFormatNotSupported"
|
||||
>paSampleFormatNotSupported</a><br /> <a target="mainFrame" href="pyaudio-module.html#paSoundManager"
|
||||
>paSoundManager</a><br /> <a target="mainFrame" href="pyaudio-module.html#paStreamIsNotStopped"
|
||||
>paStreamIsNotStopped</a><br /> <a target="mainFrame" href="pyaudio-module.html#paStreamIsStopped"
|
||||
>paStreamIsStopped</a><br /> <a target="mainFrame" href="pyaudio-module.html#paTimedOut"
|
||||
>paTimedOut</a><br /> <a target="mainFrame" href="pyaudio-module.html#paUInt8"
|
||||
>paUInt8</a><br /> <a target="mainFrame" href="pyaudio-module.html#paUnanticipatedHostError"
|
||||
>paUnanticipatedHostError</a><br /> <a target="mainFrame" href="pyaudio-module.html#paWASAPI"
|
||||
>paWASAPI</a><br /> <a target="mainFrame" href="pyaudio-module.html#paWDMKS"
|
||||
>paWDMKS</a><br /><hr />
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="ascii"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Table of Contents</title>
|
||||
<link rel="stylesheet" href="epydoc.css" type="text/css" />
|
||||
<script type="text/javascript" src="epydoc.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="white" text="black" link="blue" vlink="#204080"
|
||||
alink="#204080">
|
||||
<h1 class="toc">Table of Contents</h1>
|
||||
<hr />
|
||||
<a target="moduleFrame" href="toc-everything.html">Everything</a>
|
||||
<br />
|
||||
<h2 class="toc">Modules</h2>
|
||||
<a target="moduleFrame" href="toc-pyaudio-module.html"
|
||||
onclick="setFrame('toc-pyaudio-module.html','pyaudio-module.html');" >pyaudio</a><br /><hr />
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Private objects are initially displayed (because if
|
||||
// javascript is turned off then we want them to be
|
||||
// visible); but by default, we want to hide them. So hide
|
||||
// them unless we have a cookie that says to show them.
|
||||
checkCookie();
|
||||
// -->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
|
@ -1 +0,0 @@
|
|||
print "Installation Completed Successfully."
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 119 KiB |
1083
pyaudio/pyaudio.py
1083
pyaudio/pyaudio.py
File diff suppressed because it is too large
Load Diff
121
pyaudio/setup.py
121
pyaudio/setup.py
|
@ -1,121 +0,0 @@
|
|||
"""
|
||||
PyAudio v0.2.0: Python Bindings for PortAudio.
|
||||
|
||||
Copyright (c) 2006-2008 Hubert Pham
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
|
||||
OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
from distutils.core import setup, Extension
|
||||
import sys
|
||||
|
||||
__revision__ = "$Revision: 14 $"
|
||||
|
||||
# Note: distutils will try to locate and link dynamically
|
||||
# against portaudio.
|
||||
#
|
||||
# You probably don't want to statically link in the PortAudio
|
||||
# library unless you're building on Microsoft Windows.
|
||||
#
|
||||
# In any case, if you would rather statically link in libportaudio,
|
||||
# run:
|
||||
#
|
||||
# % python setup.py build --static-link
|
||||
#
|
||||
# Be sure to specify the location of the libportaudio.a in
|
||||
# the `extra_link_args' variable below.
|
||||
|
||||
STATIC_LINKING = False
|
||||
|
||||
if "--static-link" in sys.argv:
|
||||
STATIC_LINKING = True
|
||||
sys.argv.remove("--static-link")
|
||||
|
||||
pyaudio_module_sources = ['_portaudiomodule.c']
|
||||
|
||||
include_dirs = []
|
||||
external_libraries = []
|
||||
extra_link_args = []
|
||||
scripts = []
|
||||
defines = []
|
||||
|
||||
if STATIC_LINKING:
|
||||
extra_link_args = ['../portaudio-v19/lib/.libs/libportaudio.a']
|
||||
include_dirs = ['../portaudio-v19/include/']
|
||||
else:
|
||||
# dynamic linking
|
||||
external_libraries = ['portaudio']
|
||||
extra_link_args = []
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
defines += [('MACOSX', '1')]
|
||||
|
||||
if STATIC_LINKING:
|
||||
|
||||
# platform specific configuration
|
||||
if sys.platform == 'darwin':
|
||||
extra_link_args += ['-framework', 'CoreAudio',
|
||||
'-framework', 'AudioToolbox',
|
||||
'-framework', 'AudioUnit',
|
||||
'-framework', 'Carbon']
|
||||
|
||||
elif sys.platform == 'cygwin':
|
||||
external_libraries += ['winmm']
|
||||
extra_link_args += ['-lwinmm']
|
||||
|
||||
elif sys.platform == 'win32':
|
||||
# i.e., Win32 Python with mingw32
|
||||
# run: python setup.py build -cmingw32
|
||||
external_libraries += ['winmm']
|
||||
extra_link_args += ['-lwinmm']
|
||||
scripts += ['packaging/postinst.py']
|
||||
|
||||
elif sys.platform == 'linux2':
|
||||
external_libraries += ['rt', 'm', 'pthread']
|
||||
|
||||
# Since you're insisting on linking statically against
|
||||
# PortAudio on GNU/Linux, be sure to link in whatever sound
|
||||
# backend you used in portaudio (e.g., ALSA, JACK, etc...)
|
||||
|
||||
# I'll start you off with ALSA, since that's the most common
|
||||
# today. If you need JACK support, add it here.
|
||||
|
||||
external_libraries += ['asound']
|
||||
|
||||
|
||||
pyaudio = Extension('_portaudio',
|
||||
sources = pyaudio_module_sources,
|
||||
include_dirs = include_dirs,
|
||||
define_macros = defines,
|
||||
libraries = external_libraries,
|
||||
extra_link_args = extra_link_args)
|
||||
|
||||
setup (name = 'PyAudio',
|
||||
version = '0.2.0',
|
||||
author = "Hubert Pham",
|
||||
url = "http://people.csail.mit.edu/hubert/pyaudio/",
|
||||
description = 'PortAudio Python Bindings',
|
||||
long_description = __doc__.lstrip(),
|
||||
scripts = scripts,
|
||||
py_modules = ['pyaudio'],
|
||||
ext_modules = [pyaudio])
|
|
@ -1,77 +0,0 @@
|
|||
# An example of what NOT to do:
|
||||
# Don't reuse a stream object after closing it!
|
||||
|
||||
import _portaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
|
||||
def get_format_from_width(width, unsigned = True):
|
||||
"""
|
||||
Returns a PortAudio format constant for
|
||||
the specified `width`.
|
||||
|
||||
:param `width`:
|
||||
The desired sample width in bytes (1, 2, 3, or 4)
|
||||
:param `unsigned`:
|
||||
For 1 byte width, specifies signed or unsigned
|
||||
format.
|
||||
|
||||
:raises ValueError: for invalid `width`
|
||||
:rtype: `PaSampleFormat`
|
||||
|
||||
"""
|
||||
p = _portaudio
|
||||
|
||||
if width == 1:
|
||||
if unsigned:
|
||||
return p.paUInt8
|
||||
else:
|
||||
return p.paInt8
|
||||
elif width == 2:
|
||||
return p.paInt16
|
||||
elif width == 3:
|
||||
return p.paInt24
|
||||
elif width == 4:
|
||||
return p.paFloat32
|
||||
else:
|
||||
raise ValueError, "Invalid width: %d" % width
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Usage: %s filename.wav" % sys.argv[0]
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
||||
print "* initializing"
|
||||
_portaudio.initialize()
|
||||
|
||||
print "* opening"
|
||||
stream = _portaudio.open(format = get_format_from_width(wf.getsampwidth()),
|
||||
channels = wf.getnchannels(),
|
||||
rate = wf.getframerate(),
|
||||
input = True,
|
||||
output = True)
|
||||
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
print "* starting stream"
|
||||
_portaudio.start_stream(stream)
|
||||
|
||||
while data != '':
|
||||
_portaudio.write_stream(stream, data, chunk)
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
# OK...
|
||||
_portaudio.close(stream)
|
||||
|
||||
# Fixed -- no longer relevant. An exception will be thrown.
|
||||
|
||||
# -----DEPRECATED COMMENT:
|
||||
# BUT! don't re-use the stream object after closing it!
|
||||
# Depending on the platform, this might crash Python.
|
||||
print "* CRASH ----------*"
|
||||
print _portaudio.get_stream_read_available(stream)
|
||||
|
|
@ -1,266 +0,0 @@
|
|||
/** @file patest_read_record.c
|
||||
@brief Record input into an array; Save array to a file; Playback recorded
|
||||
data. Implemented using the blocking API (Pa_ReadStream(), Pa_WriteStream() )
|
||||
@author Phil Burk http://www.softsynth.com
|
||||
@author Ross Bencina rossb@audiomulch.com
|
||||
*/
|
||||
/*
|
||||
* $Id: patest_read_record.c 757 2004-02-13 07:48:10Z rossbencina $
|
||||
*
|
||||
* This program uses the PortAudio Portable Audio Library.
|
||||
* For more information see: http://www.portaudio.com
|
||||
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files
|
||||
* (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* Any person wishing to distribute modifications to the Software is
|
||||
* requested to send the modifications to the original developer so that
|
||||
* they can be incorporated into the canonical version.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "portaudio.h"
|
||||
|
||||
/* #define SAMPLE_RATE (17932) /* Test failure to open with this value. */
|
||||
#define SAMPLE_RATE (44100)
|
||||
#define FRAMES_PER_BUFFER (1024)
|
||||
#define NUM_SECONDS (5)
|
||||
#define NUM_CHANNELS (2)
|
||||
/* #define DITHER_FLAG (paDitherOff) */
|
||||
#define DITHER_FLAG (0) /**/
|
||||
|
||||
/* Select sample format. */
|
||||
#if 1
|
||||
#define PA_SAMPLE_TYPE paFloat32
|
||||
typedef float SAMPLE;
|
||||
#define SAMPLE_SILENCE (0.0f)
|
||||
#define PRINTF_S_FORMAT "%.8f"
|
||||
#elif 1
|
||||
#define PA_SAMPLE_TYPE paInt16
|
||||
typedef short SAMPLE;
|
||||
#define SAMPLE_SILENCE (0)
|
||||
#define PRINTF_S_FORMAT "%d"
|
||||
#elif 0
|
||||
#define PA_SAMPLE_TYPE paInt8
|
||||
typedef char SAMPLE;
|
||||
#define SAMPLE_SILENCE (0)
|
||||
#define PRINTF_S_FORMAT "%d"
|
||||
#else
|
||||
#define PA_SAMPLE_TYPE paUInt8
|
||||
typedef unsigned char SAMPLE;
|
||||
#define SAMPLE_SILENCE (128)
|
||||
#define PRINTF_S_FORMAT "%d"
|
||||
#endif
|
||||
|
||||
#define FORMATID "fmt "
|
||||
#define DATAID "data"
|
||||
|
||||
typedef struct {
|
||||
char chunkID[4];
|
||||
long chunkSize;
|
||||
short wFormatTag;
|
||||
unsigned short wChannels;
|
||||
unsigned long dwSamplesPerSec;
|
||||
unsigned long dwAvgBytesPerSec;
|
||||
unsigned short wBlockAlign;
|
||||
unsigned short wBitsPerSample;
|
||||
} FormatChunk;
|
||||
|
||||
typedef struct {
|
||||
char chunkID[4];
|
||||
long chunkSize;
|
||||
} DataChunkHeader;
|
||||
|
||||
|
||||
|
||||
int checkHeader(FILE *fid) {
|
||||
|
||||
char riff[4];
|
||||
char wave[4];
|
||||
|
||||
fread(riff, 4, sizeof(char), fid);
|
||||
/* throwaway 4 bytes */
|
||||
fread(wave, 4, sizeof(char), fid);
|
||||
fread(wave, 4, sizeof(char), fid);
|
||||
|
||||
if (!((strncmp(riff, "RIFF", 4) == 0) &&
|
||||
(strncmp(wave, "WAVE", 4) == 0))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int getData(FILE *fid, char **data) {
|
||||
|
||||
DataChunkHeader dch;
|
||||
|
||||
while (strncmp(dch.chunkID, DATAID, 4) != 0) {
|
||||
fread(&dch, sizeof(DataChunkHeader), 1, fid);
|
||||
if (feof(fid) || ferror(fid))
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Size of data: %d\n", dch.chunkSize);
|
||||
|
||||
*data = (char *) malloc ( dch.chunkSize * sizeof(char) );
|
||||
fread(*data, sizeof(char), dch.chunkSize, fid);
|
||||
if (feof(fid) || ferror(fid)) {
|
||||
free(data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return dch.chunkSize;
|
||||
}
|
||||
|
||||
int getFormatChunk(FILE *fid, FormatChunk *formatChunk) {
|
||||
|
||||
while (strncmp(formatChunk->chunkID, FORMATID, 4) != 0) {
|
||||
fread(formatChunk, sizeof(FormatChunk), 1, fid);
|
||||
if (feof(fid) || ferror(fid))
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
PaStreamParameters outputParameters;
|
||||
PaStream *stream;
|
||||
PaError err;
|
||||
/*int i;
|
||||
int totalFrames;
|
||||
int numSamples;
|
||||
int numBytes;
|
||||
*/
|
||||
|
||||
/* read wave file */
|
||||
char *filename;
|
||||
FILE *fid;
|
||||
|
||||
if (argc < 2) {
|
||||
printf("Usage: %s filename.wav\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* filename */
|
||||
filename = argv[1];
|
||||
printf("Filename: %s\n", filename);
|
||||
|
||||
/* open file */
|
||||
fid = fopen(filename, "rb");
|
||||
if (fid == NULL) {
|
||||
printf("Could not open file %s\n", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* check header */
|
||||
if (checkHeader(fid) < 0) {
|
||||
printf("Not a wave file!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
FormatChunk formatChunk;
|
||||
int data_size;
|
||||
char *data;
|
||||
|
||||
if (getFormatChunk(fid, &formatChunk) < 0) {
|
||||
printf("Couldn't read header\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Chunk Size : %d\n", formatChunk.chunkSize);
|
||||
printf("Compressed : %d\n", formatChunk.wFormatTag != 1);
|
||||
printf("Channels : %d\n", formatChunk.wChannels);
|
||||
printf("SamplesPerSecond : %d\n", formatChunk.dwSamplesPerSec);
|
||||
printf("dwAvgBytesPerSec : %d\n", formatChunk.dwAvgBytesPerSec);
|
||||
printf("wBlockAlign : %d\n", formatChunk.wBlockAlign);
|
||||
printf("wBitsPerSample : %d\n", formatChunk.wBitsPerSample);
|
||||
|
||||
if ((data_size = getData(fid, &data)) < 0) {
|
||||
printf("Couldn't read data\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int total_frames = data_size / formatChunk.wBlockAlign;
|
||||
|
||||
printf("Total Frames : %d\n", total_frames);
|
||||
/* fclose(fid); */
|
||||
|
||||
|
||||
err = Pa_Initialize();
|
||||
if( err != paNoError ) goto error;
|
||||
|
||||
/* Playback recorded data. -------------------------------------------- */
|
||||
|
||||
outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */
|
||||
|
||||
outputParameters.channelCount = formatChunk.wChannels;
|
||||
outputParameters.sampleFormat = paInt16;
|
||||
|
||||
outputParameters.suggestedLatency = Pa_GetDeviceInfo( outputParameters.device )->defaultLowOutputLatency;
|
||||
|
||||
printf("YO YO\n"); fflush(stdout);
|
||||
outputParameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
printf("Begin playback.\n"); fflush(stdout);
|
||||
err = Pa_OpenStream(
|
||||
&stream,
|
||||
NULL, /* no input */
|
||||
&outputParameters,
|
||||
formatChunk.dwSamplesPerSec,
|
||||
0, /*FRAMES_PER_BUFFER, */
|
||||
paClipOff, /* we won't output out of range samples so don't bother clipping them */
|
||||
NULL, /* no callback, use blocking API */
|
||||
NULL ); /* no callback, so no callback userData */
|
||||
if( err != paNoError ) goto error;
|
||||
|
||||
if( stream )
|
||||
{
|
||||
err = Pa_StartStream( stream );
|
||||
if( err != paNoError ) goto error;
|
||||
printf("Waiting for playback to finish.\n"); fflush(stdout);
|
||||
|
||||
err = Pa_WriteStream( stream, data, total_frames );
|
||||
if( err != paNoError ) goto error;
|
||||
|
||||
err = Pa_CloseStream( stream );
|
||||
if( err != paNoError ) goto error;
|
||||
printf("Done.\n"); fflush(stdout);
|
||||
}
|
||||
free( data );
|
||||
|
||||
Pa_Terminate();
|
||||
return 0;
|
||||
|
||||
error:
|
||||
Pa_Terminate();
|
||||
fprintf( stderr, "An error occured while using the portaudio stream\n" );
|
||||
fprintf( stderr, "Error number: %d\n", err );
|
||||
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
"""
|
||||
PyAudio Example: Low Level C Module test.
|
||||
|
||||
Play a wave file.
|
||||
"""
|
||||
|
||||
import _portaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
def get_format_from_width(width, unsigned = True):
|
||||
"""
|
||||
Returns a PortAudio format constant for
|
||||
the specified `width`.
|
||||
|
||||
:param `width`:
|
||||
The desired sample width in bytes (1, 2, 3, or 4)
|
||||
:param `unsigned`:
|
||||
For 1 byte width, specifies signed or unsigned
|
||||
format.
|
||||
|
||||
:raises ValueError: for invalid `width`
|
||||
:rtype: `PaSampleFormat`
|
||||
|
||||
"""
|
||||
p = _portaudio
|
||||
|
||||
if width == 1:
|
||||
if unsigned:
|
||||
return p.paUInt8
|
||||
else:
|
||||
return p.paInt8
|
||||
elif width == 2:
|
||||
return p.paInt16
|
||||
elif width == 3:
|
||||
return p.paInt24
|
||||
elif width == 4:
|
||||
return p.paFloat32
|
||||
else:
|
||||
raise ValueError, "Invalid width: %d" % width
|
||||
|
||||
|
||||
chunk = 1024
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0]
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
||||
|
||||
|
||||
print "* initializing"
|
||||
_portaudio.initialize()
|
||||
|
||||
print "* opening"
|
||||
stream = _portaudio.open(rate = wf.getframerate(),
|
||||
channels = wf.getnchannels(),
|
||||
format = get_format_from_width(wf.getsampwidth()),
|
||||
output = True)
|
||||
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
print "* starting stream"
|
||||
_portaudio.start_stream(stream)
|
||||
|
||||
print "available: %d" % _portaudio.get_stream_write_available(stream)
|
||||
|
||||
while data != '':
|
||||
_portaudio.write_stream(stream, data, chunk)
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
print "* stopping stream"
|
||||
_portaudio.stop_stream(stream)
|
||||
|
||||
print "* closing stream"
|
||||
_portaudio.close(stream)
|
||||
|
||||
# always match an initialize() call with a terminate()
|
||||
_portaudio.terminate()
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
PyAudio Example: Low Level C Module test.
|
||||
|
||||
Record a few seconds of audio and save to a WAVE file.
|
||||
"""
|
||||
|
||||
import _portaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
|
||||
FORMAT = _portaudio.paInt16
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
WAVE_OUTPUT_FILENAME = "output.wav"
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
print "* initializing"
|
||||
_portaudio.initialize()
|
||||
|
||||
print "* opening"
|
||||
stream = _portaudio.open(format = FORMAT,
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* starting stream"
|
||||
_portaudio.start_stream(stream)
|
||||
|
||||
print "* recording"
|
||||
all = []
|
||||
|
||||
for i in range(0, 44100 / chunk * RECORD_SECONDS):
|
||||
data = _portaudio.read_stream(stream, chunk)
|
||||
all.append(data)
|
||||
|
||||
print "* stopping stream"
|
||||
_portaudio.stop_stream(stream)
|
||||
|
||||
print "* closing stream"
|
||||
_portaudio.close(stream)
|
||||
|
||||
# match all initialize() with terminate() calls
|
||||
_portaudio.terminate()
|
||||
|
||||
# write data to WAVE file
|
||||
data = ''.join(all)
|
||||
|
||||
wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
|
||||
wf.setnchannels(CHANNELS)
|
||||
wf.setsampwidth(_portaudio.get_sample_size(FORMAT))
|
||||
wf.setframerate(RATE)
|
||||
wf.writeframes(data)
|
||||
wf.close()
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
"""
|
||||
PyAudio Example: Low Level C Module test.
|
||||
|
||||
Display detected Host APIs and Devices.
|
||||
"""
|
||||
|
||||
import _portaudio as p
|
||||
|
||||
p.initialize()
|
||||
max_apis = p.get_host_api_count()
|
||||
max_devs = p.get_device_count()
|
||||
|
||||
print "\nPortAudio System Info:\n======================"
|
||||
print "Version: %d" % p.get_version()
|
||||
print "Version Text: %s" % p.get_version_text()
|
||||
print "Number of Host APIs: %d" % max_apis
|
||||
print "Number of Devices : %d" % max_devs
|
||||
|
||||
print "\nHost APIs:\n=========="
|
||||
|
||||
for i in range(max_apis):
|
||||
apiinfo = p.get_host_api_info(i)
|
||||
print "Number : ", i
|
||||
print "Name : ", apiinfo.name
|
||||
print "Type : ", apiinfo.type
|
||||
print "Devices : ", apiinfo.deviceCount
|
||||
print "defaultInputDevice : ", apiinfo.defaultInputDevice
|
||||
print "defaultOutputDevice : ", apiinfo.defaultOutputDevice
|
||||
print "--------------------------"
|
||||
|
||||
print "\nDevices:\n========"
|
||||
|
||||
for i in range(max_devs):
|
||||
devinfo = p.get_device_info(i)
|
||||
print "Number : ", i
|
||||
print "Name : ", devinfo.name
|
||||
print "hostApi Index : ", devinfo.hostApi
|
||||
print "maxInputChannels : ", devinfo.maxInputChannels
|
||||
print "maxOutputChannels : ", devinfo.maxOutputChannels
|
||||
print "defaultLowInputLatency : ", devinfo.defaultLowInputLatency
|
||||
print "defaultLowOutputLatency : ", devinfo.defaultLowOutputLatency
|
||||
print "defaultHighInputLatency : ", devinfo.defaultHighInputLatency
|
||||
print "defaultHighOutputLatency : ", devinfo.defaultHighOutputLatency
|
||||
print "defaultSampleRate : ", devinfo.defaultSampleRate
|
||||
print "--------------------------------"
|
||||
|
||||
print "\nDefault Devices:\n================"
|
||||
try:
|
||||
print "Input :", p.get_default_input_device()
|
||||
except IOError, e:
|
||||
print "No Input devices."
|
||||
|
||||
try:
|
||||
print "Output :", p.get_default_output_device()
|
||||
except IOError, e:
|
||||
print "No Output devices."
|
||||
|
||||
p.terminate()
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
"""
|
||||
PyAudio Example: Low Level C Module test.
|
||||
|
||||
Make a wire between input and output
|
||||
(i.e., record a few samples and play them back immediately).
|
||||
|
||||
Full Duplex version. See wire2.py for Half Duplex.
|
||||
"""
|
||||
|
||||
import _portaudio
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
FORMAT = _portaudio.paInt16
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
# poor PPC macs...
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
print "* initializing"
|
||||
_portaudio.initialize()
|
||||
|
||||
print "* opening"
|
||||
stream = _portaudio.open(format = FORMAT,
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
output = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* starting stream"
|
||||
_portaudio.start_stream(stream)
|
||||
|
||||
print "* recording"
|
||||
|
||||
for i in range(0, 44100 / chunk * RECORD_SECONDS):
|
||||
data = _portaudio.read_stream(stream, chunk)
|
||||
_portaudio.write_stream(stream, data, chunk)
|
||||
|
||||
print "* stopping stream"
|
||||
_portaudio.stop_stream(stream)
|
||||
|
||||
print "* closing stream"
|
||||
_portaudio.close(stream)
|
||||
|
||||
# match all initialize() with terminate() calls
|
||||
_portaudio.terminate()
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
PyAudio Example: Low Level C Module test.
|
||||
|
||||
Make a wire between input and output
|
||||
(i.e., record a few samples and play them back immediately).
|
||||
|
||||
Full Duplex version. See wire2.py for Half Duplex.
|
||||
"""
|
||||
|
||||
import _portaudio
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
FORMAT = _portaudio.paInt16
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
# poor PPC macs...
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
print "* initializing"
|
||||
_portaudio.initialize()
|
||||
|
||||
print "* opening"
|
||||
stream_input = _portaudio.open(format = FORMAT,
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
stream_output = _portaudio.open(format = FORMAT,
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
output = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* starting stream"
|
||||
_portaudio.start_stream(stream_input)
|
||||
_portaudio.start_stream(stream_output)
|
||||
|
||||
print "* recording"
|
||||
|
||||
for i in range(0, 44100 / chunk * RECORD_SECONDS):
|
||||
data = _portaudio.read_stream(stream_input, chunk)
|
||||
_portaudio.write_stream(stream_output, data, chunk)
|
||||
|
||||
print "* stopping stream"
|
||||
_portaudio.stop_stream(stream_input)
|
||||
_portaudio.stop_stream(stream_output)
|
||||
|
||||
print "* closing stream"
|
||||
_portaudio.close(stream_input)
|
||||
_portaudio.close(stream_output)
|
||||
|
||||
# match initialize() with terminate() calls
|
||||
_portaudio.terminate()
|
||||
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
""" PyAudio Example: Play a wave file """
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
|
||||
PyAudio = pyaudio.PyAudio
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0]
|
||||
sys.exit(-1)
|
||||
|
||||
wf = wave.open(sys.argv[1], 'rb')
|
||||
|
||||
p = PyAudio()
|
||||
|
||||
# open stream
|
||||
stream = p.open(format =
|
||||
p.get_format_from_width(wf.getsampwidth()),
|
||||
channels = wf.getnchannels(),
|
||||
rate = wf.getframerate(),
|
||||
output = True)
|
||||
|
||||
# read data
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
# play stream
|
||||
while data != '':
|
||||
stream.write(data)
|
||||
data = wf.readframes(chunk)
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
|
||||
p.terminate()
|
||||
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
"""
|
||||
PyAudio example:
|
||||
Record a few seconds of audio and save to a WAVE file.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
import wave
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
FORMAT = pyaudio.paInt16
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
WAVE_OUTPUT_FILENAME = "output.wav"
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
stream = p.open(format = FORMAT,
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* recording"
|
||||
all = []
|
||||
|
||||
for i in range(0, RATE / chunk * RECORD_SECONDS):
|
||||
data = stream.read(chunk)
|
||||
all.append(data)
|
||||
|
||||
print "* done recording"
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
p.terminate()
|
||||
|
||||
# write data to WAVE file
|
||||
data = ''.join(all)
|
||||
wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
|
||||
wf.setnchannels(CHANNELS)
|
||||
wf.setsampwidth(p.get_sample_size(FORMAT))
|
||||
wf.setframerate(RATE)
|
||||
wf.writeframes(data)
|
||||
wf.close()
|
|
@ -1,129 +0,0 @@
|
|||
"""
|
||||
PyAudio Example:
|
||||
|
||||
Query and print PortAudio HostAPIs, Devices, and their
|
||||
support rates.
|
||||
"""
|
||||
|
||||
import pyaudio
|
||||
|
||||
standard_sample_rates = [8000.0, 9600.0, 11025.0, 12000.0,
|
||||
16000.0, 22050.0, 24000.0, 32000.0,
|
||||
44100.0, 48000.0, 88200.0, 96000.0,
|
||||
192000.0]
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
max_apis = p.get_host_api_count()
|
||||
max_devs = p.get_device_count()
|
||||
|
||||
print "\nPortAudio System Info:\n======================"
|
||||
print "Version: %d" % pyaudio.get_portaudio_version()
|
||||
print "Version Text: %s" % pyaudio.get_portaudio_version_text()
|
||||
print "Number of Host APIs: %d" % max_apis
|
||||
print "Number of Devices : %d" % max_devs
|
||||
|
||||
print "\nHost APIs:\n=========="
|
||||
|
||||
for i in range(max_apis):
|
||||
apiinfo = p.get_host_api_info_by_index(i)
|
||||
for k in apiinfo.items():
|
||||
print "%s: %s" % k
|
||||
print "--------------------------"
|
||||
|
||||
print "\nDevices:\n========"
|
||||
|
||||
for i in range(max_devs):
|
||||
devinfo = p.get_device_info_by_index(i)
|
||||
|
||||
# print out device parameters
|
||||
for k in devinfo.items():
|
||||
name, value = k
|
||||
|
||||
# if host API, then get friendly name
|
||||
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
print "\t%s: %s" % (name, value)
|
||||
|
||||
# print out supported format rates
|
||||
|
||||
input_supported_rates = []
|
||||
output_supported_rates = []
|
||||
full_duplex_rates = []
|
||||
|
||||
for f in standard_sample_rates:
|
||||
|
||||
if devinfo['maxInputChannels'] > 0:
|
||||
if p.is_format_supported(f,
|
||||
input_device =
|
||||
devinfo['index'],
|
||||
input_channels =
|
||||
devinfo['maxInputChannels'],
|
||||
input_format = pyaudio.paInt16):
|
||||
input_supported_rates.append(f)
|
||||
|
||||
if devinfo['maxOutputChannels'] > 0:
|
||||
if p.is_format_supported(f,
|
||||
output_device =
|
||||
devinfo['index'],
|
||||
output_channels =
|
||||
devinfo['maxOutputChannels'],
|
||||
output_format = pyaudio.paInt16):
|
||||
output_supported_rates.append(f)
|
||||
|
||||
if (devinfo['maxInputChannels'] > 0) and \
|
||||
(devinfo['maxOutputChannels'] > 0):
|
||||
if p.is_format_supported(f,
|
||||
input_device =
|
||||
devinfo['index'],
|
||||
input_channels =
|
||||
devinfo['maxInputChannels'],
|
||||
input_format = pyaudio.paInt16,
|
||||
output_device =
|
||||
devinfo['index'],
|
||||
output_channels =
|
||||
devinfo['maxOutputChannels'],
|
||||
output_format = pyaudio.paInt16):
|
||||
full_duplex_rates.append(f)
|
||||
|
||||
if len(input_supported_rates):
|
||||
print "\tInput rates:", input_supported_rates
|
||||
if len(output_supported_rates):
|
||||
print "\tOutput rates:", output_supported_rates
|
||||
if len(full_duplex_rates):
|
||||
print "\tFull duplex: ", full_duplex_rates
|
||||
|
||||
print "\t--------------------------------"
|
||||
|
||||
print "\nDefault Devices:\n================"
|
||||
try:
|
||||
def_index = p.get_default_input_device_info()['index']
|
||||
print "Default Input Device :", def_index
|
||||
devinfo = p.get_device_info_by_index(def_index)
|
||||
for k in devinfo.items():
|
||||
name, value = k
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
print "\t%s: %s" % (name, value)
|
||||
print "\t--------------------------------"
|
||||
except IOError, e:
|
||||
print "No Input devices: %s" % e[0]
|
||||
|
||||
try:
|
||||
def_index = p.get_default_output_device_info()['index']
|
||||
print "Default Output Device:", def_index
|
||||
devinfo = p.get_device_info_by_index(def_index)
|
||||
for k in devinfo.items():
|
||||
name, value = k
|
||||
if name == 'hostApi':
|
||||
value = str(value) + \
|
||||
" (%s)" % p.get_host_api_info_by_index(k[1])['name']
|
||||
print "\t%s: %s" % (name, value)
|
||||
print "\t--------------------------------"
|
||||
except IOError, e:
|
||||
print "No Output devices: %s" % e[0]
|
||||
|
||||
p.terminate()
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
"""
|
||||
PyAudio Example:
|
||||
|
||||
Make a wire between input and output (i.e., record a few samples
|
||||
and play them back immediately).
|
||||
|
||||
Full Duplex version; see wire2.py for Half Duplex. """
|
||||
|
||||
import pyaudio
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
WIDTH = 2
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
stream = p.open(format =
|
||||
p.get_format_from_width(WIDTH),
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
output = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* recording"
|
||||
for i in range(0, 44100 / chunk * RECORD_SECONDS):
|
||||
data = stream.read(chunk)
|
||||
stream.write(data, chunk)
|
||||
print "* done"
|
||||
|
||||
stream.stop_stream()
|
||||
stream.close()
|
||||
p.terminate()
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
"""
|
||||
PyAudio Example:
|
||||
|
||||
Make a wire between input and output (i.e., record a few samples
|
||||
and play them back immediately).
|
||||
|
||||
Half Duplex version; see wire.py for Full Duplex. """
|
||||
|
||||
import pyaudio
|
||||
import sys
|
||||
|
||||
chunk = 1024
|
||||
WIDTH = 2
|
||||
CHANNELS = 2
|
||||
RATE = 44100
|
||||
RECORD_SECONDS = 5
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
CHANNELS = 1
|
||||
|
||||
p = pyaudio.PyAudio()
|
||||
|
||||
# use default input device
|
||||
stream_input = p.open(format =
|
||||
p.get_format_from_width(WIDTH),
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
input = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
# use default output device
|
||||
stream_output = p.open(format =
|
||||
p.get_format_from_width(WIDTH),
|
||||
channels = CHANNELS,
|
||||
rate = RATE,
|
||||
output = True,
|
||||
frames_per_buffer = chunk)
|
||||
|
||||
print "* recording"
|
||||
for i in range(0, 44100 / chunk * RECORD_SECONDS):
|
||||
data = stream_input.read(chunk)
|
||||
stream_output.write(data, chunk)
|
||||
print "* done"
|
||||
|
||||
stream_input.stop_stream()
|
||||
stream_output.stop_stream()
|
||||
stream_input.close()
|
||||
stream_output.close()
|
||||
p.terminate()
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
"""
|
||||
PyAudio v0.2.11: Python Bindings for PortAudio.
|
||||
|
||||
Copyright (c) 2006 Hubert Pham
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY
|
||||
OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
try:
|
||||
from setuptools import setup, Extension
|
||||
except ImportError:
|
||||
from distutils.core import setup, Extension
|
||||
|
||||
__version__ = "0.2.12"
|
||||
|
||||
# distutils will try to locate and link dynamically against portaudio.
|
||||
#
|
||||
# If you would rather statically link in the portaudio library (e.g.,
|
||||
# typically on Microsoft Windows), run:
|
||||
#
|
||||
# % python setup.py build --static-link
|
||||
#
|
||||
# Specify the environment variable PORTAUDIO_PATH with the build tree
|
||||
# of PortAudio.
|
||||
|
||||
STATIC_LINKING = False
|
||||
|
||||
if "--static-link" in sys.argv:
|
||||
STATIC_LINKING = True
|
||||
sys.argv.remove("--static-link")
|
||||
|
||||
portaudio_path = os.environ.get("PORTAUDIO_PATH", "./portaudio-v19")
|
||||
mac_sysroot_path = os.environ.get("SYSROOT_PATH", None)
|
||||
|
||||
pyaudio_module_sources = ['src/_portaudiomodule.c']
|
||||
include_dirs = []
|
||||
external_libraries = []
|
||||
extra_compile_args = []
|
||||
extra_link_args = []
|
||||
scripts = []
|
||||
defines = []
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
defines += [('MACOSX', '1')]
|
||||
if mac_sysroot_path:
|
||||
extra_compile_args += ["-isysroot", mac_sysroot_path]
|
||||
extra_link_args += ["-isysroot", mac_sysroot_path]
|
||||
elif sys.platform == 'win32':
|
||||
bits = platform.architecture()[0]
|
||||
if '64' in bits:
|
||||
defines.append(('MS_WIN64', '1'))
|
||||
|
||||
if not STATIC_LINKING:
|
||||
external_libraries = ['portaudio']
|
||||
extra_link_args = []
|
||||
else:
|
||||
include_dirs = [os.path.join(portaudio_path, 'include/')]
|
||||
extra_link_args = [
|
||||
os.path.join(portaudio_path, 'lib/.libs/libportaudio.a')
|
||||
]
|
||||
|
||||
# platform specific configuration
|
||||
if sys.platform == 'darwin':
|
||||
extra_link_args += ['-framework', 'CoreAudio',
|
||||
'-framework', 'AudioToolbox',
|
||||
'-framework', 'AudioUnit',
|
||||
'-framework', 'Carbon']
|
||||
elif sys.platform == 'cygwin':
|
||||
external_libraries += ['winmm']
|
||||
extra_link_args += ['-lwinmm']
|
||||
elif sys.platform == 'win32':
|
||||
# i.e., Win32 Python with mingw32
|
||||
# run: python setup.py build -cmingw32
|
||||
external_libraries += ['winmm']
|
||||
extra_link_args += ['-lwinmm']
|
||||
elif sys.platform == 'linux2':
|
||||
extra_link_args += ['-lrt', '-lm', '-lpthread']
|
||||
# GNU/Linux has several audio systems (backends) available; be
|
||||
# sure to specify the desired ones here. Start with ALSA and
|
||||
# JACK, since that's common today.
|
||||
extra_link_args += ['-lasound', '-ljack']
|
||||
|
||||
setup(name='PyAudio',
|
||||
version=__version__,
|
||||
author="Hubert Pham",
|
||||
url="http://people.csail.mit.edu/hubert/pyaudio/",
|
||||
description='PortAudio Python Bindings',
|
||||
long_description=__doc__.lstrip(),
|
||||
scripts=scripts,
|
||||
py_modules=['pyaudio'],
|
||||
package_dir={'': 'src'},
|
||||
ext_modules=[
|
||||
Extension('_portaudio',
|
||||
sources=pyaudio_module_sources,
|
||||
include_dirs=include_dirs,
|
||||
define_macros=defines,
|
||||
libraries=external_libraries,
|
||||
extra_compile_args=extra_compile_args,
|
||||
extra_link_args=extra_link_args)
|
||||
])
|
|
@ -0,0 +1,252 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# PyAudio documentation build configuration file, created by
|
||||
# sphinx-quickstart on Wed Aug 29 08:37:41 2012.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.autodoc']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'PyAudio'
|
||||
copyright = '2006, Hubert Pham'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.2.11'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.2.11'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'nature'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
"nosidebar": True
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
#html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'PyAudiodoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'PyAudio.tex', 'PyAudio Documentation',
|
||||
'Hubert Pham', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'pyaudio', 'PyAudio Documentation',
|
||||
['Hubert Pham'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'PyAudio', 'PyAudio Documentation',
|
||||
'Hubert Pham', 'PyAudio', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
try:
|
||||
from _portaudio import paMacCoreStreamInfo
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
tags.add('pamac')
|
|
@ -0,0 +1,50 @@
|
|||
Example: Blocking Mode Audio I/O
|
||||
--------------------------------
|
||||
|
||||
.. literalinclude:: ../examples/play_wave.py
|
||||
|
||||
To use PyAudio, first instantiate PyAudio using
|
||||
:py:func:`pyaudio.PyAudio` (1), which sets up the portaudio system.
|
||||
|
||||
To record or play audio, open a stream on the desired device with the
|
||||
desired audio parameters using :py:func:`pyaudio.PyAudio.open`
|
||||
(2). This sets up a :py:class:`pyaudio.Stream` to play or record
|
||||
audio.
|
||||
|
||||
Play audio by writing audio data to the stream using
|
||||
:py:func:`pyaudio.Stream.write`, or read audio data from the stream
|
||||
using :py:func:`pyaudio.Stream.read`. (3)
|
||||
|
||||
Note that in "blocking mode", each :py:func:`pyaudio.Stream.write` or
|
||||
:py:func:`pyaudio.Stream.read` blocks until all the given/requested
|
||||
frames have been played/recorded. Alternatively, to generate audio
|
||||
data on the fly or immediately process recorded audio data, use the
|
||||
"callback mode" outlined below.
|
||||
|
||||
Use :py:func:`pyaudio.Stream.stop_stream` to pause playing/recording,
|
||||
and :py:func:`pyaudio.Stream.close` to terminate the stream. (4)
|
||||
|
||||
Finally, terminate the portaudio session using
|
||||
:py:func:`pyaudio.PyAudio.terminate` (5)
|
||||
|
||||
Example: Callback Mode Audio I/O
|
||||
--------------------------------
|
||||
|
||||
.. literalinclude:: ../examples/play_wave_callback.py
|
||||
|
||||
In callback mode, PyAudio will call a specified callback function (2)
|
||||
whenever it needs new audio data (to play) and/or when there is new
|
||||
(recorded) audio data available. Note that PyAudio calls the callback
|
||||
function in a separate thread. The function has the following
|
||||
signature ``callback(<input_data>, <frame_count>, <time_info>,
|
||||
<status_flag>)`` and must return a tuple containing ``frame_count``
|
||||
frames of audio data and a flag signifying whether there are more
|
||||
frames to play/record.
|
||||
|
||||
Start processing the audio stream using
|
||||
:py:func:`pyaudio.Stream.start_stream` (4), which will call the
|
||||
callback function repeatedly until that function returns
|
||||
:py:data:`pyaudio.paComplete`.
|
||||
|
||||
To keep the stream active, the main thread must not terminate, e.g.,
|
||||
by sleeping (5).
|
|
@ -0,0 +1,52 @@
|
|||
PyAudio Documentation
|
||||
=====================
|
||||
|
||||
.. contents::
|
||||
|
||||
------------
|
||||
Introduction
|
||||
------------
|
||||
|
||||
.. automodule:: pyaudio
|
||||
:members:
|
||||
:special-members:
|
||||
:exclude-members: PyAudio, Stream, PaMacCoreStreamInfo
|
||||
|
||||
Details
|
||||
-------
|
||||
|
||||
-------------
|
||||
Class PyAudio
|
||||
-------------
|
||||
|
||||
.. autoclass:: pyaudio.PyAudio
|
||||
:members:
|
||||
:special-members:
|
||||
|
||||
------------
|
||||
Class Stream
|
||||
------------
|
||||
|
||||
.. autoclass:: pyaudio.Stream
|
||||
:members:
|
||||
:special-members:
|
||||
|
||||
-----------------
|
||||
Platform Specific
|
||||
-----------------
|
||||
|
||||
.. only:: pamac
|
||||
|
||||
Class PaMacCoreStreamInfo
|
||||
-------------------------
|
||||
|
||||
.. autoclass:: pyaudio.PaMacCoreStreamInfo
|
||||
:members:
|
||||
:special-members:
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
File diff suppressed because it is too large
Load Diff
|
@ -1,37 +1,34 @@
|
|||
/*
|
||||
pyAudio : Python Bindings for PortAudio.
|
||||
|
||||
pyAudio : API Header File
|
||||
|
||||
Copyright (c) 2006 Hubert Pham
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Revision: 6 $ */
|
||||
/**
|
||||
* PyAudio : Python Bindings for PortAudio.
|
||||
*
|
||||
* PyAudio : API Header File
|
||||
*
|
||||
* Copyright (c) 2006 Hubert Pham
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use, copy,
|
||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
* of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __PAMODULE_H__
|
||||
#define __PAMODULE_H__
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* version */
|
||||
static PyObject *
|
||||
pa_get_version(PyObject *self, PyObject *args);
|
||||
|
@ -40,36 +37,36 @@ static PyObject *
|
|||
pa_get_version_text(PyObject *self, PyObject *args);
|
||||
|
||||
/* framework init */
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_initialize(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
pa_terminate(PyObject *self, PyObject *args);
|
||||
|
||||
/* host api */
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_host_api_count(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_default_host_api(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_host_api_type_id_to_host_api_index(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_host_api_device_index_to_device_index(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
pa_get_host_api_info(PyObject *self, PyObject *args);
|
||||
|
||||
/* device api */
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_device_count(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_default_input_device(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_default_output_device(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
|
@ -77,13 +74,13 @@ pa_get_device_info(PyObject *self, PyObject *args);
|
|||
|
||||
/* stream open/close */
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_open(PyObject *self, PyObject *args, PyObject *kwargs);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_close(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_sample_size(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
|
@ -92,13 +89,13 @@ pa_is_format_supported(PyObject *self, PyObject *args,
|
|||
|
||||
/* stream start/stop/info */
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_start_stream(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_stop_stream(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_abort_stream(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
|
@ -115,16 +112,16 @@ pa_get_stream_cpu_load(PyObject *self, PyObject *args);
|
|||
|
||||
/* stream write/read */
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_write_stream(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_read_stream(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_stream_write_available(PyObject *self, PyObject *args);
|
||||
|
||||
static PyObject *
|
||||
static PyObject *
|
||||
pa_get_stream_read_available(PyObject *self, PyObject *args);
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,120 @@
|
|||
import sys
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import pyaudio
|
||||
|
||||
class PyAudioErrorTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.p = pyaudio.PyAudio()
|
||||
|
||||
def tearDown(self):
|
||||
self.p.terminate()
|
||||
|
||||
def test_invalid_sample_size(self):
|
||||
with self.assertRaises(ValueError):
|
||||
self.p.get_sample_size(10)
|
||||
|
||||
def test_invalid_width(self):
|
||||
with self.assertRaises(ValueError):
|
||||
self.p.get_format_from_width(8)
|
||||
|
||||
def test_invalid_device(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.p.get_host_api_info_by_type(-1)
|
||||
|
||||
def test_invalid_hostapi(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.p.get_host_api_info_by_index(-1)
|
||||
|
||||
def test_invalid_host_api_devinfo(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.p.get_device_info_by_host_api_device_index(0, -1)
|
||||
|
||||
with self.assertRaises(IOError):
|
||||
self.p.get_device_info_by_host_api_device_index(-1, 0)
|
||||
|
||||
def test_invalid_device_devinfo(self):
|
||||
with self.assertRaises(IOError):
|
||||
self.p.get_device_info_by_index(-1)
|
||||
|
||||
def test_error_without_stream_start(self):
|
||||
with self.assertRaises(IOError):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
input=True,
|
||||
start=False) # not starting stream
|
||||
stream.read(2)
|
||||
|
||||
def test_error_writing_to_readonly_stream(self):
|
||||
with self.assertRaises(IOError):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
input=True)
|
||||
stream.write('foo')
|
||||
|
||||
def test_error_negative_frames(self):
|
||||
with self.assertRaises(ValueError):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
input=True)
|
||||
stream.read(-1)
|
||||
|
||||
def test_invalid_attr_on_closed_stream(self):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
input=True)
|
||||
stream.close()
|
||||
with self.assertRaises(IOError):
|
||||
stream.get_input_latency()
|
||||
with self.assertRaises(IOError):
|
||||
stream.read(1)
|
||||
|
||||
def test_invalid_format_supported(self):
|
||||
with self.assertRaises(ValueError):
|
||||
self.p.is_format_supported(8000, -1, 1, pyaudio.paInt16)
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
self.p.is_format_supported(8000, 0, -1, pyaudio.paInt16)
|
||||
|
||||
def test_write_underflow_exception(self):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
output=True)
|
||||
time.sleep(0.5)
|
||||
stream.write('\x00\x00\x00\x00', exception_on_underflow=False)
|
||||
|
||||
# It's difficult to invoke an underflow on ALSA, so skip.
|
||||
if sys.platform in ('linux', 'linux2'):
|
||||
return
|
||||
|
||||
with self.assertRaises(IOError) as err:
|
||||
time.sleep(0.5)
|
||||
stream.write('\x00\x00\x00\x00', exception_on_underflow=True)
|
||||
|
||||
self.assertEqual(err.exception.errno, pyaudio.paOutputUnderflowed)
|
||||
self.assertEqual(err.exception.strerror, 'Output underflowed')
|
||||
|
||||
def test_read_overflow_exception(self):
|
||||
stream = self.p.open(channels=1,
|
||||
rate=44100,
|
||||
format=pyaudio.paInt16,
|
||||
input=True)
|
||||
time.sleep(0.5)
|
||||
stream.read(2, exception_on_overflow=False)
|
||||
|
||||
# It's difficult to invoke an underflow on ALSA, so skip.
|
||||
if sys.platform in ('linux', 'linux2'):
|
||||
return
|
||||
|
||||
with self.assertRaises(IOError) as err:
|
||||
time.sleep(0.5)
|
||||
stream.read(2, exception_on_overflow=True)
|
||||
|
||||
self.assertEqual(err.exception.errno, pyaudio.paInputOverflowed)
|
||||
self.assertEqual(err.exception.strerror, 'Input overflowed')
|
|
@ -0,0 +1,642 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Automated unit tests for testing audio playback and capture.
|
||||
|
||||
These tests require an OS loopback sound device that forwards audio
|
||||
output, generated by PyAudio for playback, and forwards it to an input
|
||||
device, which PyAudio can record and verify against a test signal.
|
||||
|
||||
On Mac OS X, Soundflower can create such a device.
|
||||
|
||||
On GNU/Linux, the snd-aloop kernel module provides a loopback ALSA
|
||||
device. Use examples/system_info.py to identify the name of the loopback
|
||||
device.
|
||||
"""
|
||||
|
||||
import math
|
||||
import struct
|
||||
import time
|
||||
import unittest
|
||||
import wave
|
||||
import sys
|
||||
|
||||
import numpy
|
||||
|
||||
import pyaudio
|
||||
|
||||
DUMP_CAPTURE=False
|
||||
|
||||
class PyAudioTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.p = pyaudio.PyAudio()
|
||||
(self.loopback_input_idx,
|
||||
self.loopback_output_idx) = self.get_audio_loopback()
|
||||
assert (self.loopback_input_idx is None
|
||||
or self.loopback_input_idx >= 0), "No loopback device found"
|
||||
assert (self.loopback_output_idx is None
|
||||
or self.loopback_output_idx >= 0), "No loopback device found"
|
||||
|
||||
def tearDown(self):
|
||||
self.p.terminate()
|
||||
|
||||
def get_audio_loopback(self):
|
||||
if sys.platform == 'darwin':
|
||||
return self._find_audio_loopback(
|
||||
'Soundflower (2ch)', 'Soundflower (2ch)')
|
||||
if sys.platform in ('linux', 'linux2'):
|
||||
return self._find_audio_loopback(
|
||||
'Loopback: PCM (hw:1,0)', 'Loopback: PCM (hw:1,1)')
|
||||
if sys.platform == 'win32':
|
||||
# Assumes running in a VM, in which the hypervisor can
|
||||
# set up a loopback device to back the "default" audio devices.
|
||||
# Here, None indicates default device.
|
||||
return None, None
|
||||
|
||||
return -1, -1
|
||||
|
||||
def _find_audio_loopback(self, indev, outdev):
|
||||
"""Utility to find audio loopback device."""
|
||||
input_idx, output_idx = -1, -1
|
||||
for device_idx in range(self.p.get_device_count()):
|
||||
devinfo = self.p.get_device_info_by_index(device_idx)
|
||||
if (outdev == devinfo.get('name') and
|
||||
devinfo.get('maxOutputChannels', 0) > 0):
|
||||
output_idx = device_idx
|
||||
|
||||
if (indev == devinfo.get('name') and
|
||||
devinfo.get('maxInputChannels', 0) > 0):
|
||||
input_idx = device_idx
|
||||
|
||||
if output_idx > -1 and input_idx > -1:
|
||||
break
|
||||
|
||||
return input_idx, output_idx
|
||||
|
||||
def test_system_info(self):
|
||||
"""Basic system info tests"""
|
||||
self.assertTrue(self.p.get_host_api_count() > 0)
|
||||
self.assertTrue(self.p.get_device_count() > 0)
|
||||
api_info = self.p.get_host_api_info_by_index(0)
|
||||
self.assertTrue(len(api_info.items()) > 0)
|
||||
|
||||
def test_input_output_blocking(self):
|
||||
"""Test blocking-based record and playback."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
# Blocking-mode might add some initial choppiness on some
|
||||
# platforms/loopback devices, so set a longer duration.
|
||||
duration = 3 # seconds
|
||||
frames_per_chunk = 1024
|
||||
|
||||
freqs = [130.81, 329.63, 440.0, 466.16, 587.33, 739.99]
|
||||
test_signal = self.create_reference_signal(freqs, rate, width, duration)
|
||||
audio_chunks = self.signal_to_chunks(
|
||||
test_signal, frames_per_chunk, channels)
|
||||
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx)
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx)
|
||||
|
||||
captured = []
|
||||
for chunk in audio_chunks:
|
||||
out_stream.write(chunk)
|
||||
captured.append(in_stream.read(frames_per_chunk))
|
||||
# Capture a few more frames, since there is some lag.
|
||||
for i in range(8):
|
||||
captured.append(in_stream.read(frames_per_chunk))
|
||||
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
if DUMP_CAPTURE:
|
||||
self.write_wav('test_blocking.wav', b''.join(captured),
|
||||
width, channels, rate)
|
||||
|
||||
captured_signal = self.pcm16_to_numpy(b''.join(captured))
|
||||
captured_left_channel = captured_signal[::2]
|
||||
captured_right_channel = captured_signal[1::2]
|
||||
|
||||
self.assert_pcm16_spectrum_nearly_equal(
|
||||
rate,
|
||||
captured_left_channel,
|
||||
test_signal,
|
||||
len(freqs))
|
||||
self.assert_pcm16_spectrum_nearly_equal(
|
||||
rate,
|
||||
captured_right_channel,
|
||||
test_signal,
|
||||
len(freqs))
|
||||
|
||||
def test_input_output_callback(self):
|
||||
"""Test callback-based record and playback."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
duration = 1 # second
|
||||
frames_per_chunk = 1024
|
||||
|
||||
freqs = [130.81, 329.63, 440.0, 466.16, 587.33, 739.99]
|
||||
test_signal = self.create_reference_signal(freqs, rate, width, duration)
|
||||
audio_chunks = self.signal_to_chunks(
|
||||
test_signal, frames_per_chunk, channels)
|
||||
|
||||
state = {'count': 0}
|
||||
def out_callback(_, frame_count, time_info, status):
|
||||
if state['count'] >= len(audio_chunks):
|
||||
return ('', pyaudio.paComplete)
|
||||
rval = (audio_chunks[state['count']], pyaudio.paContinue)
|
||||
state['count'] += 1
|
||||
return rval
|
||||
|
||||
captured = []
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
captured.append(in_data)
|
||||
return (None, pyaudio.paContinue)
|
||||
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
|
||||
in_stream.start_stream()
|
||||
out_stream.start_stream()
|
||||
time.sleep(duration + 1)
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
if DUMP_CAPTURE:
|
||||
self.write_wav('test_callback.wav', b''.join(captured),
|
||||
width, channels, rate)
|
||||
|
||||
captured_signal = self.pcm16_to_numpy(b''.join(captured))
|
||||
captured_left_channel = captured_signal[::2]
|
||||
captured_right_channel = captured_signal[1::2]
|
||||
|
||||
self.assert_pcm16_spectrum_nearly_equal(
|
||||
rate,
|
||||
captured_left_channel,
|
||||
test_signal,
|
||||
len(freqs))
|
||||
self.assert_pcm16_spectrum_nearly_equal(
|
||||
rate,
|
||||
captured_right_channel,
|
||||
test_signal,
|
||||
len(freqs))
|
||||
|
||||
def test_device_lock_gil_order(self):
|
||||
"""Ensure no deadlock between Pa_{Open,Start,Stop}Stream and GIL."""
|
||||
# This test targets OSX/macOS CoreAudio, which seems to use
|
||||
# audio device locks. On ALSA and Win32 MME, this problem
|
||||
# doesn't seem to appear despite not releasing the GIL when
|
||||
# calling into PortAudio.
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(_, frame_count, time_info, status):
|
||||
return ('', pyaudio.paComplete)
|
||||
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
in_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Opening a stream and starting it MUST
|
||||
# release the GIL before attempting to acquire the device
|
||||
# lock. Otherwise, the following code will wait for the device
|
||||
# lock (while holding the GIL), while the in_callback thread
|
||||
# will be waiting for the GIL once time.sleep completes (while
|
||||
# holding the device lock), leading to deadlock.
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
out_stream.start_stream()
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
def test_stream_state_gil(self):
|
||||
"""Ensure no deadlock between Pa_IsStream{Active,Stopped} and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(_, frame_count, time_info, status):
|
||||
return ('', pyaudio.paComplete)
|
||||
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
in_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Checking the state of the stream MUST
|
||||
# not require the device lock, but if it does, it must release the GIL
|
||||
# before attempting to acquire the device
|
||||
# lock. Otherwise, the following code will wait for the device
|
||||
# lock (while holding the GIL), while the in_callback thread
|
||||
# will be waiting for the GIL once time.sleep completes (while
|
||||
# holding the device lock), leading to deadlock.
|
||||
self.assertTrue(in_stream.is_active())
|
||||
self.assertFalse(in_stream.is_stopped())
|
||||
|
||||
self.assertTrue(out_stream.is_stopped())
|
||||
self.assertFalse(out_stream.is_active())
|
||||
out_stream.start_stream()
|
||||
self.assertFalse(out_stream.is_stopped())
|
||||
self.assertTrue(out_stream.is_active())
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
def test_get_stream_time_gil(self):
|
||||
"""Ensure no deadlock between PA_GetStreamTime and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(_, frame_count, time_info, status):
|
||||
return ('', pyaudio.paComplete)
|
||||
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
in_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Getting the stream time MUST not
|
||||
# require the device lock, but if it does, it must release the
|
||||
# GIL before attempting to acquire the device lock. Otherwise,
|
||||
# the following code will wait for the device lock (while
|
||||
# holding the GIL), while the in_callback thread will be
|
||||
# waiting for the GIL once time.sleep completes (while holding
|
||||
# the device lock), leading to deadlock.
|
||||
self.assertGreater(in_stream.get_time(), -1)
|
||||
self.assertGreater(out_stream.get_time(), 1)
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
def test_get_stream_cpuload_gil(self):
|
||||
"""Ensure no deadlock between Pa_GetStreamCpuLoad and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(_, frame_count, time_info, status):
|
||||
return ('', pyaudio.paComplete)
|
||||
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
in_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Getting the stream cpuload MUST not
|
||||
# require the device lock, but if it does, it must release the
|
||||
# GIL before attempting to acquire the device lock. Otherwise,
|
||||
# the following code will wait for the device lock (while
|
||||
# holding the GIL), while the in_callback thread will be
|
||||
# waiting for the GIL once time.sleep completes (while holding
|
||||
# the device lock), leading to deadlock.
|
||||
self.assertGreater(in_stream.get_cpu_load(), -1)
|
||||
self.assertGreater(out_stream.get_cpu_load(), -1)
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
out_stream.stop_stream()
|
||||
|
||||
def test_get_stream_write_available_gil(self):
|
||||
"""Ensure no deadlock between Pa_GetStreamWriteAvailable and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def in_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx,
|
||||
stream_callback=in_callback)
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
in_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Getting the stream write available MUST not
|
||||
# require the device lock, but if it does, it must release the
|
||||
# GIL before attempting to acquire the device lock. Otherwise,
|
||||
# the following code will wait for the device lock (while
|
||||
# holding the GIL), while the in_callback thread will be
|
||||
# waiting for the GIL once time.sleep completes (while holding
|
||||
# the device lock), leading to deadlock.
|
||||
self.assertGreater(out_stream.get_write_available(), -1)
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
|
||||
def test_get_stream_read_available_gil(self):
|
||||
"""Ensure no deadlock between Pa_GetStreamReadAvailable and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
in_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
input=True,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
input_device_index=self.loopback_input_idx)
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
out_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Getting the stream read available MUST not
|
||||
# require the device lock, but if it does, it must release the
|
||||
# GIL before attempting to acquire the device lock. Otherwise,
|
||||
# the following code will wait for the device lock (while
|
||||
# holding the GIL), while the in_callback thread will be
|
||||
# waiting for the GIL once time.sleep completes (while holding
|
||||
# the device lock), leading to deadlock.
|
||||
self.assertGreater(in_stream.get_read_available(), -1)
|
||||
|
||||
time.sleep(0.1)
|
||||
in_stream.stop_stream()
|
||||
|
||||
def test_terminate_gil(self):
|
||||
"""Ensure no deadlock between Pa_Terminate and GIL."""
|
||||
rate = 44100 # frames per second
|
||||
width = 2 # bytes per sample
|
||||
channels = 2
|
||||
frames_per_chunk = 1024
|
||||
|
||||
def out_callback(in_data, frame_count, time_info, status):
|
||||
# Release the GIL for a bit
|
||||
time.sleep(2)
|
||||
return (None, pyaudio.paComplete)
|
||||
|
||||
out_stream = self.p.open(
|
||||
format=self.p.get_format_from_width(width),
|
||||
channels=channels,
|
||||
rate=rate,
|
||||
output=True,
|
||||
start=False,
|
||||
frames_per_buffer=frames_per_chunk,
|
||||
output_device_index=self.loopback_output_idx,
|
||||
stream_callback=out_callback)
|
||||
# In a separate (C) thread, portaudio/driver will grab the device lock,
|
||||
# then the GIL to call in_callback.
|
||||
out_stream.start_stream()
|
||||
# Wait a bit to let that callback thread start.
|
||||
time.sleep(1)
|
||||
# in_callback will eventually drop the GIL when executing
|
||||
# time.sleep (while retaining the device lock), allowing the
|
||||
# following code to run. Terminating PyAudio MUST not
|
||||
# require the device lock, but if it does, it must release the
|
||||
# GIL before attempting to acquire the device lock. Otherwise,
|
||||
# the following code will wait for the device lock (while
|
||||
# holding the GIL), while the in_callback thread will be
|
||||
# waiting for the GIL once time.sleep completes (while holding
|
||||
# the device lock), leading to deadlock.
|
||||
self.p.terminate()
|
||||
|
||||
@staticmethod
|
||||
def create_reference_signal(freqs, sampling_rate, width, duration):
|
||||
"""Return reference signal with several sinuoids with frequencies
|
||||
specified by freqs."""
|
||||
total_frames = int(sampling_rate * duration)
|
||||
max_amp = float(2**(width * 8 - 1) - 1)
|
||||
avg_amp = max_amp / len(freqs)
|
||||
return [
|
||||
int(sum(avg_amp * math.sin(2*math.pi*freq*(k/float(sampling_rate)))
|
||||
for freq in freqs))
|
||||
for k in range(total_frames)]
|
||||
|
||||
@staticmethod
|
||||
def signal_to_chunks(frame_data, frames_per_chunk, channels):
|
||||
"""Given an array of values comprising the signal, return an iterable
|
||||
of binary chunks, with each chunk containing frames_per_chunk
|
||||
frames. Each frame represents a single value from the signal,
|
||||
duplicated for each channel specified by channels.
|
||||
"""
|
||||
frames = [struct.pack('h', x) * channels for x in frame_data]
|
||||
# Chop up frames into chunks
|
||||
return [b''.join(chunk_frames) for chunk_frames in
|
||||
tuple(frames[i:i+frames_per_chunk]
|
||||
for i in range(0, len(frames), frames_per_chunk))]
|
||||
|
||||
@staticmethod
|
||||
def pcm16_to_numpy(bytestring):
|
||||
"""From PCM 16-bit bytes, return an equivalent numpy array of values."""
|
||||
return struct.unpack('%dh' % (len(bytestring) / 2), bytestring)
|
||||
|
||||
@staticmethod
|
||||
def write_wav(filename, data, width, channels, rate):
|
||||
"""Write PCM data to wave file."""
|
||||
wf = wave.open(filename, 'wb')
|
||||
wf.setnchannels(channels)
|
||||
wf.setsampwidth(width)
|
||||
wf.setframerate(rate)
|
||||
wf.writeframes(data)
|
||||
wf.close()
|
||||
|
||||
def assert_pcm16_spectrum_nearly_equal(self, sampling_rate, cap, ref,
|
||||
num_freq_peaks_expected):
|
||||
"""Compares the discrete fourier transform of a captured signal
|
||||
against the reference signal and ensures that the frequency peaks
|
||||
match."""
|
||||
# When passing a reference signal through the loopback device,
|
||||
# the captured signal may include additional noise, as well as
|
||||
# time lag, so testing that the captured signal is "similar
|
||||
# enough" to the reference using bit-wise equality won't work
|
||||
# well. Instead, the approach here a) assumes the reference
|
||||
# signal is a sum of sinusoids and b) computes the discrete
|
||||
# fourier transform of the reference and captured signals, and
|
||||
# ensures that the frequencies of the top
|
||||
# num_freq_peaks_expected frequency peaks are close.
|
||||
cap_fft = numpy.absolute(numpy.fft.rfft(cap))
|
||||
ref_fft = numpy.absolute(numpy.fft.rfft(ref))
|
||||
# Find the indices of the peaks:
|
||||
cap_peak_indices = sorted(numpy.argpartition(
|
||||
cap_fft, -num_freq_peaks_expected)[-num_freq_peaks_expected:])
|
||||
ref_peak_indices = sorted(numpy.argpartition(
|
||||
ref_fft, -num_freq_peaks_expected)[-num_freq_peaks_expected:])
|
||||
# Ensure that the corresponding frequencies of the peaks are close:
|
||||
for cap_freq_index, ref_freq_index in zip(cap_peak_indices,
|
||||
ref_peak_indices):
|
||||
cap_freq = cap_freq_index / float(len(cap)) * (sampling_rate / 2)
|
||||
ref_freq = ref_freq_index / float(len(ref)) * (sampling_rate / 2)
|
||||
diff = abs(cap_freq - ref_freq)
|
||||
self.assertLess(diff, 1.0)
|
||||
|
||||
# As an additional test, verify that the spectrum (not just
|
||||
# the peaks) of the reference and captured signal are similar
|
||||
# by computing the cross-correlation of the spectra. Assuming they
|
||||
# are nearly identical, the cross-correlation should contain a large
|
||||
# peak when the spectra overlap and mostly 0s elsewhere. Verify that
|
||||
# using a histogram of the cross-correlation:
|
||||
freq_corr_hist, _ = numpy.histogram(
|
||||
numpy.correlate(cap_fft, ref_fft, mode='full'),
|
||||
bins=10)
|
||||
self.assertLess(sum(freq_corr_hist[2:])/sum(freq_corr_hist), 1e-2)
|
Loading…
Reference in New Issue