Add support for other media formats besides ogg.
This commit is contained in:
@@ -156,7 +156,7 @@ namespace Cryville.Crtr.Browsing {
|
||||
var tres = (SongResource)res;
|
||||
var dir = new DirectoryInfo(_rootPath + "/songs/" + res.Name);
|
||||
if (!dir.Exists) dir.Create();
|
||||
var dest = new FileInfo(_rootPath + "/songs/" + res.Name + "/.ogg");
|
||||
var dest = new FileInfo(_rootPath + "/songs/" + res.Name + "/" + tres.Source.Extension);
|
||||
if (!dest.Exists) tres.Source.CopyTo(dest.FullName);
|
||||
}
|
||||
}
|
||||
|
@@ -37,9 +37,9 @@ namespace Cryville.Crtr {
|
||||
else if (ev.Unstamped == null) { }
|
||||
else if (ev.Unstamped is Chart.Sound) {
|
||||
Chart.Sound tev = (Chart.Sound)ev.Unstamped;
|
||||
var source = new LibavFileAudioSource(
|
||||
Game.GameDataPath + "/songs/" + tev.id + "/.ogg"
|
||||
);
|
||||
var dir = new DirectoryInfo(Game.GameDataPath + "/songs/" + tev.id);
|
||||
var files = dir.GetFiles();
|
||||
var source = new LibavFileAudioSource(files[0].FullName);
|
||||
source.SelectStream();
|
||||
sounds.Add(source);
|
||||
Game.AudioSession.Sequence(
|
||||
|
Reference in New Issue
Block a user