diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj index 6ba9bfcf..362392f4 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_Linux.csproj @@ -32,6 +32,7 @@ + @@ -102,6 +103,7 @@ + @@ -142,6 +144,7 @@ + @@ -172,7 +175,6 @@ - diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj index 37f52611..e1a83298 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline_PSVita.csproj @@ -32,6 +32,7 @@ + @@ -103,6 +104,7 @@ + @@ -143,6 +145,7 @@ + @@ -173,7 +176,6 @@ - diff --git a/ANX.Framework.sln b/ANX.Framework.sln index a85f78ee..5d7c168d 100644 --- a/ANX.Framework.sln +++ b/ANX.Framework.sln @@ -177,6 +177,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.InputDevices.PsVita", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.SoundSystem.PsVita", "SoundSystems\ANX.SoundSystem.PsVita\ANX.SoundSystem.PsVita.csproj", "{E2EE2D12-A98E-4C21-AFFA-35F48D2B2A94}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AudioSample", "Samples\AudioSample\AudioSample.csproj", "{4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -677,6 +679,16 @@ Global {E2EE2D12-A98E-4C21-AFFA-35F48D2B2A94}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {E2EE2D12-A98E-4C21-AFFA-35F48D2B2A94}.Release|Mixed Platforms.Build.0 = Release|Any CPU {E2EE2D12-A98E-4C21-AFFA-35F48D2B2A94}.Release|x86.ActiveCfg = Release|Any CPU + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Debug|Any CPU.ActiveCfg = Debug|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Debug|x86.ActiveCfg = Debug|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Debug|x86.Build.0 = Debug|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Release|Any CPU.ActiveCfg = Release|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Release|Mixed Platforms.Build.0 = Release|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Release|x86.ActiveCfg = Release|x86 + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -711,6 +723,7 @@ Global {EFC485F7-3E0A-40AB-B79D-E07FE86FC386} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {ED081799-AB02-4793-96F8-F9EA7F3192E3} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {160150D5-38E6-482D-97F5-2624F322A854} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} + {4A048A8C-C31D-4FC8-AAF3-C387B9E0309B} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} diff --git a/ANX.Framework/ANX.Framework.csproj b/ANX.Framework/ANX.Framework.csproj index 13fb5572..34a146ef 100644 --- a/ANX.Framework/ANX.Framework.csproj +++ b/ANX.Framework/ANX.Framework.csproj @@ -98,6 +98,7 @@ + @@ -502,9 +503,7 @@ - - - + + \ No newline at end of file diff --git a/Samples/AudioSample/Game.ico b/Samples/AudioSample/Game.ico new file mode 100644 index 00000000..8cff41ea Binary files /dev/null and b/Samples/AudioSample/Game.ico differ diff --git a/Samples/AudioSample/Game1.cs b/Samples/AudioSample/Game1.cs new file mode 100644 index 00000000..302b7fdd --- /dev/null +++ b/Samples/AudioSample/Game1.cs @@ -0,0 +1,58 @@ +using System; +using ANX.Framework; +using ANX.Framework.Audio; + +// 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 AudioSample +{ + public class Game1 : Game + { + GraphicsDeviceManager graphics; + SoundEffect sound; + + float timer; + float duration; + + public Game1() + { + graphics = new GraphicsDeviceManager(this); + Content.RootDirectory = "SampleContent"; + } + + protected override void Initialize() + { + base.Initialize(); + } + + protected override void LoadContent() + { + sound = Content.Load("Sounds\\testsound"); + timer = duration = (float)sound.Duration.TotalSeconds; + } + + protected override void UnloadContent() + { + } + + protected override void Update(GameTime gameTime) + { + timer += (float)gameTime.ElapsedGameTime.TotalSeconds; + if (timer >= duration) + { + timer -= duration; + sound.Play(); + } + + base.Update(gameTime); + } + + protected override void Draw(GameTime gameTime) + { + GraphicsDevice.Clear(Color.CornflowerBlue); + base.Draw(gameTime); + } + } +} diff --git a/Samples/AudioSample/GameThumbnail.png b/Samples/AudioSample/GameThumbnail.png new file mode 100644 index 00000000..462311ab Binary files /dev/null and b/Samples/AudioSample/GameThumbnail.png differ diff --git a/Samples/AudioSample/Program.cs b/Samples/AudioSample/Program.cs new file mode 100644 index 00000000..903a8bcb --- /dev/null +++ b/Samples/AudioSample/Program.cs @@ -0,0 +1,20 @@ +using System; + +// 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 AudioSample +{ + static class Program + { + static void Main(string[] args) + { + using (Game1 game = new Game1()) + { + game.Run(); + } + } + } +} + diff --git a/Samples/AudioSample/Properties/AssemblyInfo.cs b/Samples/AudioSample/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..6d77f04a --- /dev/null +++ b/Samples/AudioSample/Properties/AssemblyInfo.cs @@ -0,0 +1,34 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AudioSample")] +[assembly: AssemblyProduct("AudioSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("ANX.Framework Team")] +[assembly: AssemblyCopyright("Copyright © ANX.Framework Team 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. Only Windows +// assemblies support COM. +[assembly: ComVisible(false)] + +// On Windows, the following GUID is for the ID of the typelib if this +// project is exposed to COM. On other platforms, it unique identifies the +// title storage container when deploying this assembly to the device. +[assembly: Guid("674b3101-ca72-41a5-ab23-a756f2013299")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] diff --git a/Samples/SampleCatalog.xml b/Samples/SampleCatalog.xml index b3ff6664..3c036e77 100644 --- a/Samples/SampleCatalog.xml +++ b/Samples/SampleCatalog.xml @@ -149,6 +149,16 @@ + + AudioSample + A sample playing a SoundEffect over and over again + AudioSample\bin\x86\Debug\AudioSample.exe + Rendering + + Forms + + + diff --git a/Samples/SampleContent/SampleContent.contentproj b/Samples/SampleContent/SampleContent.contentproj index 3ff752e1..b3bb477b 100644 --- a/Samples/SampleContent/SampleContent.contentproj +++ b/Samples/SampleContent/SampleContent.contentproj @@ -127,6 +127,13 @@ DX10_HLSL + + + testsound + WavImporter + SoundEffectProcessor + +