Rename ImaAdpcmLoader to *Reader and move it to FileFormats
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using OpenRA.Mods.Common.FileFormats;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.AudioLoaders
|
namespace OpenRA.Mods.Common.AudioLoaders
|
||||||
{
|
{
|
||||||
@@ -220,7 +221,7 @@ namespace OpenRA.Mods.Common.AudioLoaders
|
|||||||
{
|
{
|
||||||
// Decode 4 bytes (to 16 bytes of output) per channel
|
// Decode 4 bytes (to 16 bytes of output) per channel
|
||||||
var chunk = s.ReadBytes(4);
|
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
|
// Interleave output, one sample per channel
|
||||||
var outOffsetChannel = outOffset + (2 * c);
|
var outOffsetChannel = outOffset + (2 * c);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.AudioLoaders
|
namespace OpenRA.Mods.Common.FileFormats
|
||||||
{
|
{
|
||||||
struct ImaAdpcmChunk
|
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[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
|
||||||
static readonly int[] StepTable =
|
static readonly int[] StepTable =
|
||||||
@@ -147,7 +147,6 @@
|
|||||||
<Compile Include="AI\States\StateBase.cs" />
|
<Compile Include="AI\States\StateBase.cs" />
|
||||||
<Compile Include="AI\SupportPowerDecision.cs" />
|
<Compile Include="AI\SupportPowerDecision.cs" />
|
||||||
<Compile Include="AudioLoaders\AudLoader.cs" />
|
<Compile Include="AudioLoaders\AudLoader.cs" />
|
||||||
<Compile Include="AudioLoaders\ImaAdpcmLoader.cs" />
|
|
||||||
<Compile Include="AudioLoaders\VocLoader.cs" />
|
<Compile Include="AudioLoaders\VocLoader.cs" />
|
||||||
<Compile Include="AudioLoaders\WavLoader.cs" />
|
<Compile Include="AudioLoaders\WavLoader.cs" />
|
||||||
<Compile Include="Effects\Beacon.cs" />
|
<Compile Include="Effects\Beacon.cs" />
|
||||||
@@ -729,6 +728,7 @@
|
|||||||
<Compile Include="Graphics\DetectionCircleRenderable.cs" />
|
<Compile Include="Graphics\DetectionCircleRenderable.cs" />
|
||||||
<Compile Include="Traits\Render\WithIdleAnimation.cs" />
|
<Compile Include="Traits\Render\WithIdleAnimation.cs" />
|
||||||
<Compile Include="FileFormats\AudReader.cs" />
|
<Compile Include="FileFormats\AudReader.cs" />
|
||||||
|
<Compile Include="FileFormats\ImaAdpcmReader.cs" />
|
||||||
<Compile Include="FileFormats\VqaReader.cs" />
|
<Compile Include="FileFormats\VqaReader.cs" />
|
||||||
<Compile Include="FileFormats\LCWCompression.cs" />
|
<Compile Include="FileFormats\LCWCompression.cs" />
|
||||||
<Compile Include="FileFormats\XORDeltaCompression.cs" />
|
<Compile Include="FileFormats\XORDeltaCompression.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user