最終更新:2021-04-12 (月) 14:26:14 (1103d)  

pyaudio.Stream.write
Top / pyaudio.Stream.write

Write samples to the stream. Do not call when using non-blocking mode.

write(frames, num_frames=None, exception_on_underflow=False)¶

Parameters:

  • frames – The frames of data.
  • num_frames – The number of frames to write. Defaults to None, in which this value will be automatically computed.
  • exception_on_underflow – Specifies whether an IOError exception should be thrown (or silently ignored) on buffer underflow. Defaults to False for improved performance, especially on slower platforms.

Raises:

  • IOError – if the stream is not an output stream or if the write operation was unsuccessful.

Return type:

データ