forked from auracaster/pyalsaaudio
add xrun handling to the examples
it's very primitive, but it shows adequately what can happen and what to do about it minimally (that is, complain and move on).
This commit is contained in:
+2
-1
@@ -47,7 +47,8 @@ if __name__ == '__main__':
|
||||
# Read data from stdin
|
||||
data = f.read(320)
|
||||
while data:
|
||||
out.write(data)
|
||||
if out.write(data) < 0:
|
||||
print("Playback buffer underrun! Continuing nonetheless ...")
|
||||
data = f.read(320)
|
||||
out.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user