public static Music LoadMusic(string filePath) { double fps = SdlDotNet.Core.Events.TargetFps; string ext = System.IO.Path.GetExtension(filePath); switch (ext) { case ".mid": { SMF.SMFMusic music = new SMF.SMFMusic(); music.Load(filePath); return(music); } case ".mml": { MML.MMLMusic music = new MML.MMLMusic(); music.Load(filePath); return(music); } default: return(null); } }
public static Music LoadMusic(string filePath) { double fps = SdlDotNet.Core.Events.TargetFps; string ext = System.IO.Path.GetExtension(filePath); switch (ext) { case ".mid": { SMF.SMFMusic music = new SMF.SMFMusic(); music.Load(filePath); return music; } case ".mml": { MML.MMLMusic music = new MML.MMLMusic(); music.Load(filePath); return music; } default: return null; } }