Gus
Gus

Reputation: 4505

PyAudio raise exception on buffer under/overflow

PyAudio is based on PortAudio. Is there anyway to detect a buffer under/overflow for writing/reading from an audio stream in PyAudio?

Upvotes: 2

Views: 1708

Answers (1)

user871465
user871465

Reputation: 36

According to the documentation you can raise an exception on underflow when doing a write on a Stream class:

Stream.write(self, frames, num_frames=None, exception_on_underflow=True)

Upvotes: 2

Related Questions