private (string Filename, Func <Stream, ISound> Decoder) GetDecoder(string name, IFileAccessor accessor) { var file = accessor.GetFileNameByExtension(name, Extensions.Keys); if (file == null) { return(name, null); //throw new RhythmCodexException($"Unable to find a decoder for {name}."); } return(file.Filename, Extensions[file.Extension]); }