adafruit / Adafruit_CircuitPython_CircuitPlayground

CircuitPython library for Circuit Playground Express
MIT License
91 stars 71 forks source link

adding support for mp3 files to play_file method. #94

Closed FoamyGuy closed 4 years ago

FoamyGuy commented 4 years ago

Also raise a ValueError if the file supplied is not .wav or .mp3

Example usage:

# wav still supported
cp.play_file("electrons.wav")
# mp3 also supported now
cp.play_file("test.mp3")

Tested on Circuit Playground Bluefruit only at this time.

FoamyGuy commented 4 years ago

Since the CPX does not have audiomp3 I am now thinking that circuit_playground_base.py is not the correct place for this. It should be in the bluefruit module since it only works on that device at the moment.

I am going to close this and start with a fresh copy. I'll submit a new PR once it's moved over and working properly.

jepler commented 4 years ago

Thanks for working on it, and feel free to tag me when you're ready with the revised PR! :label: