Skip to content

Commit 030b8a8

Browse files
authored
update for 5.0.0
1 parent a40ca86 commit 030b8a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

adafruit_rtttl.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
import audioio
4141
from adafruit_waveform import sine
4242
AUDIOIO_AVAILABLE = True
43+
try:
44+
import audiocore
45+
except ImportError:
46+
audiocore = audioio
4347
except ImportError:
4448
pass
4549

@@ -133,7 +137,7 @@ def _play_to_pin(tune, base_tone, min_freq, duration, octave, tempo):
133137
if sys.implementation.version[0] >= 3:
134138
pitch = int(PIANO[piano_note])
135139
sine_wave = sine.sine_wave(16000, pitch)
136-
sine_wave_sample = audioio.RawSample(sine_wave)
140+
sine_wave_sample = audiocore.RawSample(sine_wave)
137141
base_tone.play(sine_wave_sample, loop=True)
138142
else:
139143
base_tone.frequency = int(

0 commit comments

Comments
 (0)