summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst4
-rwxr-xr-xexamples/spectrogram.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/README.rst b/README.rst
index e76b7b4..e81acc0 100644
--- a/README.rst
+++ b/README.rst
@@ -235,7 +235,7 @@ Callback "wire" with `sounddevice.Stream`:
def callback(indata, outdata, frames, time, status):
if status:
- print(status)
+ print(status, flush=True)
outdata[:] = indata
with sd.Stream(channels=2, callback=callback):
@@ -250,7 +250,7 @@ Same thing with `sounddevice.RawStream`:
def callback(indata, outdata, frames, time, status):
if status:
- print(status)
+ print(status, flush=True)
outdata[:] = indata
with sd.RawStream(channels=2, dtype='int24', callback=callback):
diff --git a/examples/spectrogram.py b/examples/spectrogram.py
index 00f3c88..b4fbba4 100755
--- a/examples/spectrogram.py
+++ b/examples/spectrogram.py
@@ -85,7 +85,7 @@ try:
args.gain /= 2
else:
print('\x1b[31;40m', usage_line.center(args.columns, '#'),
- '\x1b[0m', sep='')
+ '\x1b[0m', sep='', flush=True)
break
if statuses:
logging.warning(str(statuses))