Skip to content

Commit f53287d

Browse files
authored
Merge pull request #82 from fede2cr/master
Fixing error, WaveFile moved to audiocore
2 parents 5df5d04 + 8799411 commit f53287d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

adafruit_pyportal.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import displayio
6060
from adafruit_display_text.label import Label
6161
import audioio
62+
import audiocore
6263
import rtc
6364
import supervisor
6465
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
@@ -129,7 +130,7 @@ class PyPortal:
129130
:param default_bg: The path to your default background image file or a hex color.
130131
Defaults to 0x000000.
131132
:param status_neopixel: The pin for the status NeoPixel. Use ``board.NEOPIXEL`` for the on-board
132-
NeoPixel. Defaults to ``None``, no status LED
133+
NeoPixel. Defaults to ``None``, not the status LED
133134
:param str text_font: The path to your font file for your data text display.
134135
:param text_position: The position of your extracted text on the display in an (x, y) tuple.
135136
Can be a list of tuples for when there's a list of json_paths, for example
@@ -628,7 +629,7 @@ def play_file(self, file_name, wait_to_finish=True):
628629
629630
"""
630631
wavfile = open(file_name, "rb")
631-
wavedata = audioio.WaveFile(wavfile)
632+
wavedata = audiocore.WaveFile(wavfile)
632633
self._speaker_enable.value = True
633634
self.audio.play(wavedata)
634635
if not wait_to_finish:

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"supervisor",
2727
"pulseio",
2828
"audioio",
29+
"audiocore",
2930
"displayio",
3031
"neopixel",
3132
"microcontroller",

0 commit comments

Comments
 (0)