Home | Trees | Index | Help |
|
---|
Module pyaudio :: Class Stream |
|
PortAudio Stream Wrapper. Use PyAudio.open
to make a new
Stream
.
Method Summary | |
---|---|
Opening and Closing | |
Initialize a stream; this should be called by PyAudio.open . | |
Close the stream | |
Stream Info | |
float |
Return the input latency. |
float |
Return the input latency. |
float |
Return stream time. |
float |
Return the CPU load. |
Stream Management | |
Start the stream. | |
Stop the stream. | |
bool |
Returns whether the stream is active. |
bool |
Returns whether the stream is stopped. |
Input Output | |
|
Write samples to the stream. |
str |
Read samples from the stream. |
int |
Return the number of frames that can be read without waiting. |
int |
Return the number of frames that can be written without waiting. |
Method Details |
---|
__init__(self,
PA_manager,
rate,
channels,
format,
input=False,
output=False,
input_device_index=None,
output_device_index=None,
frames_per_buffer=1024,
start=True)
|
close(self)Close the stream |
get_input_latency(self)Return the input latency.
|
get_output_latency(self)Return the input latency.
|
get_time(self)Return stream time.
|
get_cpu_load(self)Return the CPU load. (Note: this is always 0.0 for the blocking API.)
|
start_stream(self)Start the stream. |
stop_stream(self)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. |
is_active(self)Returns whether the stream is active.
|
is_stopped(self)Returns whether the stream is stopped.
|
write(self, frames, num_frames=None, exception_on_underflow=False)Write samples to the stream.
|
read(self, num_frames)Read samples from the stream.
|
get_read_available(self)Return the number of frames that can be read without waiting.
|
get_write_available(self)Return the number of frames that can be written without waiting.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu May 25 13:09:00 2006 | http://epydoc.sf.net |