diff --git a/OpenRA.Mods.Common/AudioLoaders/WavLoader.cs b/OpenRA.Mods.Common/AudioLoaders/WavLoader.cs index c9c5df9cfe..c1d593e3d8 100644 --- a/OpenRA.Mods.Common/AudioLoaders/WavLoader.cs +++ b/OpenRA.Mods.Common/AudioLoaders/WavLoader.cs @@ -11,6 +11,7 @@ using System; using System.IO; +using OpenRA.Mods.Common.FileFormats; namespace OpenRA.Mods.Common.AudioLoaders { @@ -220,7 +221,7 @@ namespace OpenRA.Mods.Common.AudioLoaders { // Decode 4 bytes (to 16 bytes of output) per channel var chunk = s.ReadBytes(4); - var decoded = ImaAdpcmLoader.LoadImaAdpcmSound(chunk, ref index[c], ref predictor[c]); + var decoded = ImaAdpcmReader.LoadImaAdpcmSound(chunk, ref index[c], ref predictor[c]); // Interleave output, one sample per channel var outOffsetChannel = outOffset + (2 * c); diff --git a/OpenRA.Mods.Common/AudioLoaders/ImaAdpcmLoader.cs b/OpenRA.Mods.Common/FileFormats/ImaAdpcmReader.cs similarity index 92% rename from OpenRA.Mods.Common/AudioLoaders/ImaAdpcmLoader.cs rename to OpenRA.Mods.Common/FileFormats/ImaAdpcmReader.cs index 0aa47be2cf..7fb8c0a6a2 100644 --- a/OpenRA.Mods.Common/AudioLoaders/ImaAdpcmLoader.cs +++ b/OpenRA.Mods.Common/FileFormats/ImaAdpcmReader.cs @@ -11,7 +11,7 @@ using System.IO; -namespace OpenRA.Mods.Common.AudioLoaders +namespace OpenRA.Mods.Common.FileFormats { struct ImaAdpcmChunk { @@ -29,7 +29,9 @@ namespace OpenRA.Mods.Common.AudioLoaders } } - public static class ImaAdpcmLoader + // Mostly a duplicate of AudReader, with some difference when loading + // TODO: Investigate whether they can be fused to get rid of some duplication + public class ImaAdpcmReader { static readonly int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 }; static readonly int[] StepTable = diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index eb41d49bb9..335e4c4e9f 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -147,7 +147,6 @@ - @@ -729,6 +728,7 @@ +