Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
[Toolkit.Audio] Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Mar 25, 2014
1 parent 005d95c commit 3e71bc1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
5 changes: 0 additions & 5 deletions Samples/Toolkit/Desktop/Audio/Audio.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\..\SharpDX.targets" />
<ItemGroup>
<Reference Include="SharpDX.XAudio2">
<HintPath>$(SharpDXSdkBinDir)\SharpDX.XAudio2.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\Common\Audio\Content\TestBank.xwb">
<Link>Content\TestBank.xwb</Link>
Expand Down
5 changes: 0 additions & 5 deletions Samples/Toolkit/WP8/Audio/Audio.WP8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="SharpDX.XAudio2">
<HintPath>..\..\..\..\Bin\DirectX11_1-wp8-ARM\SharpDX.XAudio2.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<Import Project="..\..\..\..\SharpDX.targets" />
Expand Down
5 changes: 0 additions & 5 deletions Samples/Toolkit/WinRT/Audio/Audio.WinRT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Reference Include="SharpDX.XAudio2">
<HintPath>..\..\..\..\Bin\DirectX11_2-winrt\SharpDX.XAudio2.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions SharpDX.targets
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ It compiles all files of type ToolkitFxc/ToolkitFont
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SharpDXSdkBinDir)\SharpDX.Direct3D11.dll</HintPath>
</Reference>
<Reference Include="SharpDX.XAudio2.dll">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SharpDXSdkBinDir)\SharpDX.XAudio2.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DXGI">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(SharpDXSdkBinDir)\SharpDX.DXGI.dll</HintPath>
Expand Down
8 changes: 4 additions & 4 deletions Source/Toolkit/SharpDX.Toolkit.Audio/AudioManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ public override void Initialize()
throw new AudioException("Error creating XAudio device.", ex);
}

#if !WIN8METRO && !WP8 && !DIRECTX11_1
#if !W8CORE && !DIRECTX11_1
if (Device.DeviceCount == 0)
{
DisposeCore();
throw new AudioException("No default audio devices detected.");
}
#endif

#if WIN8METRO || WP8 || DIRECTX11_1
#if W8CORE || DIRECTX11_1
string deviceId = null;
#else
const int deviceId = 0;
Expand All @@ -481,7 +481,7 @@ public override void Initialize()
catch (SharpDXException ex)
{
DisposeCore();
#if WIN8METRO || WP8
#if W8CORE
if (ex.ResultCode == AudioManager.NotFound)
{
throw new AudioException("No default audio devices detected.");
Expand All @@ -495,7 +495,7 @@ public override void Initialize()

MasteringVoice.SetVolume(masterVolume);

#if WIN8METRO || WP8 || DIRECTX11_1
#if W8CORE || DIRECTX11_1
Speakers = (Speakers)MasteringVoice.ChannelMask;
#else
var deviceDetails = Device.GetDeviceDetails(deviceId);
Expand Down

0 comments on commit 3e71bc1

Please sign in to comment.