Skip to content

Commit 0b8e6b0

Browse files
hexthatdeshipu
authored andcommitted
Support new audiocore+audioio modules
In CircuitPython 4.1.x the audiio module got split into audioio and audiocore modules, so now we need to import both to support sound.
1 parent 6d1ae72 commit 0b8e6b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
import array
33
import digitalio
4+
import audiocore
45
import audioio
56
import _stage
67

@@ -163,7 +164,7 @@ def play(self, audio_file, loop=False):
163164
played in the background.
164165
"""
165166
self.stop()
166-
wave = audioio.WaveFile(audio_file)
167+
wave = audiocore.WaveFile(audio_file)
167168
self.audio.play(wave, loop=loop)
168169

169170
def stop(self):

0 commit comments

Comments
 (0)