I've loaded a small, mono, 16-bit, 44.1kHz audio file into flash in UFlow 2.0. It plays fine within UFlow. No matter what I do, I get an ENOENT error trying to read the file.
Traceback (most recent call last):
File "<stdin>", line 26, in <module>
File "<stdin>", line 18, in loop
OSError: [Errno 2] ENOENT
a snippet of the code from the Python side of things:
def setup():
global rgb
M5.begin()
Widgets.setRotation(1)
Widgets.fillScreen(0x222222)
rgb = RGB()
Speaker.begin()
Speaker.setVolumePercentage(0.5)
def loop():
global rgb
M5.update()
Speaker.playWavFile('/flash/res/audio/test1.wav')
if Speaker.isPlaying():
rgb.fill_color(0xffffff)
time.sleep(2)
No code I've downloaded from other people works either! I can play tones out of the speaker, I can read images out of flash. I cannot read audio files out of flash.