We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c74c4a commit 4aed81aCopy full SHA for 4aed81a
1 file changed
Minesweep/code.py
@@ -18,6 +18,11 @@
18
import digitalio
19
import displayio
20
import audioio
21
+try:
22
+ from audiocore import WaveFile
23
+except ImportError:
24
+ from audioio import WaveFile
25
+
26
import adafruit_imageload
27
import adafruit_touchscreen
28
@@ -216,7 +221,7 @@ def reset_board():
216
221
def play_sound(file_name):
217
222
board.DISPLAY.wait_for_frame()
218
223
wavfile = open(file_name, "rb")
219
- wavedata = audioio.WaveFile(wavfile)
224
+ wavedata = WaveFile(wavfile)
220
225
speaker_enable.value = True
226
audio.play(wavedata)
227
return wavfile
0 commit comments