Skip to content
Snippets Groups Projects
Commit 11d822a6 authored by toerb's avatar toerb Committed by schneider
Browse files

enable sound filenames starting with /flash or /sd

parent feaf6d62
No related branches found
No related tags found
1 merge request!167enable sound filenames starting with /flash or /sd
Pipeline #6934 passed
......@@ -105,7 +105,9 @@ class sampler(_Patch):
def __init__(self, chan, filename):
super().__init__(chan)
if filename.startswith("/"):
if filename.startswith("/flash/") or filename.startswith("/sd/"):
f = wave.open(filename, "r")
elif filename.startswith("/"):
f = wave.open("/flash/" + filename, "r")
else:
f = wave.open("/flash/sys/samples/" + filename, "r")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment