diff --git a/OpenRA.FileFormats/Graphics/VqaReader.cs b/OpenRA.FileFormats/Graphics/VqaReader.cs index ec66fbdcfc..d401ba236e 100644 --- a/OpenRA.FileFormats/Graphics/VqaReader.cs +++ b/OpenRA.FileFormats/Graphics/VqaReader.cs @@ -122,7 +122,8 @@ namespace OpenRA.FileFormats { var ms = new MemoryStream(); var adpcmIndex = 0; - + + bool compressed = false; for (var i = 0; i < Frames; i++) { stream.Seek(offsets[i], SeekOrigin.Begin); @@ -136,9 +137,11 @@ namespace OpenRA.FileFormats switch (type) { - case "SND2": - var rawAudio = reader.ReadBytes((int)length); - ms.Write(rawAudio); + case "SND0": + case "SND2": + var rawAudio = reader.ReadBytes((int)length); + ms.Write(rawAudio); + compressed = (type == "SND2"); break; default: reader.ReadBytes((int)length); @@ -149,7 +152,7 @@ namespace OpenRA.FileFormats } } - audioData = AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex); + audioData = (compressed) ? AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex) : ms.ToArray(); } public void AdvanceFrame() @@ -175,6 +178,7 @@ namespace OpenRA.FileFormats switch(type) { + case "SND0": case "SND2": // Don't parse sound here. reader.ReadBytes((int)length); diff --git a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs index 41a1eb3299..75b53738d6 100644 --- a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs @@ -20,7 +20,7 @@ namespace OpenRA.Widgets.Delegates bg.GetWidget("BUTTON_PLAY").OnMouseUp = mi => { var foo = Widget.RootWidget.GetWidget("VIDEOPLAYER"); - foo.Load("ally10.vqa"); + foo.Load("ally1.vqa"); foo.Play(); /* if (Sound.MusicStopped)