Skip to content

Commit a7f8965

Browse files
committed
Lang - ensure sample loader finds mp3 files too
1 parent a3bdf9b commit a7f8965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/server/ruby/lib/sonicpi/sample_loader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ def ls_samples(path, recursive=false)
157157
@folder_contents_mutex.synchronize do
158158
res = @cached_folder_contents[path]
159159
return res if res
160-
# match wav, aiff, aif, wave, flac, ogg and oga files
161-
pattern = '*.{[wW][aA][vV],[wW][aA][vV][eE],[aA][iI][fF],[aA][iI][fF][fF],[fF][lL][aA][cC],[oO][gG][gGaA]}'
160+
# match wav, aiff, aif, wave, flac, mp3, ogg and oga files
161+
pattern = '*.{[wW][aA][vV],[wW][aA][vV][eE],[aA][iI][fF],[aA][iI][fF][fF],[fF][lL][aA][cC],[mM][pP]3},[oO][gG][gGaA]'
162162
if recursive
163163
res = Dir.chdir(path) { Dir.glob("**/#{pattern}").map { |p| File.expand_path(p) } }.sort
164164
else

0 commit comments

Comments
 (0)