Added ANX.SoundSystem.Null for debugging. This SoundSystem does nothing, it is only a empty hull.
This commit is contained in:
parent
dbd391217c
commit
749fa0a5f1
@ -201,6 +201,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "Samples\AlphaTestEffectSample\AlphaTestEffectSample.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.SoundSystem.Null", "SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null.csproj", "{C4DDFFFF-595E-4089-B499-06F68CAF2566}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -1004,6 +1006,20 @@ Global
|
||||
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x64.ActiveCfg = Release|x86
|
||||
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86
|
||||
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.Build.0 = Release|x86
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -1053,6 +1069,7 @@ 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}
|
||||
{C4DDFFFF-595E-4089-B499-06F68CAF2566} = {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}
|
||||
|
@ -19,27 +19,107 @@ namespace ANX.Framework.Audio
|
||||
#region Static
|
||||
public static float DistanceScale
|
||||
{
|
||||
get { return GetCreator().DistanceScale; }
|
||||
set { GetCreator().DistanceScale = value; }
|
||||
get
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
return creator.DistanceScale;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
set
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
creator.DistanceScale = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("couldn't set DistanceScale because no supported SoundSystem was found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static float DopplerScale
|
||||
{
|
||||
get { return GetCreator().DopplerScale; }
|
||||
set { GetCreator().DopplerScale = value; }
|
||||
}
|
||||
get
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
return creator.DopplerScale;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
set
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
creator.DopplerScale = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("couldn't set DopplerScale because no supported SoundSystem was found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static float MasterVolume
|
||||
{
|
||||
get { return GetCreator().MasterVolume; }
|
||||
set { GetCreator().MasterVolume = value; }
|
||||
get
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
return creator.MasterVolume;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
set
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
creator.MasterVolume = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("couldn't set MasterVolume because no supported SoundSystem was found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static float SpeedOfSound
|
||||
{
|
||||
get { return GetCreator().SpeedOfSound; }
|
||||
set { GetCreator().SpeedOfSound = value; }
|
||||
}
|
||||
get
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
return creator.SpeedOfSound;
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
set
|
||||
{
|
||||
ISoundSystemCreator creator = GetCreator();
|
||||
if (creator != null)
|
||||
{
|
||||
creator.SpeedOfSound = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException("couldn't set SpeedOfSound because no supported SoundSystem was found");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private
|
||||
|
@ -197,7 +197,7 @@ namespace ANX.Framework.NonXNA
|
||||
Initialize();
|
||||
|
||||
AddInType addInType = GetAddInType(typeof(T));
|
||||
return addInSystems[addInType].GetDefaultCreator<T>(addInType);
|
||||
return addInSystems[addInType].GetDefaultCreator<T>(addInType);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ANX.Framework;
|
||||
using ANX.Framework.Graphics;
|
||||
using ANX.Framework.Input;
|
||||
|
@ -62,13 +62,17 @@
|
||||
<Project>{068eb2e9-963c-4e1b-8831-e25011f11ffe}</Project>
|
||||
<Name>ANX.PlatformSystem.Windows</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11.csproj">
|
||||
<Project>{b30de9c2-0926-46b6-8351-9af276c472d5}</Project>
|
||||
<Name>ANX.RenderSystem.Windows.DX11</Name>
|
||||
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
|
||||
<Project>{5be49183-2f6f-4527-ac90-d816911fcf90}</Project>
|
||||
<Name>ANX.RenderSystem.Windows.DX10</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio.csproj">
|
||||
<Project>{6a582788-c4d2-410c-96cd-177f75712d65}</Project>
|
||||
<Name>ANX.SoundSystem.Windows.XAudio</Name>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null.csproj">
|
||||
<Project>{c4ddffff-595e-4089-b499-06f68caf2566}</Project>
|
||||
<Name>ANX.SoundSystem.Null</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.OpenAL\ANX.SoundSystem.OpenAL.csproj">
|
||||
<Project>{14ef49ab-6d3f-458d-9d5c-d120b86edd7a}</Project>
|
||||
<Name>ANX.SoundSystem.OpenAL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -53,6 +53,10 @@
|
||||
<Project>{49066074-3b7b-4a55-b122-6bd33ab73558}</Project>
|
||||
<Name>ANX.InputSystem.Standard</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Null\ANX.SoundSystem.Null.csproj">
|
||||
<Project>{c4ddffff-595e-4089-b499-06f68caf2566}</Project>
|
||||
<Name>ANX.SoundSystem.Null</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="anx.ico" />
|
||||
|
@ -0,0 +1,64 @@
|
||||
<?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>{C4DDFFFF-595E-4089-B499-06F68CAF2566}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ANX.SoundSystem.Null</RootNamespace>
|
||||
<AssemblyName>ANX.SoundSystem.Null</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>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Creator.cs" />
|
||||
<Compile Include="NullAudioEmitter.cs" />
|
||||
<Compile Include="NullAudioListener.cs" />
|
||||
<Compile Include="NullDynamicSoundEffectInstance.cs" />
|
||||
<Compile Include="NullMicrophone.cs" />
|
||||
<Compile Include="NullSong.cs" />
|
||||
<Compile Include="NullSoundEffect.cs" />
|
||||
<Compile Include="NullSoundEffectInstance.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SupportedPlatformsImpl.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>
|
@ -0,0 +1,64 @@
|
||||
<?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>{C4DDFFFF-595E-4089-B499-06F68CAF2566}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ANX.SoundSystem.Null</RootNamespace>
|
||||
<AssemblyName>ANX.SoundSystem.Null</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</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>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Creator.cs" />
|
||||
<Compile Include="NullAudioEmitter.cs" />
|
||||
<Compile Include="NullAudioListener.cs" />
|
||||
<Compile Include="NullDynamicSoundEffectInstance.cs" />
|
||||
<Compile Include="NullMicrophone.cs" />
|
||||
<Compile Include="NullSong.cs" />
|
||||
<Compile Include="NullSoundEffect.cs" />
|
||||
<Compile Include="NullSoundEffectInstance.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SupportedPlatformsImpl.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>
|
131
SoundSystems/ANX.SoundSystem.Null/Creator.cs
Normal file
131
SoundSystems/ANX.SoundSystem.Null/Creator.cs
Normal file
@ -0,0 +1,131 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using ANX.Framework.Audio;
|
||||
using ANX.Framework.Media;
|
||||
using ANX.Framework.NonXNA;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class Creator : ISoundSystemCreator
|
||||
{
|
||||
private IAudioListener audioListener = new NullAudioListener();
|
||||
private IAudioEmitter audioEmitter = new NullAudioEmitter();
|
||||
|
||||
#region Public
|
||||
public string Name
|
||||
{
|
||||
get { return "Null"; }
|
||||
}
|
||||
|
||||
public int Priority
|
||||
{
|
||||
get { return 10; }
|
||||
}
|
||||
|
||||
public bool IsSupported
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public float DistanceScale
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float DopplerScale
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float MasterVolume
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float SpeedOfSound
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public Creator()
|
||||
{
|
||||
DistanceScale = 1f;
|
||||
DopplerScale = 1f;
|
||||
SpeedOfSound = 343.5f;
|
||||
}
|
||||
|
||||
public IAudioListener CreateAudioListener()
|
||||
{
|
||||
return audioListener;
|
||||
}
|
||||
|
||||
public IAudioEmitter CreateAudioEmitter()
|
||||
{
|
||||
return audioEmitter;
|
||||
}
|
||||
|
||||
public ISoundEffect CreateSoundEffect(SoundEffect parent, Stream stream)
|
||||
{
|
||||
return new NullSoundEffect();
|
||||
}
|
||||
|
||||
public ISoundEffect CreateSoundEffect(SoundEffect parent, byte[] buffer, int offset, int count, int sampleRate,
|
||||
AudioChannels channels, int loopStart, int loopLength)
|
||||
{
|
||||
return new NullSoundEffect();
|
||||
}
|
||||
|
||||
public ISoundEffectInstance CreateSoundEffectInstance(ISoundEffect nativeSoundEffect)
|
||||
{
|
||||
return new NullSoundEffectInstance();
|
||||
}
|
||||
|
||||
public IDynamicSoundEffectInstance CreateDynamicSoundEffectInstance(int sampleRate, AudioChannels channels)
|
||||
{
|
||||
return new NullDynamicSoundEffectInstance();
|
||||
}
|
||||
|
||||
public IMicrophone CreateMicrophone(Microphone managedMicrophone)
|
||||
{
|
||||
return new NullMicrophone();
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<Microphone> GetAllMicrophones()
|
||||
{
|
||||
return new ReadOnlyCollection<Microphone>(new List<Microphone>());
|
||||
}
|
||||
|
||||
public int GetDefaultMicrophone(ReadOnlyCollection<Microphone> allMicrophones)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public ISong CreateSong(Song parentSong, Uri uri)
|
||||
{
|
||||
return new NullSong();
|
||||
}
|
||||
|
||||
public ISong CreateSong(Song parentSong, string filepath, int duration)
|
||||
{
|
||||
return new NullSong();
|
||||
}
|
||||
}
|
||||
}
|
52
SoundSystems/ANX.SoundSystem.Null/NullAudioEmitter.cs
Normal file
52
SoundSystems/ANX.SoundSystem.Null/NullAudioEmitter.cs
Normal file
@ -0,0 +1,52 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using ANX.Framework;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullAudioEmitter : IAudioEmitter
|
||||
{
|
||||
public NullAudioEmitter()
|
||||
{
|
||||
Forward = Vector3.Forward;
|
||||
Up = Vector3.Up;
|
||||
}
|
||||
|
||||
public float DopplerScale
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Forward
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Up
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Velocity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
46
SoundSystems/ANX.SoundSystem.Null/NullAudioListener.cs
Normal file
46
SoundSystems/ANX.SoundSystem.Null/NullAudioListener.cs
Normal file
@ -0,0 +1,46 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using ANX.Framework;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullAudioListener : IAudioListener
|
||||
{
|
||||
public NullAudioListener()
|
||||
{
|
||||
Forward = Vector3.Forward;
|
||||
Up = Vector3.Up;
|
||||
}
|
||||
|
||||
public Vector3 Forward
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Up
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vector3 Velocity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using ANX.Framework.Audio;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullDynamicSoundEffectInstance : IDynamicSoundEffectInstance
|
||||
{
|
||||
private SoundState state = SoundState.Stopped;
|
||||
|
||||
public event EventHandler<EventArgs> BufferNeeded;
|
||||
|
||||
public int PendingBufferCount
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public void SubmitBuffer(byte[] buffer)
|
||||
{
|
||||
}
|
||||
|
||||
public void SubmitBuffer(byte[] buffer, int offset, int count)
|
||||
{
|
||||
}
|
||||
|
||||
public bool IsLooped
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float Pan
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float Pitch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Framework.Audio.SoundState State
|
||||
{
|
||||
get { return state; }
|
||||
}
|
||||
|
||||
public float Volume
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
state = SoundState.Playing;
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
state = SoundState.Paused;
|
||||
}
|
||||
|
||||
public void Stop(bool immediate)
|
||||
{
|
||||
state = SoundState.Stopped;
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (state == SoundState.Paused)
|
||||
{
|
||||
state = SoundState.Playing;
|
||||
}
|
||||
}
|
||||
|
||||
public void Apply3D(Framework.Audio.AudioListener[] listeners, Framework.Audio.AudioEmitter emitter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
75
SoundSystems/ANX.SoundSystem.Null/NullMicrophone.cs
Normal file
75
SoundSystems/ANX.SoundSystem.Null/NullMicrophone.cs
Normal file
@ -0,0 +1,75 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using ANX.Framework.Audio;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullMicrophone : IMicrophone
|
||||
{
|
||||
private MicrophoneState state = MicrophoneState.Stopped;
|
||||
|
||||
public MicrophoneState State
|
||||
{
|
||||
get { return state; }
|
||||
}
|
||||
|
||||
public int SampleRate
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public bool IsHeadset
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public TimeSpan BufferDuration
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public event EventHandler<EventArgs> BufferReady;
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
state = MicrophoneState.Stopped;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
state = MicrophoneState.Started;
|
||||
}
|
||||
|
||||
public int GetSampleSizeInBytes(ref TimeSpan duration)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public TimeSpan GetSampleDuration(int sizeInBytes)
|
||||
{
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public int GetData(byte[] buffer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int GetData(byte[] buffer, int offset, int count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
69
SoundSystems/ANX.SoundSystem.Null/NullSong.cs
Normal file
69
SoundSystems/ANX.SoundSystem.Null/NullSong.cs
Normal file
@ -0,0 +1,69 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
using ANX.Framework.Media;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullSong : ISong
|
||||
{
|
||||
private MediaState state = Framework.Media.MediaState.Stopped;
|
||||
|
||||
public TimeSpan Duration
|
||||
{
|
||||
get { return TimeSpan.Zero; }
|
||||
}
|
||||
|
||||
public TimeSpan PlayPosition
|
||||
{
|
||||
get { return TimeSpan.Zero; }
|
||||
}
|
||||
|
||||
public MediaState State
|
||||
{
|
||||
get { return state; }
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
state = MediaState.Playing;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
state = MediaState.Stopped;
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
state = MediaState.Paused;
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (state == MediaState.Paused)
|
||||
{
|
||||
state = MediaState.Playing;
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
}
|
||||
|
||||
public void GetVisualizationData(VisualizationData data)
|
||||
{
|
||||
data = new VisualizationData();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
24
SoundSystems/ANX.SoundSystem.Null/NullSoundEffect.cs
Normal file
24
SoundSystems/ANX.SoundSystem.Null/NullSoundEffect.cs
Normal file
@ -0,0 +1,24 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullSoundEffect : ISoundEffect
|
||||
{
|
||||
public TimeSpan Duration
|
||||
{
|
||||
get { return TimeSpan.Zero; }
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
80
SoundSystems/ANX.SoundSystem.Null/NullSoundEffectInstance.cs
Normal file
80
SoundSystems/ANX.SoundSystem.Null/NullSoundEffectInstance.cs
Normal file
@ -0,0 +1,80 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA.SoundSystem;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Null
|
||||
{
|
||||
public class NullSoundEffectInstance : ISoundEffectInstance
|
||||
{
|
||||
private Framework.Audio.SoundState soundState = Framework.Audio.SoundState.Stopped;
|
||||
|
||||
public bool IsLooped
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float Pan
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public float Pitch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Framework.Audio.SoundState State
|
||||
{
|
||||
get
|
||||
{
|
||||
return soundState;
|
||||
}
|
||||
}
|
||||
|
||||
public float Volume
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
soundState = Framework.Audio.SoundState.Playing;
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
soundState = Framework.Audio.SoundState.Paused;
|
||||
}
|
||||
|
||||
public void Stop(bool immediate)
|
||||
{
|
||||
soundState = Framework.Audio.SoundState.Stopped;
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (soundState == Framework.Audio.SoundState.Paused)
|
||||
{
|
||||
soundState = Framework.Audio.SoundState.Playing;
|
||||
}
|
||||
}
|
||||
|
||||
public void Apply3D(Framework.Audio.AudioListener[] listeners, Framework.Audio.AudioEmitter emitter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
36
SoundSystems/ANX.SoundSystem.Null/Properties/AssemblyInfo.cs
Normal file
36
SoundSystems/ANX.SoundSystem.Null/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
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("ANX.SoundSystem.Null")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ANX.Framework Team")]
|
||||
[assembly: AssemblyProduct("ANX.SoundSystem.Null")]
|
||||
[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("2ba4e2e3-4df6-4941-8aca-244f3b48a3f8")]
|
||||
|
||||
// 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.*")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
35
SoundSystems/ANX.SoundSystem.Null/SupportedPlatformsImpl.cs
Normal file
35
SoundSystems/ANX.SoundSystem.Null/SupportedPlatformsImpl.cs
Normal file
@ -0,0 +1,35 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using ANX.Framework.NonXNA;
|
||||
|
||||
#endregion
|
||||
|
||||
// This file is part of the ANX.Framework created by the
|
||||
// "ANX.Framework developer group" and released under the Ms-PL license.
|
||||
// For details see: http://anxframework.codeplex.com/license
|
||||
|
||||
namespace ANX.SoundSystem.Windows.XAudio
|
||||
{
|
||||
public class SupportedPlatformsImpl : ISupportedPlatforms
|
||||
{
|
||||
public PlatformName[] Names
|
||||
{
|
||||
get
|
||||
{
|
||||
return new PlatformName[]
|
||||
{
|
||||
PlatformName.Android,
|
||||
PlatformName.IOS,
|
||||
PlatformName.Linux,
|
||||
PlatformName.MacOSX,
|
||||
PlatformName.PSVita,
|
||||
PlatformName.Windows7,
|
||||
PlatformName.WindowsXP,
|
||||
PlatformName.WindowsVista,
|
||||
PlatformName.Windows8,
|
||||
PlatformName.Windows8ModernUI,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user