summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/rec_unlimited.py2
-rwxr-xr-xexamples/wire.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/rec_unlimited.py b/examples/rec_unlimited.py
index b8f448f..262ed40 100755
--- a/examples/rec_unlimited.py
+++ b/examples/rec_unlimited.py
@@ -38,6 +38,8 @@ args = parser.parse_args()
try:
import sounddevice as sd
import soundfile as sf
+ import numpy # Make sure NumPy is loaded before it is used in the callback
+ assert numpy # avoid "imported but unused" message (W0611)
if args.list_devices:
print(sd.query_devices())
diff --git a/examples/wire.py b/examples/wire.py
index 744d725..32d6ebe 100755
--- a/examples/wire.py
+++ b/examples/wire.py
@@ -31,6 +31,8 @@ args = parser.parse_args()
try:
import sounddevice as sd
+ import numpy # Make sure NumPy is loaded before it is used in the callback
+ assert numpy # avoid "imported but unused" message (W0611)
def callback(indata, outdata, frames, time, status):
if status: