Skip to content

Commit

Permalink
Support new audiocore+audioio modules
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hexthat authored and deshipu committed Jul 30, 2019
1 parent 6d1ae72 commit 0b8e6b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
import array
import digitalio
import audiocore
import audioio
import _stage

Expand Down Expand Up @@ -163,7 +164,7 @@ def play(self, audio_file, loop=False):
played in the background.
"""
self.stop()
wave = audioio.WaveFile(audio_file)
wave = audiocore.WaveFile(audio_file)
self.audio.play(wave, loop=loop)

def stop(self):
Expand Down

0 comments on commit 0b8e6b0

Please sign in to comment.