File tree 1 file changed +3
-8
lines changed
adafruit_circuitplayground
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -577,7 +577,7 @@ def _generate_sample(self, length=100):
577
577
self ._sample = audioio .AudioOut (board .SPEAKER )
578
578
self ._sine_wave_sample = audioio .RawSample (self ._sine_wave )
579
579
else :
580
- self . _sample = audioio . AudioOut ( board . SPEAKER , self . _sine_wave )
580
+ raise NotImplementedError ( "Please use CircuitPython 3.0 or higher." )
581
581
582
582
583
583
def play_tone (self , frequency , duration ):
@@ -633,9 +633,7 @@ def start_tone(self, frequency):
633
633
if not self ._sample .playing :
634
634
self ._sample .play (self ._sine_wave_sample , loop = True )
635
635
else :
636
- self ._sample .frequency = int (len (self ._sine_wave ) * frequency )
637
- if not self ._sample .playing :
638
- self ._sample .play (loop = True )
636
+ raise NotImplementedError ("Please use CircuitPython 3.0 or higher." )
639
637
640
638
def stop_tone (self ):
641
639
""" Use with start_tone to stop the tone produced.
@@ -690,10 +688,7 @@ def play_file(self, file_name):
690
688
while audio .playing :
691
689
pass
692
690
else :
693
- with audioio .AudioOut (board .SPEAKER , open (file_name , "rb" )) as audio :
694
- audio .play ()
695
- while audio .playing :
696
- pass
691
+ raise NotImplementedError ("Please use CircuitPython 3.0 or higher." )
697
692
self ._speaker_enable .value = False
698
693
699
694
You can’t perform that action at this time.
0 commit comments