Particle1904/CSharpSoundboard

Audioservice ignores wav-files

Closed this issue · 1 comments

I don't know if you care, and this is a minor thing, but the Audioservice class only searches for mp3-files.

I fixed that by replacing this line

string[] soundFiles = Directory.GetFiles(inputFolderPath, "*.mp3");

by

string[] soundFiles = new []{"*.mp3", "*.wav"}.SelectMany(e => Directory.GetFiles(inputFolderPath, e)).ToArray();

Oh yeah, it was intentional since all the audio files I usually have are edited so they end up being .mp3's.
Feel free to make a PR if you want.