- fixed some issues in build script
- moved WaveUtils project from SoundSystems to Support folder
This commit is contained in:
parent
a35bd9d6bd
commit
5406e0213e
@ -196,7 +196,7 @@
|
||||
<Project>{EB8258E0-6741-4DB9-B756-1EBDF67B1ED6}</Project>
|
||||
<Name>ANX.RenderSystem.Windows.GL3</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SoundSystems\WaveUtils\WaveUtils.csproj">
|
||||
<ProjectReference Include="..\Support\WaveUtils\WaveUtils.csproj">
|
||||
<Project>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</Project>
|
||||
<Name>WaveUtils</Name>
|
||||
</ProjectReference>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
@ -28,7 +28,7 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;XNAEXT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework.Content.Pipeline;
|
||||
using ANX.RenderSystem.Windows.DX10;
|
||||
using ANX.BaseDirectX;
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
|
@ -185,14 +185,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AudioSample", "Samples\Audi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.ContentCompiler.GUI", "Tools\ANXContentCompilerGUI\ANX.ContentCompiler.GUI.csproj", "{45DD7B40-C498-4DD2-A16B-FD6C4E6991B3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WaveUtils", "SoundSystems\WaveUtils\WaveUtils.csproj", "{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DualTextureSample", "Samples\DualTextureSample\DualTextureSample.csproj", "{9259CC4E-AE6B-403C-8FAB-2408448C3935}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.BaseDirectX", "RenderSystems\ANX.BaseDirectX\ANX.BaseDirectX.csproj", "{A4D3AD34-E49C-4142-8620-2AFF44ED6719}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicEffectSample", "Samples\BasicEffectSample\BasicEffectSample.csproj", "{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Support", "Support", "{3E29A6C6-9487-46A7-A161-D8DB84514933}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WaveUtils", "Support\WaveUtils\WaveUtils.csproj", "{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -714,16 +716,6 @@ Global
|
||||
{45DD7B40-C498-4DD2-A16B-FD6C4E6991B3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{45DD7B40-C498-4DD2-A16B-FD6C4E6991B3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{45DD7B40-C498-4DD2-A16B-FD6C4E6991B3}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9259CC4E-AE6B-403C-8FAB-2408448C3935}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{9259CC4E-AE6B-403C-8FAB-2408448C3935}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{9259CC4E-AE6B-403C-8FAB-2408448C3935}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
@ -756,6 +748,16 @@ Global
|
||||
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782}.Release|x86.ActiveCfg = Release|x86
|
||||
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782}.Release|x86.Build.0 = Release|x86
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -805,7 +807,6 @@ Global
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
{14EF49AB-6D3F-458D-9D5C-D120B86EDD7A} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
{E2EE2D12-A98E-4C21-AFFA-35F48D2B2A94} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
{CCB4679D-11AF-4EC6-AAA4-36619FCE70FA} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
{E4FFD875-95FC-48F2-8B6D-8483D0B71666} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
{BD648BB8-EF28-453C-B4F5-EE3C93EB4DAF} = {60824BDB-AC8A-42ED-9B79-111FB44669FF}
|
||||
@ -815,6 +816,7 @@ Global
|
||||
{04F6041E-475E-4B2A-A889-6A33EABD718B} = {1436F7C9-29D3-4FEF-8914-10B45F13D142}
|
||||
{2B6D0EFF-7874-495F-9226-873ED9649C60} = {1436F7C9-29D3-4FEF-8914-10B45F13D142}
|
||||
{2CF3FE4D-586E-4B07-8BF0-1E84B670F0AD} = {1436F7C9-29D3-4FEF-8914-10B45F13D142}
|
||||
{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C} = {3E29A6C6-9487-46A7-A161-D8DB84514933}
|
||||
EndGlobalSection
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
|
@ -31,8 +31,8 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
[assembly: AssemblyVersion("0.4.38.*")]
|
||||
[assembly: AssemblyFileVersion("0.4.38.0")]
|
||||
[assembly: AssemblyVersion("0.4.39.*")]
|
||||
[assembly: AssemblyFileVersion("0.4.39.0")]
|
||||
|
||||
[assembly: InternalsVisibleTo("ANX.RenderSystem.Windows.DX10")]
|
||||
[assembly: InternalsVisibleTo("ANX.RenderSystem.Windows.DX11")]
|
||||
|
@ -18,7 +18,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>..\..\bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;XNAEXT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@ -28,7 +28,7 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;XNAEXT</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1.0")]
|
||||
|
@ -52,7 +52,7 @@
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WaveUtils\WaveUtils.csproj">
|
||||
<ProjectReference Include="..\..\Support\WaveUtils\WaveUtils.csproj">
|
||||
<Project>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</Project>
|
||||
<Name>WaveUtils</Name>
|
||||
</ProjectReference>
|
||||
|
@ -52,7 +52,7 @@
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\WaveUtils\WaveUtils_Linux.csproj">
|
||||
<ProjectReference Include="..\..\Support\WaveUtils\WaveUtils_Linux.csproj">
|
||||
<Project>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</Project>
|
||||
<Name>WaveUtils</Name>
|
||||
</ProjectReference>
|
||||
|
@ -1,10 +0,0 @@
|
||||
namespace WaveUtils
|
||||
{
|
||||
public enum ALFormat
|
||||
{
|
||||
Mono8 = 4352,
|
||||
Mono16 = 4353,
|
||||
Stereo8 = 4354,
|
||||
Stereo16 = 4355,
|
||||
}
|
||||
}
|
@ -1,125 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// http://www.threejacks.com/?q=node/176
|
||||
/// </summary>
|
||||
internal static class ALaw
|
||||
{
|
||||
#region Decode Table
|
||||
private static readonly short[] DecodeTable =
|
||||
{
|
||||
-5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
|
||||
-7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
|
||||
-2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
|
||||
-3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392,
|
||||
-22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944,
|
||||
-30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136,
|
||||
-11008,-10496,-12032,-11520,-8960, -8448, -9984, -9472,
|
||||
-15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568,
|
||||
-344, -328, -376, -360, -280, -264, -312, -296,
|
||||
-472, -456, -504, -488, -408, -392, -440, -424,
|
||||
-88, -72, -120, -104, -24, -8, -56, -40,
|
||||
-216, -200, -248, -232, -152, -136, -184, -168,
|
||||
-1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184,
|
||||
-1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696,
|
||||
-688, -656, -752, -720, -560, -528, -624, -592,
|
||||
-944, -912, -1008, -976, -816, -784, -880, -848,
|
||||
5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736,
|
||||
7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784,
|
||||
2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368,
|
||||
3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392,
|
||||
22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944,
|
||||
30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136,
|
||||
11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472,
|
||||
15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568,
|
||||
344, 328, 376, 360, 280, 264, 312, 296,
|
||||
472, 456, 504, 488, 408, 392, 440, 424,
|
||||
88, 72, 120, 104, 24, 8, 56, 40,
|
||||
216, 200, 248, 232, 152, 136, 184, 168,
|
||||
1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184,
|
||||
1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696,
|
||||
688, 656, 752, 720, 560, 528, 624, 592,
|
||||
944, 912, 1008, 976, 816, 784, 880, 848
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region Encode Table
|
||||
private static readonly byte[] EncodeTable =
|
||||
{
|
||||
1, 1, 2, 2, 3, 3, 3, 3,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
5, 5, 5, 5, 5, 5, 5, 5,
|
||||
5, 5, 5, 5, 5, 5, 5, 5,
|
||||
6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region ConvertToALaw (TODO)
|
||||
private static void ConvertToALaw(WaveInfo info)
|
||||
{
|
||||
//int sign;
|
||||
//int exponent;
|
||||
//int mantissa;
|
||||
//unsigned char compressedByte;
|
||||
|
||||
//sign = ((~sample) >> 8) & 0x80;
|
||||
//if (!sign)
|
||||
// sample = (short)-sample;
|
||||
//if (sample > cClip)
|
||||
// sample = cClip;
|
||||
//if (sample >= 256)
|
||||
//{
|
||||
// exponent = (int)ALawCompressTable[(sample >> 8) & 0x7F];
|
||||
// mantissa = (sample >> (exponent + 3) ) & 0x0F;
|
||||
// compressedByte = ((exponent << 4) | mantissa);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// compressedByte = (unsigned char)(sample >> 4);
|
||||
//}
|
||||
//compressedByte ^= (sign ^ 0x55);
|
||||
//return compressedByte;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ConvertToPcm
|
||||
public static void ConvertToPcm(WaveInfo info, int resultChannelCount)
|
||||
{
|
||||
using (MemoryStream destStream = new MemoryStream())
|
||||
{
|
||||
BinaryWriter destWriter = new BinaryWriter(destStream);
|
||||
|
||||
int increment = 1;
|
||||
if (info.Channels == 2 && resultChannelCount == 1)
|
||||
increment = 2;
|
||||
|
||||
info.Channels = resultChannelCount;
|
||||
info.ALFormat = info.Channels == 1 ? ALFormat.Mono16 : ALFormat.Stereo16;
|
||||
|
||||
for (int index = 0; index < info.Data.Length; index += increment)
|
||||
destWriter.Write(DecodeTable[info.Data[index]]);
|
||||
|
||||
info.Data = destStream.ToArray();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
public static class IEEEFloat
|
||||
{
|
||||
public static void ConvertToPcm(WaveInfo data, int resultChannelCount)
|
||||
{
|
||||
bool is64BitFloat = data.BitsPerSample == 64;
|
||||
|
||||
using (BinaryReader sourceReader = new BinaryReader(new MemoryStream(data.Data)))
|
||||
{
|
||||
MemoryStream destStream = new MemoryStream();
|
||||
BinaryWriter destWriter = new BinaryWriter(destStream);
|
||||
|
||||
int length = data.Data.Length / (is64BitFloat ? 8 : 4);
|
||||
|
||||
int increment = 1;
|
||||
if (data.Channels == 2 && resultChannelCount == 1)
|
||||
increment = 2;
|
||||
|
||||
data.Channels = resultChannelCount;
|
||||
data.ALFormat = data.Channels == 1 ? ALFormat.Mono16 : ALFormat.Stereo16;
|
||||
|
||||
for (int index = 0; index < length; index += increment)
|
||||
{
|
||||
double value = is64BitFloat ? sourceReader.ReadDouble() : sourceReader.ReadSingle();
|
||||
destWriter.Write((short)(value * 32767));
|
||||
}
|
||||
|
||||
data.Data = destStream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,141 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// http://wiki.multimedia.cx/index.php?title=Microsoft_ADPCM
|
||||
/// <para />
|
||||
/// http://dslinux.gits.kiev.ua/trunk/lib/audiofile/src/libaudiofile/modules/msadpcm.c
|
||||
/// <para />
|
||||
/// http://netghost.narod.ru/gff/vendspec/micriff/ms_riff.txt
|
||||
/// </summary>
|
||||
internal static class MsAdpcm
|
||||
{
|
||||
#region Decoding Tables
|
||||
private static readonly int[] AdaptationTable =
|
||||
{
|
||||
230, 230, 230, 230, 307, 409, 512, 614,
|
||||
768, 614, 512, 409, 307, 230, 230, 230
|
||||
};
|
||||
|
||||
private static readonly int[] AdaptCoeff1 =
|
||||
{
|
||||
256, 512, 0, 192, 240, 460, 392
|
||||
};
|
||||
|
||||
private static readonly int[] AdaptCoeff2 =
|
||||
{
|
||||
0, -256, 0, 64, 0, -208, -232
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region StateObject (helper class)
|
||||
private class StateObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Indices in the aCoef array to define the predictor
|
||||
/// used to encode this block.
|
||||
/// </summary>
|
||||
public byte predicator;
|
||||
/// <summary>
|
||||
/// Initial Delta value to use.
|
||||
/// </summary>
|
||||
public short delta;
|
||||
/// <summary>
|
||||
/// The second sample value of the block. When decoding this will be
|
||||
/// used as the previous sample to start decoding with.
|
||||
/// </summary>
|
||||
public short sample1;
|
||||
/// <summary>
|
||||
/// The first sample value of the block. When decoding this will be
|
||||
/// used as the previous' previous sample to start decoding with.
|
||||
/// </summary>
|
||||
public short sample2;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ConvertToPcm
|
||||
public static void ConvertToPcm(WaveInfo info)
|
||||
{
|
||||
BinaryReader reader = new BinaryReader(new MemoryStream(info.Data));
|
||||
MemoryStream result = new MemoryStream();
|
||||
BinaryWriter writer = new BinaryWriter(result);
|
||||
|
||||
StateObject first = new StateObject();
|
||||
StateObject second = info.Channels > 1 ? new StateObject() : first;
|
||||
StateObject[] states = { first, second };
|
||||
|
||||
int numSamples = (info.ExtSamplesPerBlock - 2) * info.Channels;
|
||||
int numberOfBlocks = info.Data.Length / info.BlockAlign;
|
||||
for (int blockIndex = 0; blockIndex < numberOfBlocks; blockIndex++)
|
||||
{
|
||||
for (int index = 0; index < info.Channels; index++)
|
||||
{
|
||||
states[index].predicator = reader.ReadByte();
|
||||
}
|
||||
for (int index = 0; index < info.Channels; index++)
|
||||
{
|
||||
states[index].delta = reader.ReadInt16();
|
||||
}
|
||||
for (int index = 0; index < info.Channels; index++)
|
||||
{
|
||||
states[index].sample1 = reader.ReadInt16();
|
||||
}
|
||||
for (int index = 0; index < info.Channels; index++)
|
||||
{
|
||||
states[index].sample2 = reader.ReadInt16();
|
||||
// Write first samples directly from preamble
|
||||
writer.Write(states[index].sample2);
|
||||
}
|
||||
|
||||
// Write first samples directly from preamble
|
||||
for (int index = 0; index < info.Channels; index++)
|
||||
{
|
||||
writer.Write(states[index].sample1);
|
||||
}
|
||||
|
||||
// We decode the samples two at a time
|
||||
for (int index = 0; index < numSamples; index += 2)
|
||||
{
|
||||
byte code = reader.ReadByte();
|
||||
DecodeSample(first, code >> 4, writer);
|
||||
DecodeSample(second, code & 0x0f, writer);
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
writer.Close();
|
||||
info.Data = result.ToArray();
|
||||
result.Dispose();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DecodeSample
|
||||
private static void DecodeSample(StateObject state, int code,
|
||||
BinaryWriter writer)
|
||||
{
|
||||
int linearSample =
|
||||
((state.sample1 * AdaptCoeff1[state.predicator]) +
|
||||
(state.sample2 * AdaptCoeff2[state.predicator])) / 256;
|
||||
|
||||
linearSample = linearSample + (state.delta *
|
||||
((code & 0x08) == 0x08 ? (code - 0x10) : code));
|
||||
|
||||
state.sample2 = state.sample1;
|
||||
// clamp predictor within signed 16-bit range
|
||||
state.sample1 = (short)Math.Min(short.MaxValue,
|
||||
Math.Max(short.MinValue, linearSample));
|
||||
|
||||
state.delta = (short)Math.Max(
|
||||
(state.delta * AdaptationTable[code]) / 256, 16);
|
||||
|
||||
writer.Write(state.sample1);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// http://www.threejacks.com/?q=node/176
|
||||
/// </summary>
|
||||
internal static class MuLaw
|
||||
{
|
||||
#region Decode Table
|
||||
private static readonly short[] DecodeTable =
|
||||
{
|
||||
-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
|
||||
-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
|
||||
-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,
|
||||
-11900,-11388,-10876,-10364, -9852, -9340, -8828, -8316,
|
||||
-7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140,
|
||||
-5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
|
||||
-3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004,
|
||||
-2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980,
|
||||
-1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436,
|
||||
-1372, -1308, -1244, -1180, -1116, -1052, -988, -924,
|
||||
-876, -844, -812, -780, -748, -716, -684, -652,
|
||||
-620, -588, -556, -524, -492, -460, -428, -396,
|
||||
-372, -356, -340, -324, -308, -292, -276, -260,
|
||||
-244, -228, -212, -196, -180, -164, -148, -132,
|
||||
-120, -112, -104, -96, -88, -80, -72, -64,
|
||||
-56, -48, -40, -32, -24, -16, -8, -1,
|
||||
32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956,
|
||||
23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764,
|
||||
15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412,
|
||||
11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316,
|
||||
7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140,
|
||||
5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092,
|
||||
3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004,
|
||||
2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980,
|
||||
1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436,
|
||||
1372, 1308, 1244, 1180, 1116, 1052, 988, 924,
|
||||
876, 844, 812, 780, 748, 716, 684, 652,
|
||||
620, 588, 556, 524, 492, 460, 428, 396,
|
||||
372, 356, 340, 324, 308, 292, 276, 260,
|
||||
244, 228, 212, 196, 180, 164, 148, 132,
|
||||
120, 112, 104, 96, 88, 80, 72, 64,
|
||||
56, 48, 40, 32, 24, 16, 8, 0
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region Encode Table
|
||||
private static readonly byte[] EncodeTable =
|
||||
{
|
||||
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region ConvertToMuLaw (TODO)
|
||||
private static void ConvertToMuLaw(WaveInfo info)
|
||||
{
|
||||
//int sign = (sample >> 8) & 0x80;
|
||||
//if (sign)
|
||||
// sample = (short)-sample;
|
||||
//if (sample > cClip)
|
||||
// sample = cClip;
|
||||
//sample = (short)(sample + cBias);
|
||||
//int exponent = (int)MuLawCompressTable[(sample>>7) & 0xFF];
|
||||
//int mantissa = (sample >> (exponent+3)) & 0x0F;
|
||||
//int compressedByte = ~ (sign | (exponent << 4) | mantissa);
|
||||
|
||||
//return (unsigned char)compressedByte;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ConvertToPcm
|
||||
public static void ConvertToPcm(WaveInfo info, int resultChannelCount)
|
||||
{
|
||||
using (MemoryStream destStream = new MemoryStream())
|
||||
{
|
||||
BinaryWriter destWriter = new BinaryWriter(destStream);
|
||||
|
||||
int increment = 1;
|
||||
if (info.Channels == 2 && resultChannelCount == 1)
|
||||
increment = 2;
|
||||
|
||||
info.Channels = resultChannelCount;
|
||||
info.ALFormat = info.Channels == 1 ? ALFormat.Mono16 : ALFormat.Stereo16;
|
||||
|
||||
for (int index = 0; index < info.Data.Length; index += increment)
|
||||
destWriter.Write(DecodeTable[info.Data[index]]);
|
||||
|
||||
info.Data = destStream.ToArray();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die mit einer Assembly verknüpft sind.
|
||||
[assembly: AssemblyTitle("WaveUtils")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ANX.Framework Team")]
|
||||
[assembly: AssemblyProduct("WaveUtils")]
|
||||
[assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2012")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("fae37998-9305-495a-a72f-005a3ab28746")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,50 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
public class WaveConverter
|
||||
{
|
||||
private WaveInfo loadedData;
|
||||
|
||||
public WaveConverter(WaveInfo setLoadedData)
|
||||
{
|
||||
setLoadedData = loadedData;
|
||||
}
|
||||
|
||||
public void ConvertToPcm()
|
||||
{
|
||||
ConvertToPcm(loadedData.Channels);
|
||||
}
|
||||
|
||||
public void ConvertToPcm(int resultChannelCount)
|
||||
{
|
||||
switch (loadedData.WaveFormat)
|
||||
{
|
||||
case WaveFormat.ALAW:
|
||||
ALaw.ConvertToPcm(loadedData, resultChannelCount);
|
||||
break;
|
||||
|
||||
case WaveFormat.MULAW:
|
||||
MuLaw.ConvertToPcm(loadedData, resultChannelCount);
|
||||
break;
|
||||
|
||||
case WaveFormat.IEEE_FLOAT:
|
||||
IEEEFloat.ConvertToPcm(loadedData, resultChannelCount);
|
||||
break;
|
||||
|
||||
case WaveFormat.MS_ADPCM:
|
||||
MsAdpcm.ConvertToPcm(loadedData);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotSupportedException("The WAVE format " + loadedData.WaveFormat +
|
||||
" is not supported yet. Unable to load!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,162 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using ANX.Framework.NonXNA;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains all the loading process of a wave file.
|
||||
/// <para />
|
||||
/// http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/wave.html
|
||||
/// <para />
|
||||
/// Chunk information: http://www.sonicspot.com/guide/wavefiles.html
|
||||
/// <para />
|
||||
/// Audio Codecs: http://wiki.multimedia.cx/index.php?title=Category:Audio_Codecs
|
||||
/// <para />
|
||||
/// http://netghost.narod.ru/gff/vendspec/micriff/ms_riff.txt
|
||||
/// <para />
|
||||
/// Most interesting file about many formats:
|
||||
/// http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm
|
||||
/// <para />
|
||||
/// http://sharkysoft.com/archive/lava/docs/javadocs/lava/riff/wave/doc-files/riffwave-content.htm
|
||||
/// </summary>
|
||||
public static class WaveFile
|
||||
{
|
||||
#region LoadData
|
||||
public static WaveInfo LoadData(Stream stream, bool rememberUnloadedChunks = false)
|
||||
{
|
||||
WaveInfo result = new WaveInfo();
|
||||
|
||||
using (BinaryReader reader = new BinaryReader(stream))
|
||||
{
|
||||
if (CheckHeader(reader) == false)
|
||||
{
|
||||
throw new FormatException("The provided stream is not a valid WAVE file. Unable to load!");
|
||||
}
|
||||
|
||||
#region Read Chunks
|
||||
while (stream.Position < stream.Length - 8)
|
||||
{
|
||||
string identifier = new string(reader.ReadChars(4));
|
||||
int chunkLength = reader.ReadInt32();
|
||||
|
||||
if (stream.Position + chunkLength > stream.Length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
int startPosition = (int)reader.BaseStream.Position;
|
||||
|
||||
switch (identifier.ToLower())
|
||||
{
|
||||
case "fmt ":
|
||||
{
|
||||
#region Load fmt chunk
|
||||
result.WaveFormat = (WaveFormat)reader.ReadInt16();
|
||||
result.Channels = reader.ReadInt16();
|
||||
result.SampleRate = reader.ReadInt32();
|
||||
int avgBytesPerSec = reader.ReadInt32();
|
||||
result.BlockAlign = reader.ReadInt16();
|
||||
result.BitsPerSample = reader.ReadInt16();
|
||||
|
||||
if (chunkLength > 16)
|
||||
{
|
||||
short extensionSize = reader.ReadInt16();
|
||||
|
||||
if (chunkLength > 18)
|
||||
{
|
||||
result.ExtSamplesPerBlock = reader.ReadInt16();
|
||||
int speakerPositionMask = reader.ReadInt32();
|
||||
WaveFormat extFormat = (WaveFormat)reader.ReadInt16();
|
||||
if (result.WaveFormat < 0)
|
||||
{
|
||||
result.WaveFormat = extFormat;
|
||||
}
|
||||
byte[] subFormat = reader.ReadBytes(14);
|
||||
}
|
||||
}
|
||||
|
||||
result.ALFormat = (result.Channels == 1 ?
|
||||
(result.BitsPerSample == 8 ?
|
||||
ALFormat.Mono8 :
|
||||
ALFormat.Mono16) :
|
||||
(result.BitsPerSample == 8 ?
|
||||
ALFormat.Stereo8 :
|
||||
ALFormat.Stereo16));
|
||||
#endregion
|
||||
}
|
||||
break;
|
||||
|
||||
case "fact":
|
||||
{
|
||||
#region Load fact chunk
|
||||
// per channel
|
||||
int numberOfSamples = reader.ReadInt32();
|
||||
// TODO: more
|
||||
#endregion
|
||||
}
|
||||
break;
|
||||
|
||||
case "data":
|
||||
result.Data = reader.ReadBytes(chunkLength);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (rememberUnloadedChunks)
|
||||
{
|
||||
var value = new KeyValuePair<string, byte[]>(identifier, reader.ReadBytes(chunkLength));
|
||||
result.UnloadedChunks.Add(value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// If some chunks are incorrect in data length, we ensure that we
|
||||
// end up in the right position.
|
||||
int lengthRead = (int)reader.BaseStream.Position - startPosition;
|
||||
if (lengthRead != chunkLength)
|
||||
{
|
||||
reader.BaseStream.Seek(chunkLength - lengthRead,
|
||||
SeekOrigin.Current);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
if (result.Data == null)
|
||||
{
|
||||
Logger.Error("There was no data chunk available. Unable to load!");
|
||||
return null;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CheckHeader
|
||||
private static bool CheckHeader(BinaryReader reader)
|
||||
{
|
||||
string RIFFmagic = new string(reader.ReadChars(4));
|
||||
if(RIFFmagic != "RIFF")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// filesize
|
||||
reader.ReadInt32();
|
||||
|
||||
string identifierWAVE = new string(reader.ReadChars(4));
|
||||
if(identifierWAVE != "WAVE")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
using System;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
public enum WaveFormat
|
||||
{
|
||||
PCM = 1,
|
||||
/// <summary>
|
||||
/// http://wiki.multimedia.cx/index.php?title=Microsoft_ADPCM
|
||||
/// </summary>
|
||||
MS_ADPCM = 2,
|
||||
IEEE_FLOAT = 3,
|
||||
/// <summary>
|
||||
/// 8-bit ITU-T G.711 A-law
|
||||
/// http://hazelware.luggle.com/tutorials/mulawcompression.html
|
||||
/// </summary>
|
||||
ALAW = 6,
|
||||
/// <summary>
|
||||
/// 8-bit ITU-T G.711 µ-law
|
||||
/// http://hazelware.luggle.com/tutorials/mulawcompression.html
|
||||
/// </summary>
|
||||
MULAW = 7,
|
||||
|
||||
/// <summary>
|
||||
/// Determined by SubFormat
|
||||
/// </summary>
|
||||
WAVE_FORMAT_EXTENSIBLE = 0xFFFE,
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
// This file is part of the ANX.Framework and originally taken from
|
||||
// the AC.AL OpenAL library, released under the MIT License.
|
||||
// For details see: http://acal.codeplex.com/license
|
||||
|
||||
namespace WaveUtils
|
||||
{
|
||||
public class WaveInfo
|
||||
{
|
||||
public List<KeyValuePair<string, byte[]>> UnloadedChunks { get; internal set; }
|
||||
public WaveFormat WaveFormat { get; internal set; }
|
||||
public byte[] Data { get; internal set; }
|
||||
public ALFormat ALFormat { get; internal set; }
|
||||
public int SampleRate { get; internal set; }
|
||||
public short BitsPerSample { get; internal set; }
|
||||
public short BlockAlign { get; internal set; }
|
||||
public int Channels { get; internal set; }
|
||||
public short ExtSamplesPerBlock { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// NOTE: This only works with standard PCM data!
|
||||
/// </summary>
|
||||
public TimeSpan CalculateDuration()
|
||||
{
|
||||
float sizeMulBlockAlign = Data.Length / ((int)Channels * 2);
|
||||
return TimeSpan.FromMilliseconds((double)(sizeMulBlockAlign * 1000f / (float)SampleRate));
|
||||
}
|
||||
|
||||
public WaveInfo()
|
||||
{
|
||||
UnloadedChunks = new List<KeyValuePair<string, byte[]>>();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WaveUtils</RootNamespace>
|
||||
<AssemblyName>WaveUtils</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ALaw.cs" />
|
||||
<Compile Include="ALFormat.cs" />
|
||||
<Compile Include="IEEEFloat.cs" />
|
||||
<Compile Include="MsAdpcm.cs" />
|
||||
<Compile Include="MuLaw.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WaveConverter.cs" />
|
||||
<Compile Include="WaveFile.cs" />
|
||||
<Compile Include="WaveFormat.cs" />
|
||||
<Compile Include="WaveInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WaveUtils</RootNamespace>
|
||||
<AssemblyName>WaveUtils</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;LINUX;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;LINUX;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ALaw.cs" />
|
||||
<Compile Include="ALFormat.cs" />
|
||||
<Compile Include="IEEEFloat.cs" />
|
||||
<Compile Include="MsAdpcm.cs" />
|
||||
<Compile Include="MuLaw.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WaveConverter.cs" />
|
||||
<Compile Include="WaveFile.cs" />
|
||||
<Compile Include="WaveFormat.cs" />
|
||||
<Compile Include="WaveInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_Linux.csproj">
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WaveUtils</RootNamespace>
|
||||
<AssemblyName>WaveUtils</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;PSVITA;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;PSVITA;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ALaw.cs" />
|
||||
<Compile Include="ALFormat.cs" />
|
||||
<Compile Include="IEEEFloat.cs" />
|
||||
<Compile Include="MsAdpcm.cs" />
|
||||
<Compile Include="MuLaw.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WaveConverter.cs" />
|
||||
<Compile Include="WaveFile.cs" />
|
||||
<Compile Include="WaveFormat.cs" />
|
||||
<Compile Include="WaveInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_PSVita.csproj">
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Sce\Sce.Psm.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1986B0ED-3D28-4FEE-82D0-BCC39C87C18C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WaveUtils</RootNamespace>
|
||||
<AssemblyName>WaveUtils</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWSMETRO;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ALaw.cs" />
|
||||
<Compile Include="ALFormat.cs" />
|
||||
<Compile Include="IEEEFloat.cs" />
|
||||
<Compile Include="MsAdpcm.cs" />
|
||||
<Compile Include="MuLaw.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WaveConverter.cs" />
|
||||
<Compile Include="WaveFile.cs" />
|
||||
<Compile Include="WaveFormat.cs" />
|
||||
<Compile Include="WaveInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_WindowsMetro.csproj">
|
||||
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
|
||||
<Name>ANX.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '11.0' ">
|
||||
<VisualStudioVersion>11.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
</Project>
|
@ -126,10 +126,60 @@
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="support" description="ANX.Framework supporting libraries" unless="${target::has-executed('support')}">
|
||||
<fileset id="support_files" basedir="../Support/">
|
||||
<include name="**/*.csproj" />
|
||||
<exclude name="**/*PSVita*.csproj" />
|
||||
<exclude name="**/*Metro*.csproj" />
|
||||
<exclude name="**/*Linux*.csproj" />
|
||||
</fileset>
|
||||
|
||||
<if test="${project.anx.linux}">
|
||||
<fileset id="support_files" basedir="../Support/">
|
||||
<include name="**/*_Linux.csproj" />
|
||||
</fileset>
|
||||
</if>
|
||||
|
||||
<if test="${project.anx.psvita}">
|
||||
<fileset id="support_files" basedir="../Support/">
|
||||
<include name="**/*.PSVITA*_PSVITA.csproj" />
|
||||
</fileset>
|
||||
</if>
|
||||
|
||||
<if test="${project.anx.metro}">
|
||||
<fileset id="support_files" basedir="../Support/">
|
||||
<include name="**/*.Metro*_WindowsMetro.csproj" />
|
||||
</fileset>
|
||||
</if>
|
||||
|
||||
<foreach item="File" property="projectFile">
|
||||
<in>
|
||||
<items refid="support_files" />
|
||||
</in>
|
||||
<do>
|
||||
<echo message="building: ${path::get-file-name-without-extension(projectFile)}" />
|
||||
|
||||
<exec program="msbuild.exe" >
|
||||
<arg value="/t:Build"/>
|
||||
<arg value="/p:Configuration=${build.configuration}"/>
|
||||
<arg value='/p:Platform="${build.platform}"'/>
|
||||
<arg value="/p:OutputPath=${build.dir}/${build.configuration}" />
|
||||
<arg value="/p:AllowUnsafeBlocks=true" />
|
||||
<arg value="/p:SolutionDir=${build.solution_dir}" />
|
||||
<arg value='/p:DefineConstants="${project.anx.directives}"' />
|
||||
<arg value="/clp:ErrorsOnly" />
|
||||
<arg value="/nologo" />
|
||||
<arg value="${projectFile}" />
|
||||
</exec>
|
||||
</do>
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<target name="rendersystem" description="Build ANX.Framework InputSystems">
|
||||
<!-- default windows fileset -->
|
||||
<fileset id="rendersystem_files" basedir="../RenderSystems/">
|
||||
<include name="**/*.csproj" />
|
||||
<exclude name="**/*.BaseDirectX.*" />
|
||||
<exclude name="**/*PSVita*.csproj" />
|
||||
<exclude name="**/*Metro*.csproj" />
|
||||
<exclude name="**/*Linux*.csproj" />
|
||||
@ -138,12 +188,14 @@
|
||||
<if test="${project.anx.linux}">
|
||||
<fileset id="rendersystem_files" basedir="../RenderSystems/">
|
||||
<include name="**/*GL*_Linux.csproj" />
|
||||
<exclude name="**/*.BaseDirectX.*" />
|
||||
</fileset>
|
||||
</if>
|
||||
|
||||
<if test="${project.anx.psvita}">
|
||||
<fileset id="rendersystem_files" basedir="../RenderSystems/">
|
||||
<include name="**/*.PSVITA*_PSVITA.csproj" />
|
||||
<exclude name="**/*.BaseDirectX.*" />
|
||||
</fileset>
|
||||
</if>
|
||||
|
||||
@ -248,7 +300,7 @@
|
||||
</foreach>
|
||||
</target>
|
||||
|
||||
<target name="soundsystem" description="Build ANX.Framework SoundSystems">
|
||||
<target name="soundsystem" description="Build ANX.Framework SoundSystems" depends="support">
|
||||
<!-- default windows fileset -->
|
||||
<fileset id="soundsystem_files" basedir="../SoundSystems/">
|
||||
<include name="**/*.csproj" />
|
||||
@ -369,7 +421,7 @@
|
||||
<do>
|
||||
<echo message="generating: ${path::get-file-name(path::get-directory-name(buildFile))}" />
|
||||
|
||||
<exec program="../bin/sscg.exe" >
|
||||
<exec program="../bin/${build.configuration}/sscg.exe" >
|
||||
<arg value="${buildFile}" />
|
||||
<arg value="/silent" />
|
||||
</exec>
|
||||
@ -431,7 +483,7 @@
|
||||
|
||||
</target>
|
||||
|
||||
<target name="tools" description="Build ANX.Framework tools" unless="${target::has-executed('tools')}">
|
||||
<target name="tools" description="Build ANX.Framework tools" depends="support" unless="${target::has-executed('tools')}">
|
||||
<foreach item="File" property="projectFile">
|
||||
<in>
|
||||
<items basedir="../Tools/">
|
||||
@ -460,9 +512,9 @@
|
||||
|
||||
</target>
|
||||
|
||||
<target name="content_pipeline" description="Build ANX.Framework ContentPipeline extensions">
|
||||
<target name="content_pipeline" description="Build ANX.Framework ContentPipeline extensions" depends="support">
|
||||
<echo message="building: Content.Pipeline.Extensions" />
|
||||
|
||||
<!--
|
||||
<exec program="msbuild.exe" >
|
||||
<arg value="/t:Build"/>
|
||||
<arg value="/p:Configuration=${build.configuration}"/>
|
||||
@ -475,6 +527,7 @@
|
||||
<arg value="/nologo" />
|
||||
<arg value="${project.anxcontent.path}/${project.anxcontent.name}.csproj" />
|
||||
</exec>
|
||||
-->
|
||||
</target>
|
||||
|
||||
<target name="create_packages" description="generates all type of packages">
|
||||
@ -540,6 +593,7 @@
|
||||
<include name="PlatformSystems/**/*.csproj" />
|
||||
<include name="SoundSystems/**/*.csproj" />
|
||||
<include name="Samples/**/*.csproj" />
|
||||
<exclude name="**/*.BaseDirectX.*" />
|
||||
<exclude name="**/*_Linux.csproj" />
|
||||
<exclude name="**/*_PSVita.csproj" />
|
||||
<exclude name="**/*_WindowsMetro.csproj" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user