From 8bc4462157cb94741382ec8612ba344922b8517d Mon Sep 17 00:00:00 2001 From: Amer Koleci Date: Thu, 6 Apr 2023 14:40:17 +0200 Subject: [PATCH] Audio: Welcome XAudio2 support. --- Directory.Build.props | 2 +- Vortice.Win32.sln | 6 + src/Generator/Program.cs | 46 +- .../win32json/api/Media.Audio.XAudio2.json | 3267 +++++++++++++++++ .../Graphics.Direct3D.Dxc.Structs.cs | 2 +- src/Vortice.Win32.Media.Audio.XAudio2/Apis.cs | 184 + .../Generated/IXAPO.cs | 242 ++ .../Generated/IXAPOHrtfParameters.cs | 152 + .../Generated/IXAPOParameters.cs | 122 + .../Generated/IXAudio2.cs | 242 ++ .../Generated/IXAudio2EngineCallback.cs | 66 + .../Generated/IXAudio2Extension.cs | 122 + .../Generated/IXAudio2MasteringVoice.cs | 266 ++ .../Generated/IXAudio2SourceVoice.cs | 401 ++ .../Generated/IXAudio2SubmixVoice.cs | 252 ++ .../Generated/IXAudio2Voice.cs | 306 ++ .../Generated/IXAudio2VoiceCallback.cs | 126 + .../Media.Audio.XAudio2.Apis.Functions.cs | 33 + .../Generated/Media.Audio.XAudio2.Apis.cs | 462 +++ .../Generated/Media.Audio.XAudio2.Enums.cs | 93 + .../Generated/Media.Audio.XAudio2.Structs.cs | 584 +++ .../Vortice.Win32.Media.Audio.XAudio2.csproj | 24 + .../XAudio2.xml | 773 ++++ src/Vortice.Win32/Media/Audio/ADPCMCoefSet.cs | 13 + .../Media/Audio/ADPCMWaveFormat.cs | 40 + .../Media/Audio/AudioStreamCategory.cs | 23 + .../Media/Audio/PCMWaveFormat.cs | 14 + src/Vortice.Win32/Media/Audio/WaveFormat.cs | 24 + src/Vortice.Win32/Media/Audio/WaveFormatEx.cs | 30 + .../Media/Audio/WaveFormatExtensible.cs | 35 + src/Vortice.Win32/Properties/AssemblyInfo.cs | 1 + .../01-ClearScreen/01-ClearScreen.csproj | 1 + 32 files changed, 7950 insertions(+), 4 deletions(-) create mode 100644 src/Generator/win32json/api/Media.Audio.XAudio2.json create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Apis.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPO.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOHrtfParameters.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOParameters.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2EngineCallback.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Extension.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2MasteringVoice.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SourceVoice.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SubmixVoice.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Voice.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2VoiceCallback.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.Functions.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Enums.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Structs.cs create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/Vortice.Win32.Media.Audio.XAudio2.csproj create mode 100644 src/Vortice.Win32.Media.Audio.XAudio2/XAudio2.xml create mode 100644 src/Vortice.Win32/Media/Audio/ADPCMCoefSet.cs create mode 100644 src/Vortice.Win32/Media/Audio/ADPCMWaveFormat.cs create mode 100644 src/Vortice.Win32/Media/Audio/AudioStreamCategory.cs create mode 100644 src/Vortice.Win32/Media/Audio/PCMWaveFormat.cs create mode 100644 src/Vortice.Win32/Media/Audio/WaveFormat.cs create mode 100644 src/Vortice.Win32/Media/Audio/WaveFormatEx.cs create mode 100644 src/Vortice.Win32/Media/Audio/WaveFormatExtensible.cs diff --git a/Directory.Build.props b/Directory.Build.props index 0d3f149..dddf0c5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ true $(MSBuildThisFileDirectory)NuGet.config - 1.9.20 + 1.9.21 true diff --git a/Vortice.Win32.sln b/Vortice.Win32.sln index 4450cef..7ddbb54 100644 --- a/Vortice.Win32.sln +++ b/Vortice.Win32.sln @@ -44,6 +44,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vortice.Win32.Graphics.Dire EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vortice.Win32.Graphics.DirectComposition", "src\Vortice.Win32.Graphics.DirectComposition\Vortice.Win32.Graphics.DirectComposition.csproj", "{F7EBB80F-26EA-4C64-9454-C087BBC43549}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vortice.Win32.Media.Audio.XAudio2", "src\Vortice.Win32.Media.Audio.XAudio2\Vortice.Win32.Media.Audio.XAudio2.csproj", "{6458F6C9-12ED-407E-A91D-9F155362E8E9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -102,6 +104,10 @@ Global {F7EBB80F-26EA-4C64-9454-C087BBC43549}.Debug|Any CPU.Build.0 = Debug|Any CPU {F7EBB80F-26EA-4C64-9454-C087BBC43549}.Release|Any CPU.ActiveCfg = Release|Any CPU {F7EBB80F-26EA-4C64-9454-C087BBC43549}.Release|Any CPU.Build.0 = Release|Any CPU + {6458F6C9-12ED-407E-A91D-9F155362E8E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6458F6C9-12ED-407E-A91D-9F155362E8E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6458F6C9-12ED-407E-A91D-9F155362E8E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6458F6C9-12ED-407E-A91D-9F155362E8E9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index 652570d..a0606aa 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -31,7 +31,7 @@ public static class Program // Media //"Media.Audio.json", - //"Media.Audio.XAudio2.json", + "Media.Audio.XAudio2.json", }; private static readonly Dictionary s_csNameMappings = new() @@ -127,6 +127,10 @@ public static class Program { "Graphics.Direct3D11.D3D11_VIEWPORT", "Viewport" }, { "Graphics.Direct3D12.D3D12_VIEWPORT", "Viewport" }, + // Media + { "Media.Audio.AUDIO_STREAM_CATEGORY", "Media.Audio.AudioStreamCategory" }, + { "Media.Audio.WAVEFORMATEX", "Media.Audio.WaveFormatEx" }, + // TODO: Understand those -> { "Foundation.RECT", "Rect" }, { "Foundation.RECTL", "Rect" }, @@ -216,6 +220,7 @@ public static class Program { "SAT", "Saturate" }, { "INV", "Inverse" }, { "REV", "Reverse" }, + { "XAUDIO2FX", "FX" }, }; private static readonly HashSet s_partRenamesSet = new(StringComparer.OrdinalIgnoreCase) @@ -733,6 +738,22 @@ public static class Program "ShaderCacheClear", "VideoExtensionCommand", "VideoMotionEstimator", + "LockForProcess", + "FxMasteringLimiter", + "FxReverb", + "FxEcho", + "InitData", + "VolumeMeter", + "HrtfDirectivityType", + "HrtfEnvironment", + "HrtfDistanceDecayType", + "HrtfPosition", + "HrtfOrientation", + "HrtfDirectivity", + "HrtfDirectivityCardioid", + "HrtfDirectivityCone", + "HrtfDistanceDecay", + "HrtfApoInit", }; private static readonly HashSet s_preserveCaps = new(StringComparer.OrdinalIgnoreCase) @@ -768,6 +789,9 @@ public static class Program "HDR", "DC", "XNA", + "XAPO", + "FXEQ", + "I3DL2", }; private static readonly Dictionary s_knownTypesPrefixes = new() @@ -874,6 +898,10 @@ public static class Program { "D2D1_BUFFER_PRECISION_16BPC_UNORM", "Precision16BitUnorm" }, { "D2D1_BUFFER_PRECISION_16BPC_FLOAT", "Precision16BitFloat" }, { "D2D1_BUFFER_PRECISION_32BPC_FLOAT", "Precision32BitFloat" }, + + // XAudio2 + { "XAPO_BUFFER_SILENT", "Silent" }, + { "XAPO_BUFFER_VALID", "Valid" }, }; private static readonly Dictionary s_generatedEnums = new() @@ -910,6 +938,7 @@ public static class Program "D3DCOMPILER", "DCOMPOSITION", "D3DADAPTER", + "XAUDIO2", }; private static readonly HashSet s_ignoredParts = new(StringComparer.OrdinalIgnoreCase) @@ -1022,6 +1051,7 @@ public static class Program { "D3D12_RENDER_TARGET_BLEND_DESC::RenderTargetWriteMask", "D3D12_COLOR_WRITE_ENABLE" }, // Dxc + { "DxcBuffer::Encoding", "DXC_CP" }, { "DxcShaderHash::Flags", "DXC_HASHFLAG" }, }; @@ -1115,6 +1145,7 @@ public static class Program string dxcPath = Path.Combine(new DirectoryInfo(repoRoot).Parent.FullName, "Vortice.Win32.Graphics.Direct3D.Dxc"); string fxcPath = Path.Combine(new DirectoryInfo(repoRoot).Parent.FullName, "Vortice.Win32.Graphics.Direct3D.Fxc"); string directCompositionPath = Path.Combine(new DirectoryInfo(repoRoot).Parent.FullName, "Vortice.Win32.Graphics.DirectComposition"); + string XAudio2Path = Path.Combine(new DirectoryInfo(repoRoot).Parent.FullName, "Vortice.Win32.Media.Audio.XAudio2"); // Generate docs //DocGenerator.Generate(new[] { "DXGI" }, Path.Combine(repoRoot, "Generated", "Graphics", "Dxgi.xml")); @@ -1127,6 +1158,7 @@ public static class Program //DocGenerator.Generate(new[] { "D3D11" }, Path.Combine(d3d11Path, "Direct3D11.xml")); //DocGenerator.Generate(new[] { "D3D12" }, Path.Combine(d3d12Path, "Direct3D12.xml")); //DocGenerator.Generate(new[] { "DComposition" }, Path.Combine(directCompositionPath, "DirectComposition.xml")); + //DocGenerator.Generate(new[] { "XAudio2" }, Path.Combine(XAudio2Path, "XAudio2.xml")); foreach (string jsonFile in jsons) { @@ -1199,6 +1231,11 @@ public static class Program outputPath = d3d9Path; useSubFolders = false; } + else if (jsonFile == "Media.Audio.XAudio2.json") + { + outputPath = XAudio2Path; + useSubFolders = false; + } outputPath = Path.Combine(outputPath, "Generated"); @@ -1268,6 +1305,10 @@ public static class Program { docFile = $"../Vortice.Win32/Generated/Graphics/Direct3D"; } + else if (jsonFile == "Media.Audio.XAudio2.json") + { + docFile = "XAudio2"; + } string apiName = ns; string apiFolder; @@ -1809,7 +1850,8 @@ public static class Program && !enumType.Name.StartsWith("D3D11_") && !enumType.Name.StartsWith("D3D12_") && !enumType.Name.StartsWith("D3DCOMPILER_") - && !enumType.Name.StartsWith("D3DCOMPILE")) + && !enumType.Name.StartsWith("D3DCOMPILE") + && !enumType.Name.StartsWith("XAUDIO2_")) { csTypeName = enumType.Name.Substring(3); skipPrettify = true; diff --git a/src/Generator/win32json/api/Media.Audio.XAudio2.json b/src/Generator/win32json/api/Media.Audio.XAudio2.json new file mode 100644 index 0000000..b36142c --- /dev/null +++ b/src/Generator/win32json/api/Media.Audio.XAudio2.json @@ -0,0 +1,3267 @@ +{ + +"Constants":[ + { + "Name":"FXEQ_MIN_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":22000 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MAX_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":48000 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MIN_FREQUENCY_CENTER" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MAX_FREQUENCY_CENTER" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20000 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_FREQUENCY_CENTER_0" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_FREQUENCY_CENTER_1" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":800 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_FREQUENCY_CENTER_2" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":2000 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_FREQUENCY_CENTER_3" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":10000 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MIN_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.126 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MAX_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":7.94 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MIN_BANDWIDTH" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.1 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_MAX_BANDWIDTH" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"FXEQ_DEFAULT_BANDWIDTH" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_MIN_RELEASE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_MAX_RELEASE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_DEFAULT_RELEASE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":6 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_MIN_LOUDNESS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_MAX_LOUDNESS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1800 + ,"Attrs":[] + } + ,{ + "Name":"FXMASTERINGLIMITER_DEFAULT_LOUDNESS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1000 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_MIN_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_MAX_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_DEFAULT_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.9 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_MIN_ROOMSIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.0001 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_MAX_ROOMSIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXREVERB_DEFAULT_ROOMSIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.6 + ,"Attrs":[] + } + ,{ + "Name":"FXLOUDNESS_DEFAULT_MOMENTARY_MS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":400 + ,"Attrs":[] + } + ,{ + "Name":"FXLOUDNESS_DEFAULT_SHORTTERM_MS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":3000 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MIN_WETDRYMIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MAX_WETDRYMIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_DEFAULT_WETDRYMIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.5 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MIN_FEEDBACK" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MAX_FEEDBACK" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_DEFAULT_FEEDBACK" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.5 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MIN_DELAY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_MAX_DELAY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":2000 + ,"Attrs":[] + } + ,{ + "Name":"FXECHO_DEFAULT_DELAY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":500 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DLL_A" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DLL_W" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2D_DLL_A" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9d.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2D_DLL_W" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9d.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DLL" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2D_DLL" + ,"Type":{"Kind":"Native","Name":"String"} + ,"ValueType":"String" + ,"Value":"xaudio2_9d.dll" + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_BUFFER_BYTES" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2147483648 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_QUEUED_BUFFERS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_BUFFERS_SYSTEM" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_AUDIO_CHANNELS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MIN_SAMPLE_RATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_SAMPLE_RATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":200000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_VOLUME_LEVEL" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":16777216 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_FREQ_RATIO" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1024 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_FREQ_RATIO" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_FILTER_ONEOVERQ" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1.5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_FILTER_FREQUENCY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_LOOP_COUNT" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":254 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_INSTANCES" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":600000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":300000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_COMMIT_NOW" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_COMMIT_ALL" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_NO_LOOP_REGION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOOP_INFINITE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":255 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_CHANNELS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_SAMPLERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEBUG_ENGINE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_VOICE_NOPITCH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_VOICE_NOSRC" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_VOICE_USEFILTER" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_PLAY_TAILS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_END_OF_STREAM" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_SEND_USEFILTER" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":128 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_VOICE_NOSAMPLESPLAYED" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":256 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_STOP_ENGINE_WHEN_IDLE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8192 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_1024_QUANTUM" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32768 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":65536 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_FILTER_FREQUENCY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_FILTER_ONEOVERQ" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_QUANTUM_NUMERATOR" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_QUANTUM_DENOMINATOR" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"FACILITY_XAUDIO2" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2198 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_E_INVALID_CALL" + ,"Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ValueType":"Int32" + ,"Value":-2003435519 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_E_XMA_DECODER_ERROR" + ,"Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ValueType":"Int32" + ,"Value":-2003435518 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_E_XAPO_CREATION_FAILED" + ,"Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ValueType":"Int32" + ,"Value":-2003435517 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_E_DEVICE_INVALIDATED" + ,"Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ValueType":"Int32" + ,"Value":-2003435516 + ,"Attrs":[] + } + ,{ + "Name":"Processor1" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"Processor2" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"Processor3" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"Processor4" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"Processor5" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16 + ,"Attrs":[] + } + ,{ + "Name":"Processor6" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32 + ,"Attrs":[] + } + ,{ + "Name":"Processor7" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"Processor8" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":128 + ,"Attrs":[] + } + ,{ + "Name":"Processor9" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":256 + ,"Attrs":[] + } + ,{ + "Name":"Processor10" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":512 + ,"Attrs":[] + } + ,{ + "Name":"Processor11" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1024 + ,"Attrs":[] + } + ,{ + "Name":"Processor12" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2048 + ,"Attrs":[] + } + ,{ + "Name":"Processor13" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4096 + ,"Attrs":[] + } + ,{ + "Name":"Processor14" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8192 + ,"Attrs":[] + } + ,{ + "Name":"Processor15" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16384 + ,"Attrs":[] + } + ,{ + "Name":"Processor16" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32768 + ,"Attrs":[] + } + ,{ + "Name":"Processor17" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":65536 + ,"Attrs":[] + } + ,{ + "Name":"Processor18" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":131072 + ,"Attrs":[] + } + ,{ + "Name":"Processor19" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":262144 + ,"Attrs":[] + } + ,{ + "Name":"Processor20" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":524288 + ,"Attrs":[] + } + ,{ + "Name":"Processor21" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1048576 + ,"Attrs":[] + } + ,{ + "Name":"Processor22" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2097152 + ,"Attrs":[] + } + ,{ + "Name":"Processor23" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4194304 + ,"Attrs":[] + } + ,{ + "Name":"Processor24" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8388608 + ,"Attrs":[] + } + ,{ + "Name":"Processor25" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16777216 + ,"Attrs":[] + } + ,{ + "Name":"Processor26" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":33554432 + ,"Attrs":[] + } + ,{ + "Name":"Processor27" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":67108864 + ,"Attrs":[] + } + ,{ + "Name":"Processor28" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":134217728 + ,"Attrs":[] + } + ,{ + "Name":"Processor29" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":268435456 + ,"Attrs":[] + } + ,{ + "Name":"Processor30" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":536870912 + ,"Attrs":[] + } + ,{ + "Name":"Processor31" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1073741824 + ,"Attrs":[] + } + ,{ + "Name":"Processor32" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2147483648 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_ANY_PROCESSOR" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4294967295 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_USE_DEFAULT_PROCESSOR" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_DEFAULT_PROCESSOR" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_ERRORS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_WARNINGS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_INFO" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_DETAIL" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_API_CALLS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_FUNC_CALLS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_TIMING" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_LOCKS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":128 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_MEMORY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":256 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2_LOG_STREAMING" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4096 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":20000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":48000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_WET_DRY_MIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_REFLECTIONS_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_REVERB_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_7POINT1_SIDE_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_7POINT1_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_POSITION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_LOW_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_LOW_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_HIGH_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_HIGH_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_ROOM_FILTER_FREQ" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_ROOM_FILTER_MAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":-100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_ROOM_FILTER_HF" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":-100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_REFLECTIONS_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":-100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_REVERB_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":-100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_DECAY_TIME" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_DENSITY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MIN_ROOM_SIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_WET_DRY_MIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_REFLECTIONS_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":300 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_REVERB_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":85 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_7POINT1_SIDE_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_7POINT1_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_POSITION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":30 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":15 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_LOW_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":12 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_LOW_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":9 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_HIGH_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_HIGH_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":14 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_ROOM_FILTER_FREQ" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_ROOM_FILTER_MAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_ROOM_FILTER_HF" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_REFLECTIONS_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_REVERB_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_DENSITY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_MAX_ROOM_SIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_WET_DRY_MIX" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_REVERB_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_7POINT1_SIDE_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":5 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_7POINT1_REAR_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_POSITION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":6 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_POSITION_MATRIX" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":27 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_EARLY_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_LATE_DIFFUSION" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_GAIN" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_CUTOFF" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_FREQ" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":5000 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_MAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_HF" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_REVERB_GAIN" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_DECAY_TIME" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_DENSITY" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_ROOM_SIZE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":100 + ,"Attrs":[] + } + ,{ + "Name":"XAUDIO2FX_REVERB_DEFAULT_DISABLE_LATE_FIELD" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":0 + ,"Attrs":[] + } + ,{ + "Name":"HRTF_MAX_GAIN_LIMIT" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":12 + ,"Attrs":[] + } + ,{ + "Name":"HRTF_MIN_GAIN_LIMIT" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":-96 + ,"Attrs":[] + } + ,{ + "Name":"HRTF_MIN_UNITY_GAIN_DISTANCE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":0.05 + ,"Attrs":[] + } + ,{ + "Name":"HRTF_DEFAULT_UNITY_GAIN_DISTANCE" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"FACILITY_XAPO" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2199 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_E_FORMAT_UNSUPPORTED" + ,"Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ValueType":"Int32" + ,"Value":-2003369983 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_MIN_CHANNELS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_MAX_CHANNELS" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_MIN_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1000 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_MAX_FRAMERATE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":200000 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_REGISTRATION_STRING_LENGTH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":256 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_CHANNELS_MUST_MATCH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_FRAMERATE_MUST_MATCH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_BUFFERCOUNT_MUST_MATCH" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_INPLACE_REQUIRED" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32 + ,"Attrs":[] + } + ,{ + "Name":"XAPO_FLAG_INPLACE_SUPPORTED" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16 + ,"Attrs":[] + } + ,{ + "Name":"SPEAKER_MONO" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_HANDLE_BYTESIZE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":20 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_PI" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":3.1415927 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_2PI" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":6.2831855 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_SPEED_OF_SOUND" + ,"Type":{"Kind":"Native","Name":"Single"} + ,"ValueType":"Single" + ,"Value":343.5 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_MATRIX" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":1 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_DELAY" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":2 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_LPF_DIRECT" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":4 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_LPF_REVERB" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":8 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_REVERB" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":16 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_DOPPLER" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":32 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_EMITTER_ANGLE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":64 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_ZEROCENTER" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":65536 + ,"Attrs":[] + } + ,{ + "Name":"X3DAUDIO_CALCULATE_REDIRECT_TO_LFE" + ,"Type":{"Kind":"Native","Name":"UInt32"} + ,"ValueType":"UInt32" + ,"Value":131072 + ,"Attrs":[] + } +] + +,"Types":[ + { + "Name":"XAPO_REGISTRATION_PROPERTIES" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"clsid","Type":{"Kind":"Native","Name":"Guid"},"Attrs":[]} + ,{"Name":"FriendlyName","Type":{"Kind":"Array","Shape":{"Size":256},"Child":{"Kind":"Native","Name":"Char"}},"Attrs":[]} + ,{"Name":"CopyrightInfo","Type":{"Kind":"Array","Shape":{"Size":256},"Child":{"Kind":"Native","Name":"Char"}},"Attrs":[]} + ,{"Name":"MajorVersion","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MinorVersion","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MinInputBufferCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MaxInputBufferCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MinOutputBufferCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MaxOutputBufferCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAPO_LOCKFORPROCESS_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["Const"]} + ,{"Name":"MaxFrameCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAPO_BUFFER_FLAGS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Enum" + ,"Flags":false + ,"Scoped":false + ,"Values":[ + {"Name":"XAPO_BUFFER_SILENT","Value":0} + ,{"Name":"XAPO_BUFFER_VALID","Value":1} + ] + ,"IntegerBase":"Int32" + } + ,{ + "Name":"XAPO_PROCESS_BUFFER_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pBuffer","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":[]} + ,{"Name":"BufferFlags","Type":{"Kind":"ApiRef","Name":"XAPO_BUFFER_FLAGS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"ValidFrameCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"IXAPO" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":"a410b984-9839-4819-a0be-2856ae6b3adb" + ,"Interface":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]} + ,"Methods":[ + { + "Name":"GetRegistrationProperties" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppRegistrationProperties","Type":{"Kind":"PointerTo","Child":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAPO_REGISTRATION_PROPERTIES","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"IsInputFormatSupported" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pOutputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"pRequestedInputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"ppSupportedInputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}}},"Attrs":["Out","Optional"]} + ] + } + ,{ + "Name":"IsOutputFormatSupported" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pInputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"pRequestedOutputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"ppSupportedOutputFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}}},"Attrs":["Out","Optional"]} + ] + } + ,{ + "Name":"Initialize" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pData","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In",{"Kind":"MemorySize","BytesParamIndex":1},"Optional","Const"]} + ,{"Name":"DataByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"Reset" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"LockForProcess" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"InputLockedParameterCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pInputLockedParameters","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":0,"Child":{"Kind":"ApiRef","Name":"XAPO_LOCKFORPROCESS_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"OutputLockedParameterCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pOutputLockedParameters","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":2,"Child":{"Kind":"ApiRef","Name":"XAPO_LOCKFORPROCESS_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"UnlockForProcess" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"Process" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"InputProcessParameterCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pInputProcessParameters","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":0,"Child":{"Kind":"ApiRef","Name":"XAPO_PROCESS_BUFFER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"OutputProcessParameterCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pOutputProcessParameters","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":2,"Child":{"Kind":"ApiRef","Name":"XAPO_PROCESS_BUFFER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Out","Optional"]} + ,{"Name":"IsEnabled","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":["In"]} + ] + } + ,{ + "Name":"CalcInputFrames" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"UInt32"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"OutputFrameCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"CalcOutputFrames" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"UInt32"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"InputFrameCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ] + } + ,{ + "Name":"IXAPOParameters" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":"26d95c66-80f2-499a-ad54-5ae7f01c6d98" + ,"Interface":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]} + ,"Methods":[ + { + "Name":"SetParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In",{"Kind":"MemorySize","BytesParamIndex":1},"Const"]} + ,{"Name":"ParameterByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["Out",{"Kind":"MemorySize","BytesParamIndex":1}]} + ,{"Name":"ParameterByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ] + } + ,{ + "Name":"FXEQ" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"f5e01117-d6c4-485a-a3f5-695196f3dbfa" + } + ,{ + "Name":"FXMasteringLimiter" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"c4137916-2be1-46fd-8599-441536f49856" + } + ,{ + "Name":"FXReverb" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"7d9aca56-cb68-4807-b632-b137352e8596" + } + ,{ + "Name":"FXEcho" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"5039d740-f736-449a-84d3-a56202557b87" + } + ,{ + "Name":"FXEQ_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"FrequencyCenter0","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Gain0","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Bandwidth0","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"FrequencyCenter1","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Gain1","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Bandwidth1","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"FrequencyCenter2","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Gain2","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Bandwidth2","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"FrequencyCenter3","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Gain3","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Bandwidth3","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"FXMASTERINGLIMITER_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"Release","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"Loudness","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"FXREVERB_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"Diffusion","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"RoomSize","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"FXECHO_INITDATA" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"MaxDelay","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"FXECHO_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"WetDryMix","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Feedback","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Delay","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_VOICE_DETAILS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"CreationFlags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveFlags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"InputChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"InputSampleRate","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_SEND_DESCRIPTOR" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"pOutputVoice","Type":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_VOICE_SENDS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"SendCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"pSends","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_SEND_DESCRIPTOR","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_EFFECT_DESCRIPTOR" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pEffect","Type":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]},"Attrs":[]} + ,{"Name":"InitialState","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ,{"Name":"OutputChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_EFFECT_CHAIN" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"EffectCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"pEffectDescriptors","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_EFFECT_DESCRIPTOR","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_FILTER_TYPE" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Enum" + ,"Flags":false + ,"Scoped":false + ,"Values":[ + {"Name":"LowPassFilter","Value":0} + ,{"Name":"BandPassFilter","Value":1} + ,{"Name":"HighPassFilter","Value":2} + ,{"Name":"NotchFilter","Value":3} + ,{"Name":"LowPassOnePoleFilter","Value":4} + ,{"Name":"HighPassOnePoleFilter","Value":5} + ] + ,"IntegerBase":"Int32" + } + ,{ + "Name":"XAUDIO2_FILTER_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"Type","Type":{"Kind":"ApiRef","Name":"XAUDIO2_FILTER_TYPE","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"Frequency","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"OneOverQ","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_BUFFER" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"AudioBytes","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"pAudioData","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Byte"}},"Attrs":["Const"]} + ,{"Name":"PlayBegin","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"PlayLength","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"LoopBegin","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"LoopLength","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"LoopCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"pContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_BUFFER_WMA" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pDecodedPacketCumulativeBytes","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"UInt32"}},"Attrs":["Const"]} + ,{"Name":"PacketCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_VOICE_STATE" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pCurrentBufferContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":[]} + ,{"Name":"BuffersQueued","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"SamplesPlayed","Type":{"Kind":"Native","Name":"UInt64"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_PERFORMANCE_DATA" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"AudioCyclesSinceLastQuery","Type":{"Kind":"Native","Name":"UInt64"},"Attrs":[]} + ,{"Name":"TotalCyclesSinceLastQuery","Type":{"Kind":"Native","Name":"UInt64"},"Attrs":[]} + ,{"Name":"MinimumCyclesPerQuantum","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MaximumCyclesPerQuantum","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"MemoryUsageInBytes","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"CurrentLatencyInSamples","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"GlitchesSinceEngineStarted","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveSourceVoiceCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"TotalSourceVoiceCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveSubmixVoiceCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveResamplerCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveMatrixMixCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveXmaSourceVoices","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ActiveXmaStreams","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2_DEBUG_CONFIGURATION" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"TraceMask","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"BreakMask","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"LogThreadID","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ,{"Name":"LogFileline","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ,{"Name":"LogFunctionName","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ,{"Name":"LogTiming","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"IXAudio2" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":"2b02e3cf-2e0b-4ec3-be45-1b2a3fe7210d" + ,"Interface":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]} + ,"Methods":[ + { + "Name":"RegisterForCallbacks" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pCallback","Type":{"Kind":"ApiRef","Name":"IXAudio2EngineCallback","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In"]} + ] + } + ,{ + "Name":"UnregisterForCallbacks" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pCallback","Type":{"Kind":"ApiRef","Name":"IXAudio2EngineCallback","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In"]} + ] + } + ,{ + "Name":"CreateSourceVoice" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppSourceVoice","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IXAudio2SourceVoice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"pSourceFormat","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"WAVEFORMATEX","TargetKind":"Default","Api":"Media.Audio","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"MaxFrequencyRatio","Type":{"Kind":"Native","Name":"Single"},"Attrs":["In"]} + ,{"Name":"pCallback","Type":{"Kind":"ApiRef","Name":"IXAudio2VoiceCallback","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In","Optional"]} + ,{"Name":"pSendList","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_VOICE_SENDS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"pEffectChain","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_EFFECT_CHAIN","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"CreateSubmixVoice" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppSubmixVoice","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IXAudio2SubmixVoice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"InputChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"InputSampleRate","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"ProcessingStage","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pSendList","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_VOICE_SENDS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"pEffectChain","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_EFFECT_CHAIN","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"CreateMasteringVoice" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppMasteringVoice","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IXAudio2MasteringVoice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"InputChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"InputSampleRate","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"szDeviceId","Type":{"Kind":"ApiRef","Name":"PWSTR","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":["In","Optional","Const"]} + ,{"Name":"pEffectChain","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_EFFECT_CHAIN","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"StreamCategory","Type":{"Kind":"ApiRef","Name":"AUDIO_STREAM_CATEGORY","TargetKind":"Default","Api":"Media.Audio","Parents":[]},"Attrs":["In"]} + ] + } + ,{ + "Name":"StartEngine" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"StopEngine" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"CommitChanges" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetPerformanceData" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pPerfData","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_PERFORMANCE_DATA","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetDebugConfiguration" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pDebugConfiguration","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_DEBUG_CONFIGURATION","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ,{"Name":"pReserved","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["Reserved","Optional"]} + ] + } + ] + } + ,{ + "Name":"IXAudio2Extension" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":"84ac29bb-d619-44d2-b197-e4acf7df3ed6" + ,"Interface":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]} + ,"Methods":[ + { + "Name":"GetProcessingQuantum" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"quantumNumerator","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"UInt32"}},"Attrs":["Out"]} + ,{"Name":"quantumDenominator","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"UInt32"}},"Attrs":["In","Out"]} + ] + } + ,{ + "Name":"GetProcessor" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"processor","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"UInt32"}},"Attrs":["In","Out"]} + ] + } + ] + } + ,{ + "Name":"IXAudio2Voice" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":null + ,"Methods":[ + { + "Name":"GetVoiceDetails" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pVoiceDetails","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_VOICE_DETAILS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetOutputVoices" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pSendList","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_VOICE_SENDS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"SetEffectChain" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pEffectChain","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_EFFECT_CHAIN","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"EnableEffect" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"EffectIndex","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"DisableEffect" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"EffectIndex","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetEffectState" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"EffectIndex","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pEnabled","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetEffectParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"EffectIndex","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In",{"Kind":"MemorySize","BytesParamIndex":2},"Const"]} + ,{"Name":"ParametersByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetEffectParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"EffectIndex","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["Out",{"Kind":"MemorySize","BytesParamIndex":2}]} + ,{"Name":"ParametersByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"SetFilterParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_FILTER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetFilterParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_FILTER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetOutputFilterParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pDestinationVoice","Type":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In","Optional"]} + ,{"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_FILTER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetOutputFilterParameters" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pDestinationVoice","Type":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In","Optional"]} + ,{"Name":"pParameters","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_FILTER_PARAMETERS","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetVolume" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Volume","Type":{"Kind":"Native","Name":"Single"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetVolume" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pVolume","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetChannelVolumes" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Channels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pVolumes","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":0,"Child":{"Kind":"Native","Name":"Single"}},"Attrs":["In","Const"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetChannelVolumes" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Channels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pVolumes","Type":{"Kind":"LPArray","NullNullTerm":false,"CountConst":-1,"CountParamIndex":0,"Child":{"Kind":"Native","Name":"Single"}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetOutputMatrix" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pDestinationVoice","Type":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In","Optional"]} + ,{"Name":"SourceChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"DestinationChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pLevelMatrix","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":["In","Const"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetOutputMatrix" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pDestinationVoice","Type":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In","Optional"]} + ,{"Name":"SourceChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"DestinationChannels","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"pLevelMatrix","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"DestroyVoice" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ] + } + ,{ + "Name":"IXAudio2SourceVoice" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]} + ,"Methods":[ + { + "Name":"Start" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"Stop" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"SubmitSourceBuffer" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pBuffer","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_BUFFER","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"pBufferWMA","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_BUFFER_WMA","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Optional","Const"]} + ] + } + ,{ + "Name":"FlushSourceBuffers" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"Discontinuity" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"ExitLoop" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetState" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pVoiceState","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"XAUDIO2_VOICE_STATE","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"SetFrequencyRatio" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Ratio","Type":{"Kind":"Native","Name":"Single"},"Attrs":["In"]} + ,{"Name":"OperationSet","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"GetFrequencyRatio" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pRatio","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"SetSourceSampleRate" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"NewSourceSampleRate","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ] + } + ,{ + "Name":"IXAudio2SubmixVoice" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]} + ,"Methods":[ + ] + } + ,{ + "Name":"IXAudio2MasteringVoice" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":{"Kind":"ApiRef","Name":"IXAudio2Voice","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]} + ,"Methods":[ + { + "Name":"GetChannelMask" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pChannelmask","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"UInt32"}},"Attrs":["Out"]} + ] + } + ] + } + ,{ + "Name":"IXAudio2EngineCallback" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":null + ,"Methods":[ + { + "Name":"OnProcessingPassStart" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"OnProcessingPassEnd" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"OnCriticalError" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"Error","Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":["In"]} + ] + } + ] + } + ,{ + "Name":"IXAudio2VoiceCallback" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Com" + ,"Guid":null + ,"Interface":null + ,"Methods":[ + { + "Name":"OnVoiceProcessingPassStart" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"BytesRequired","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"OnVoiceProcessingPassEnd" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"OnStreamEnd" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + ] + } + ,{ + "Name":"OnBufferStart" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pBufferContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In","Out"]} + ] + } + ,{ + "Name":"OnBufferEnd" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pBufferContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In","Out"]} + ] + } + ,{ + "Name":"OnLoopEnd" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pBufferContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In","Out"]} + ] + } + ,{ + "Name":"OnVoiceError" + ,"SetLastError":false + ,"ReturnType":{"Kind":"Native","Name":"Void"} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"pBufferContext","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In","Out"]} + ,{"Name":"Error","Type":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":["In"]} + ] + } + ] + } + ,{ + "Name":"AudioVolumeMeter" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"4fc3b166-972a-40cf-bc37-7db03db2fba3" + } + ,{ + "Name":"AudioReverb" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"ComClassID" + ,"Guid":"c2633b16-471b-4498-b8c5-4f0959e2ec09" + } + ,{ + "Name":"XAUDIO2FX_VOLUMEMETER_LEVELS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"pPeakLevels","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":[]} + ,{"Name":"pRMSLevels","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Single"}},"Attrs":[]} + ,{"Name":"ChannelCount","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2FX_REVERB_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"WetDryMix","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"ReflectionsDelay","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":[]} + ,{"Name":"ReverbDelay","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"RearDelay","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"SideDelay","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"PositionLeft","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"PositionRight","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"PositionMatrixLeft","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"PositionMatrixRight","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"EarlyDiffusion","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"LateDiffusion","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"LowEQGain","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"LowEQCutoff","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"HighEQGain","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"HighEQCutoff","Type":{"Kind":"Native","Name":"Byte"},"Attrs":[]} + ,{"Name":"RoomFilterFreq","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"RoomFilterMain","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"RoomFilterHF","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"ReflectionsGain","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"ReverbGain","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"DecayTime","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Density","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"RoomSize","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"DisableLateField","Type":{"Kind":"ApiRef","Name":"BOOL","TargetKind":"Default","Api":"Foundation","Parents":[]},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"XAUDIO2FX_REVERB_I3DL2_PARAMETERS" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":1 + ,"SizeField":"" + ,"Fields":[ + {"Name":"WetDryMix","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Room","Type":{"Kind":"Native","Name":"Int32"},"Attrs":[]} + ,{"Name":"RoomHF","Type":{"Kind":"Native","Name":"Int32"},"Attrs":[]} + ,{"Name":"RoomRolloffFactor","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"DecayTime","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"DecayHFRatio","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Reflections","Type":{"Kind":"Native","Name":"Int32"},"Attrs":[]} + ,{"Name":"ReflectionsDelay","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Reverb","Type":{"Kind":"Native","Name":"Int32"},"Attrs":[]} + ,{"Name":"ReverbDelay","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Diffusion","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"Density","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"HFReference","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfPosition" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"x","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"y","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"z","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfOrientation" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"element","Type":{"Kind":"Array","Shape":{"Size":9},"Child":{"Kind":"Native","Name":"Single"}},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfDirectivityType" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Enum" + ,"Flags":false + ,"Scoped":false + ,"Values":[ + {"Name":"OmniDirectional","Value":0} + ,{"Name":"Cardioid","Value":1} + ,{"Name":"Cone","Value":2} + ] + ,"IntegerBase":"Int32" + } + ,{ + "Name":"HrtfEnvironment" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Enum" + ,"Flags":false + ,"Scoped":false + ,"Values":[ + {"Name":"Small","Value":0} + ,{"Name":"Medium","Value":1} + ,{"Name":"Large","Value":2} + ,{"Name":"Outdoors","Value":3} + ] + ,"IntegerBase":"Int32" + } + ,{ + "Name":"HrtfDirectivity" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"type","Type":{"Kind":"ApiRef","Name":"HrtfDirectivityType","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"scaling","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfDirectivityCardioid" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"directivity","Type":{"Kind":"ApiRef","Name":"HrtfDirectivity","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"order","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfDirectivityCone" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"directivity","Type":{"Kind":"ApiRef","Name":"HrtfDirectivity","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"innerAngle","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"outerAngle","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfDistanceDecayType" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Enum" + ,"Flags":false + ,"Scoped":false + ,"Values":[ + {"Name":"NaturalDecay","Value":0} + ,{"Name":"CustomDecay","Value":1} + ] + ,"IntegerBase":"Int32" + } + ,{ + "Name":"HrtfDistanceDecay" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"type","Type":{"Kind":"ApiRef","Name":"HrtfDistanceDecayType","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":[]} + ,{"Name":"maxGain","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"minGain","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"unityGainDistance","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ,{"Name":"cutoffDistance","Type":{"Kind":"Native","Name":"Single"},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"HrtfApoInit" + ,"Architectures":[] + ,"Platform":null + ,"Kind":"Struct" + ,"Size":0 + ,"PackingSize":0 + ,"SizeField":"" + ,"Fields":[ + {"Name":"distanceDecay","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"HrtfDistanceDecay","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":[]} + ,{"Name":"directivity","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"HrtfDirectivity","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":[]} + ] + ,"NestedTypes":[ + ] + } + ,{ + "Name":"IXAPOHrtfParameters" + ,"Architectures":[] + ,"Platform":"windows10.0.10240" + ,"Kind":"Com" + ,"Guid":"15b3cd66-e9de-4464-b6e6-2bc3cf63d455" + ,"Interface":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]} + ,"Methods":[ + { + "Name":"SetSourcePosition" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"position","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"HrtfPosition","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ] + } + ,{ + "Name":"SetSourceOrientation" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"orientation","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"HrtfOrientation","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ] + } + ,{ + "Name":"SetSourceGain" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"gain","Type":{"Kind":"Native","Name":"Single"},"Attrs":["In"]} + ] + } + ,{ + "Name":"SetEnvironment" + ,"SetLastError":false + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"environment","Type":{"Kind":"ApiRef","Name":"HrtfEnvironment","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]},"Attrs":["In"]} + ] + } + ] + } +] + +,"Functions":[ + { + "Name":"CreateFX" + ,"SetLastError":false + ,"DllImport":"XAudio2_9.dll" + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"clsid","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Guid"}},"Attrs":["In","Const"]} + ,{"Name":"pEffect","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"pInitDat","Type":{"Kind":"PointerTo","Child":{"Kind":"Native","Name":"Void"}},"Attrs":["In",{"Kind":"MemorySize","BytesParamIndex":3},"Optional","Const"]} + ,{"Name":"InitDataByteSize","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"XAudio2CreateWithVersionInfo" + ,"SetLastError":false + ,"DllImport":"XAudio2_9.dll" + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppXAudio2","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IXAudio2","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out"]} + ,{"Name":"Flags","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"XAudio2Processor","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ,{"Name":"ntddiVersion","Type":{"Kind":"Native","Name":"UInt32"},"Attrs":["In"]} + ] + } + ,{ + "Name":"CreateAudioVolumeMeter" + ,"SetLastError":false + ,"DllImport":"xaudio2_9.dll" + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppApo","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"CreateAudioReverb" + ,"SetLastError":false + ,"DllImport":"xaudio2_9.dll" + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"ppApo","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IUnknown","TargetKind":"Com","Api":"System.Com","Parents":[]}},"Attrs":["Out"]} + ] + } + ,{ + "Name":"CreateHrtfApo" + ,"SetLastError":false + ,"DllImport":"HrtfApo.dll" + ,"ReturnType":{"Kind":"ApiRef","Name":"HRESULT","TargetKind":"Default","Api":"Foundation","Parents":[]} + ,"ReturnAttrs":[] + ,"Architectures":[] + ,"Platform":null + ,"Attrs":[] + ,"Params":[ + {"Name":"init","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"HrtfApoInit","TargetKind":"Default","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["In","Const"]} + ,{"Name":"xApo","Type":{"Kind":"PointerTo","Child":{"Kind":"ApiRef","Name":"IXAPO","TargetKind":"Com","Api":"Media.Audio.XAudio2","Parents":[]}},"Attrs":["Out","ComOutPtr"]} + ] + } +] + +,"UnicodeAliases":[ +] + +} diff --git a/src/Vortice.Win32.Graphics.Direct3D.Dxc/Generated/Graphics.Direct3D.Dxc.Structs.cs b/src/Vortice.Win32.Graphics.Direct3D.Dxc/Generated/Graphics.Direct3D.Dxc.Structs.cs index 330d20d..06905b5 100644 --- a/src/Vortice.Win32.Graphics.Direct3D.Dxc/Generated/Graphics.Direct3D.Dxc.Structs.cs +++ b/src/Vortice.Win32.Graphics.Direct3D.Dxc/Generated/Graphics.Direct3D.Dxc.Structs.cs @@ -24,7 +24,7 @@ public partial struct DxcBuffer public nuint Size; - public uint Encoding; + public DxcCp Encoding; } /// DxcDefine diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Apis.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Apis.cs new file mode 100644 index 0000000..b596426 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Apis.cs @@ -0,0 +1,184 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio.XAudio2; + +public static unsafe partial class Apis +{ + public static void ReverbConvertI3DL2ToNative( + [NativeTypeName("const XAUDIO2FX_REVERB_I3DL2_PARAMETERS *")] FXReverbI3DL2Parameters* pI3DL2, + [NativeTypeName("XAUDIO2FX_REVERB_PARAMETERS *")] FXReverbParameters* pNative, + [Optional, DefaultParameterValue(1)] Bool32 sevenDotOneReverb) + { + float reflectionsDelay; + float reverbDelay; + + if (sevenDotOneReverb != 0) + { + pNative->RearDelay = 20; + } + else + { + pNative->RearDelay = 5; + } + + pNative->SideDelay = 5; + pNative->PositionLeft = 6; + pNative->PositionRight = 6; + pNative->PositionMatrixLeft = 27; + pNative->PositionMatrixRight = 27; + pNative->RoomSize = 100.0f; + pNative->LowEQCutoff = 4; + pNative->HighEQCutoff = 6; + pNative->RoomFilterMain = (float)pI3DL2->Room / 100.0f; + pNative->RoomFilterHF = (float)pI3DL2->RoomHF / 100.0f; + + if (pI3DL2->DecayHFRatio >= 1.0f) + { + int index = (int)(-4.0 * Math.Log10(pI3DL2->DecayHFRatio)); + + if (index < -8) + { + index = -8; + } + + pNative->LowEQGain = (byte)((index < 0) ? index + 8 : 8); + pNative->HighEQGain = 8; + pNative->DecayTime = pI3DL2->DecayTime * pI3DL2->DecayHFRatio; + } + else + { + int index = (int)(4.0 * Math.Log10(pI3DL2->DecayHFRatio)); + + if (index < -8) + { + index = -8; + } + + pNative->LowEQGain = 8; + pNative->HighEQGain = (byte)((index < 0) ? index + 8 : 8); + pNative->DecayTime = pI3DL2->DecayTime; + } + + reflectionsDelay = pI3DL2->ReflectionsDelay * 1000.0f; + if (reflectionsDelay >= 300) + { + reflectionsDelay = (float)(300 - 1); + } + else if (reflectionsDelay <= 1) + { + reflectionsDelay = 1; + } + + pNative->ReflectionsDelay = (uint)reflectionsDelay; + reverbDelay = pI3DL2->ReverbDelay * 1000.0f; + if (reverbDelay >= 85) + { + reverbDelay = (float)(85 - 1); + } + + pNative->ReverbDelay = (byte)reverbDelay; + pNative->ReflectionsGain = pI3DL2->Reflections / 100.0f; + pNative->ReverbGain = pI3DL2->Reverb / 100.0f; + pNative->EarlyDiffusion = (byte)(15.0f * pI3DL2->Diffusion / 100.0f); + pNative->LateDiffusion = pNative->EarlyDiffusion; + pNative->Density = pI3DL2->Density; + pNative->RoomFilterFreq = pI3DL2->HFReference; + pNative->WetDryMix = pI3DL2->WetDryMix; + pNative->DisableLateField = 0; + } + + public static float XAudio2DecibelsToAmplitudeRatio(float Decibels) + { +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return MathF.Pow(10.0f, Decibels / 20.0f); +#else + return (float)Math.Pow(10.0f, Decibels / 20.0f); +#endif + } + + public static float XAudio2AmplitudeRatioToDecibels(float Volume) + { + if (Volume == 0) + { + return -3.402823466e+38f; + } + +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return 20.0f * MathF.Log10(Volume); +#else + return 20.0f * (float)Math.Log10(Volume); +#endif + } + + public static float XAudio2SemitonesToFrequencyRatio(float Semitones) + { +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return MathF.Pow(2.0f, Semitones / 12.0f); +#else + return (float)Math.Pow(2.0f, Semitones / 12.0f); +#endif + } + + public static float XAudio2FrequencyRatioToSemitones(float FrequencyRatio) + { +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return 39.86313713864835f * MathF.Log10(FrequencyRatio); +#else + return 39.86313713864835f * (float)Math.Log10(FrequencyRatio); +#endif + } + + public static float XAudio2CutoffFrequencyToRadians(float CutoffFrequency, [NativeTypeName("UINT32")] uint SampleRate) + { + if ((uint)(CutoffFrequency * 6.0f) >= SampleRate) + { + return 1.0f; + } + +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return 2.0f * MathF.Sin((float)3.14159265358979323846 * CutoffFrequency / SampleRate); +#else + return 2.0f * (float)Math.Sin(3.14159265358979323846 * CutoffFrequency / SampleRate); +#endif + } + + public static float XAudio2RadiansToCutoffFrequency(float Radians, float SampleRate) + { +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return SampleRate * MathF.Asin(Radians / 2.0f) / (float)3.14159265358979323846; +#else + return SampleRate * (float)Math.Asin(Radians / 2.0f) / (float)3.14159265358979323846; +#endif + } + + public static float XAudio2CutoffFrequencyToOnePoleCoefficient(float CutoffFrequency, [NativeTypeName("UINT32")] uint SampleRate) + { + if ((uint)CutoffFrequency >= SampleRate) + { + return 1.0f; + } + +#if NETSTANDARD2_1 || NET6_0_OR_GREATER + return (1.0f - MathF.Pow(1.0f - 2.0f * CutoffFrequency / SampleRate, 2.0f)); +#else + return (1.0f - (float)Math.Pow(1.0f - 2.0f * CutoffFrequency / SampleRate, 2.0f)); +#endif + } + + /// + [DllImport("XAudio2_9", ExactSpelling = true)] + public static extern HResult XAudio2Create([NativeTypeName("IXAudio2 **")] IXAudio2** ppXAudio2, [NativeTypeName("UINT32")] uint Flags = 0, [NativeTypeName("XAUDIO2_PROCESSOR")] uint XAudio2Processor = XAUDIO2_DEFAULT_PROCESSOR); + + /// + public static HResult XAudio2CreateVolumeMeter([NativeTypeName("IUnknown **")] IUnknown** ppApo) + { + return CreateAudioVolumeMeter(ppApo); + } + + /// + public static HResult XAudio2CreateReverb([NativeTypeName("IUnknown **")] IUnknown** ppApo) + { + return CreateAudioReverb(ppApo); + } +} diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPO.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPO.cs new file mode 100644 index 0000000..ade8959 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPO.cs @@ -0,0 +1,242 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAPO +[Guid("a410b984-9839-4819-a0be-2856ae6b3adb")] +[NativeTypeName("struct IXAPO : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IXAPO : IXAPO.Interface, INativeGuid +{ + public static ref readonly Guid IID_IXAPO + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x84, 0xB9, 0x10, 0xA4, + 0x39, 0x98, + 0x19, 0x48, + 0xA0, + 0xBE, + 0x28, + 0x56, + 0xAE, + 0x6B, + 0x3A, + 0xDB + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + +#if NET6_0_OR_GREATER + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPO)); +#else + public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPO)); +#endif + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[0]))((IXAPO*)Unsafe.AsPointer(ref this), riid, ppvObject); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAPO*)Unsafe.AsPointer(ref this), riid, ppvObject); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAPO*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAPO*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAPO*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAPO*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult GetRegistrationProperties(XAPORegistrationProperties** ppRegistrationProperties) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAPO*)Unsafe.AsPointer(ref this), ppRegistrationProperties); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAPO*)Unsafe.AsPointer(ref this), ppRegistrationProperties); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult IsInputFormatSupported(Media.Audio.WaveFormatEx* pOutputFormat, Media.Audio.WaveFormatEx* pRequestedInputFormat, Media.Audio.WaveFormatEx** ppSupportedInputFormat) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAPO*)Unsafe.AsPointer(ref this), pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAPO*)Unsafe.AsPointer(ref this), pOutputFormat, pRequestedInputFormat, ppSupportedInputFormat); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HResult IsOutputFormatSupported(Media.Audio.WaveFormatEx* pInputFormat, Media.Audio.WaveFormatEx* pRequestedOutputFormat, Media.Audio.WaveFormatEx** ppSupportedOutputFormat) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[5]))((IXAPO*)Unsafe.AsPointer(ref this), pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAPO*)Unsafe.AsPointer(ref this), pInputFormat, pRequestedOutputFormat, ppSupportedOutputFormat); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult Initialize(void* pData, uint DataByteSize) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAPO*)Unsafe.AsPointer(ref this), pData, DataByteSize); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAPO*)Unsafe.AsPointer(ref this), pData, DataByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public void Reset() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[7]))((IXAPO*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAPO*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult LockForProcess(uint InputLockedParameterCount, XAPOLockForProcessParameters* pInputLockedParameters, uint OutputLockedParameterCount, XAPOLockForProcessParameters* pOutputLockedParameters) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAPO*)Unsafe.AsPointer(ref this), InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAPO*)Unsafe.AsPointer(ref this), InputLockedParameterCount, pInputLockedParameters, OutputLockedParameterCount, pOutputLockedParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void UnlockForProcess() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAPO*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAPO*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public void Process(uint InputProcessParameterCount, XAPOProcessBufferParameters* pInputProcessParameters, uint OutputProcessParameterCount, XAPOProcessBufferParameters* pOutputProcessParameters, Bool32 IsEnabled) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[10]))((IXAPO*)Unsafe.AsPointer(ref this), InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAPO*)Unsafe.AsPointer(ref this), InputProcessParameterCount, pInputProcessParameters, OutputProcessParameterCount, pOutputProcessParameters, IsEnabled); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public uint CalcInputFrames(uint OutputFrameCount) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[11]))((IXAPO*)Unsafe.AsPointer(ref this), OutputFrameCount); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAPO*)Unsafe.AsPointer(ref this), OutputFrameCount); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public uint CalcOutputFrames(uint InputFrameCount) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[12]))((IXAPO*)Unsafe.AsPointer(ref this), InputFrameCount); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAPO*)Unsafe.AsPointer(ref this), InputFrameCount); +#endif + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + HResult GetRegistrationProperties(XAPORegistrationProperties** ppRegistrationProperties); + + [VtblIndex(4)] + HResult IsInputFormatSupported(Media.Audio.WaveFormatEx* pOutputFormat, Media.Audio.WaveFormatEx* pRequestedInputFormat, Media.Audio.WaveFormatEx** ppSupportedInputFormat); + + [VtblIndex(5)] + HResult IsOutputFormatSupported(Media.Audio.WaveFormatEx* pInputFormat, Media.Audio.WaveFormatEx* pRequestedOutputFormat, Media.Audio.WaveFormatEx** ppSupportedOutputFormat); + + [VtblIndex(6)] + HResult Initialize(void* pData, uint DataByteSize); + + [VtblIndex(7)] + void Reset(); + + [VtblIndex(8)] + HResult LockForProcess(uint InputLockedParameterCount, XAPOLockForProcessParameters* pInputLockedParameters, uint OutputLockedParameterCount, XAPOLockForProcessParameters* pOutputLockedParameters); + + [VtblIndex(9)] + void UnlockForProcess(); + + [VtblIndex(10)] + void Process(uint InputProcessParameterCount, XAPOProcessBufferParameters* pInputProcessParameters, uint OutputProcessParameterCount, XAPOProcessBufferParameters* pOutputProcessParameters, Bool32 IsEnabled); + + [VtblIndex(11)] + uint CalcInputFrames(uint OutputFrameCount); + + [VtblIndex(12)] + uint CalcOutputFrames(uint InputFrameCount); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOHrtfParameters.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOHrtfParameters.cs new file mode 100644 index 0000000..33b1da9 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOHrtfParameters.cs @@ -0,0 +1,152 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAPOHrtfParameters +[Guid("15b3cd66-e9de-4464-b6e6-2bc3cf63d455")] +[NativeTypeName("struct IXAPOHrtfParameters : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IXAPOHrtfParameters : IXAPOHrtfParameters.Interface, INativeGuid +{ + public static ref readonly Guid IID_IXAPOHrtfParameters + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x66, 0xCD, 0xB3, 0x15, + 0xDE, 0xE9, + 0x64, 0x44, + 0xB6, + 0xE6, + 0x2B, + 0xC3, + 0xCF, + 0x63, + 0xD4, + 0x55 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + +#if NET6_0_OR_GREATER + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPOHrtfParameters)); +#else + public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPOHrtfParameters)); +#endif + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[0]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), riid, ppvObject); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), riid, ppvObject); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult SetSourcePosition(HrtfPosition* position) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), position); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), position); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult SetSourceOrientation(HrtfOrientation* orientation) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), orientation); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), orientation); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HResult SetSourceGain(float gain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[5]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), gain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), gain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult SetEnvironment(HrtfEnvironment environment) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), environment); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAPOHrtfParameters*)Unsafe.AsPointer(ref this), environment); +#endif + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + HResult SetSourcePosition(HrtfPosition* position); + + [VtblIndex(4)] + HResult SetSourceOrientation(HrtfOrientation* orientation); + + [VtblIndex(5)] + HResult SetSourceGain(float gain); + + [VtblIndex(6)] + HResult SetEnvironment(HrtfEnvironment environment); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOParameters.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOParameters.cs new file mode 100644 index 0000000..4915369 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAPOParameters.cs @@ -0,0 +1,122 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAPOParameters +[Guid("26d95c66-80f2-499a-ad54-5ae7f01c6d98")] +[NativeTypeName("struct IXAPOParameters : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IXAPOParameters : IXAPOParameters.Interface, INativeGuid +{ + public static ref readonly Guid IID_IXAPOParameters + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0x66, 0x5C, 0xD9, 0x26, + 0xF2, 0x80, + 0x9A, 0x49, + 0xAD, + 0x54, + 0x5A, + 0xE7, + 0xF0, + 0x1C, + 0x6D, + 0x98 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + +#if NET6_0_OR_GREATER + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPOParameters)); +#else + public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAPOParameters)); +#endif + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[0]))((IXAPOParameters*)Unsafe.AsPointer(ref this), riid, ppvObject); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAPOParameters*)Unsafe.AsPointer(ref this), riid, ppvObject); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAPOParameters*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAPOParameters*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAPOParameters*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAPOParameters*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public void SetParameters(void* pParameters, uint ParameterByteSize) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[3]))((IXAPOParameters*)Unsafe.AsPointer(ref this), pParameters, ParameterByteSize); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAPOParameters*)Unsafe.AsPointer(ref this), pParameters, ParameterByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public void GetParameters(void* pParameters, uint ParameterByteSize) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[4]))((IXAPOParameters*)Unsafe.AsPointer(ref this), pParameters, ParameterByteSize); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAPOParameters*)Unsafe.AsPointer(ref this), pParameters, ParameterByteSize); +#endif + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + void SetParameters(void* pParameters, uint ParameterByteSize); + + [VtblIndex(4)] + void GetParameters(void* pParameters, uint ParameterByteSize); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2.cs new file mode 100644 index 0000000..4a63a6e --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2.cs @@ -0,0 +1,242 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2 +[Guid("2b02e3cf-2e0b-4ec3-be45-1b2a3fe7210d")] +[NativeTypeName("struct IXAudio2 : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IXAudio2 : IXAudio2.Interface, INativeGuid +{ + public static ref readonly Guid IID_IXAudio2 + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xCF, 0xE3, 0x02, 0x2B, + 0x0B, 0x2E, + 0xC3, 0x4E, + 0xBE, + 0x45, + 0x1B, + 0x2A, + 0x3F, + 0xE7, + 0x21, + 0x0D + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + +#if NET6_0_OR_GREATER + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAudio2)); +#else + public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAudio2)); +#endif + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2*)Unsafe.AsPointer(ref this), riid, ppvObject); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2*)Unsafe.AsPointer(ref this), riid, ppvObject); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult RegisterForCallbacks(IXAudio2EngineCallback* pCallback) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2*)Unsafe.AsPointer(ref this), pCallback); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2*)Unsafe.AsPointer(ref this), pCallback); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public void UnregisterForCallbacks(IXAudio2EngineCallback* pCallback) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2*)Unsafe.AsPointer(ref this), pCallback); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2*)Unsafe.AsPointer(ref this), pCallback); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public HResult CreateSourceVoice(IXAudio2SourceVoice** ppSourceVoice, Media.Audio.WaveFormatEx* pSourceFormat, uint Flags, float MaxFrequencyRatio, IXAudio2VoiceCallback* pCallback, VoiceSends* pSendList, EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2*)Unsafe.AsPointer(ref this), ppSourceVoice, pSourceFormat, Flags, MaxFrequencyRatio, pCallback, pSendList, pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2*)Unsafe.AsPointer(ref this), ppSourceVoice, pSourceFormat, Flags, MaxFrequencyRatio, pCallback, pSendList, pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult CreateSubmixVoice(IXAudio2SubmixVoice** ppSubmixVoice, uint InputChannels, uint InputSampleRate, uint Flags, uint ProcessingStage, VoiceSends* pSendList, EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2*)Unsafe.AsPointer(ref this), ppSubmixVoice, InputChannels, InputSampleRate, Flags, ProcessingStage, pSendList, pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2*)Unsafe.AsPointer(ref this), ppSubmixVoice, InputChannels, InputSampleRate, Flags, ProcessingStage, pSendList, pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HResult CreateMasteringVoice(IXAudio2MasteringVoice** ppMasteringVoice, uint InputChannels, uint InputSampleRate, uint Flags, ushort* szDeviceId, EffectChain* pEffectChain, Media.Audio.AudioStreamCategory* StreamCategory) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[7]))((IXAudio2*)Unsafe.AsPointer(ref this), ppMasteringVoice, InputChannels, InputSampleRate, Flags, szDeviceId, pEffectChain, StreamCategory); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAudio2*)Unsafe.AsPointer(ref this), ppMasteringVoice, InputChannels, InputSampleRate, Flags, szDeviceId, pEffectChain, StreamCategory); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult StartEngine() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void StopEngine() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAudio2*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HResult CommitChanges(uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[10]))((IXAudio2*)Unsafe.AsPointer(ref this), OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAudio2*)Unsafe.AsPointer(ref this), OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public void GetPerformanceData(PerformanceData* pPerfData) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[11]))((IXAudio2*)Unsafe.AsPointer(ref this), pPerfData); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAudio2*)Unsafe.AsPointer(ref this), pPerfData); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public void SetDebugConfiguration(DebugConfiguration* pDebugConfiguration, void* pReserved) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[12]))((IXAudio2*)Unsafe.AsPointer(ref this), pDebugConfiguration, pReserved); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAudio2*)Unsafe.AsPointer(ref this), pDebugConfiguration, pReserved); +#endif + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + HResult RegisterForCallbacks(IXAudio2EngineCallback* pCallback); + + [VtblIndex(4)] + void UnregisterForCallbacks(IXAudio2EngineCallback* pCallback); + + [VtblIndex(5)] + HResult CreateSourceVoice(IXAudio2SourceVoice** ppSourceVoice, Media.Audio.WaveFormatEx* pSourceFormat, uint Flags, float MaxFrequencyRatio, IXAudio2VoiceCallback* pCallback, VoiceSends* pSendList, EffectChain* pEffectChain); + + [VtblIndex(6)] + HResult CreateSubmixVoice(IXAudio2SubmixVoice** ppSubmixVoice, uint InputChannels, uint InputSampleRate, uint Flags, uint ProcessingStage, VoiceSends* pSendList, EffectChain* pEffectChain); + + [VtblIndex(7)] + HResult CreateMasteringVoice(IXAudio2MasteringVoice** ppMasteringVoice, uint InputChannels, uint InputSampleRate, uint Flags, ushort* szDeviceId, EffectChain* pEffectChain, Media.Audio.AudioStreamCategory* StreamCategory); + + [VtblIndex(8)] + HResult StartEngine(); + + [VtblIndex(9)] + void StopEngine(); + + [VtblIndex(10)] + HResult CommitChanges(uint OperationSet); + + [VtblIndex(11)] + void GetPerformanceData(PerformanceData* pPerfData); + + [VtblIndex(12)] + void SetDebugConfiguration(DebugConfiguration* pDebugConfiguration, void* pReserved); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2EngineCallback.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2EngineCallback.cs new file mode 100644 index 0000000..b04e09a --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2EngineCallback.cs @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2EngineCallback +public unsafe partial struct IXAudio2EngineCallback : IXAudio2EngineCallback.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void OnProcessingPassStart() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public void OnProcessingPassEnd() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public void OnCriticalError(HResult Error) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this), Error); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2EngineCallback*)Unsafe.AsPointer(ref this), Error); +#endif + } + + public interface Interface + { + [VtblIndex(0)] + void OnProcessingPassStart(); + + [VtblIndex(1)] + void OnProcessingPassEnd(); + + [VtblIndex(2)] + void OnCriticalError(HResult Error); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Extension.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Extension.cs new file mode 100644 index 0000000..beea244 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Extension.cs @@ -0,0 +1,122 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2Extension +[Guid("84ac29bb-d619-44d2-b197-e4acf7df3ed6")] +[NativeTypeName("struct IXAudio2Extension : IUnknown")] +[NativeInheritance("IUnknown")] +public unsafe partial struct IXAudio2Extension : IXAudio2Extension.Interface, INativeGuid +{ + public static ref readonly Guid IID_IXAudio2Extension + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + ReadOnlySpan data = new byte[] { + 0xBB, 0x29, 0xAC, 0x84, + 0x19, 0xD6, + 0xD2, 0x44, + 0xB1, + 0x97, + 0xE4, + 0xAC, + 0xF7, + 0xDF, + 0x3E, + 0xD6 + }; + + Debug.Assert(data.Length == Unsafe.SizeOf()); + return ref Unsafe.As(ref MemoryMarshal.GetReference(data)); + } + } + +#if NET6_0_OR_GREATER + static Guid* INativeGuid.NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAudio2Extension)); +#else + public static Guid* NativeGuid => (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(in IID_IXAudio2Extension)); +#endif + + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HResult QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), riid, ppvObject); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), riid, ppvObject); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2Extension*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2Extension*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2Extension*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2Extension*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public void GetProcessingQuantum(uint* quantumNumerator, uint* quantumDenominator) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), quantumNumerator, quantumDenominator); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), quantumNumerator, quantumDenominator); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public void GetProcessor(uint* processor) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), processor); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2Extension*)Unsafe.AsPointer(ref this), processor); +#endif + } + + public interface Interface : IUnknown.Interface + { + [VtblIndex(3)] + void GetProcessingQuantum(uint* quantumNumerator, uint* quantumDenominator); + + [VtblIndex(4)] + void GetProcessor(uint* processor); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2MasteringVoice.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2MasteringVoice.cs new file mode 100644 index 0000000..05d9d51 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2MasteringVoice.cs @@ -0,0 +1,266 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2MasteringVoice +[NativeTypeName("struct IXAudio2MasteringVoice : IXAudio2Voice")] +[NativeInheritance("IXAudio2Voice")] +public unsafe partial struct IXAudio2MasteringVoice : IXAudio2MasteringVoice.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void GetVoiceDetails(VoiceDetails* pVoiceDetails) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public HResult SetOutputVoices(VoiceSends* pSendList) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pSendList); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pSendList); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public HResult SetEffectChain(EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult EnableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult DisableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public void GetEffectState(uint EffectIndex, Bool32* pEnabled) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult SetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HResult GetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[7]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult SetFilterParameters(FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void GetFilterParameters(FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HResult SetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[10]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public void GetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[11]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HResult SetVolume(float Volume, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[12]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public void GetVolume(float* pVolume) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[13]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pVolume); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pVolume); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HResult SetChannelVolumes(uint Channels, float* pVolumes, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[14]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public void GetChannelVolumes(uint Channels, float* pVolumes) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[15]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HResult SetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[16]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public void GetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[17]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public void DestroyVoice() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[18]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HResult GetChannelMask(uint* pChannelmask) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[19]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pChannelmask); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IXAudio2MasteringVoice*)Unsafe.AsPointer(ref this), pChannelmask); +#endif + } + + public interface Interface : IXAudio2Voice.Interface + { + [VtblIndex(19)] + HResult GetChannelMask(uint* pChannelmask); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SourceVoice.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SourceVoice.cs new file mode 100644 index 0000000..63f71bd --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SourceVoice.cs @@ -0,0 +1,401 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2SourceVoice +[NativeTypeName("struct IXAudio2SourceVoice : IXAudio2Voice")] +[NativeInheritance("IXAudio2Voice")] +public unsafe partial struct IXAudio2SourceVoice : IXAudio2SourceVoice.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void GetVoiceDetails(VoiceDetails* pVoiceDetails) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public HResult SetOutputVoices(VoiceSends* pSendList) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pSendList); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pSendList); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public HResult SetEffectChain(EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult EnableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult DisableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public void GetEffectState(uint EffectIndex, Bool32* pEnabled) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult SetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HResult GetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[7]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult SetFilterParameters(FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void GetFilterParameters(FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HResult SetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[10]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public void GetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[11]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HResult SetVolume(float Volume, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[12]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public void GetVolume(float* pVolume) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[13]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVolume); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVolume); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HResult SetChannelVolumes(uint Channels, float* pVolumes, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[14]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public void GetChannelVolumes(uint Channels, float* pVolumes) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[15]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HResult SetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[16]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public void GetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[17]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public void DestroyVoice() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[18]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(19)] + public HResult Start(uint Flags, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[19]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Flags, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[19]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Flags, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(20)] + public HResult Stop(uint Flags, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[20]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Flags, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[20]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Flags, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(21)] + public HResult SubmitSourceBuffer(Buffer* pBuffer, BufferWma* pBufferWMA) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[21]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pBuffer, pBufferWMA); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[21]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pBuffer, pBufferWMA); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(22)] + public HResult FlushSourceBuffers() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[22]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[22]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(23)] + public HResult Discontinuity() + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[23]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[23]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(24)] + public HResult ExitLoop(uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[24]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[24]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(25)] + public void GetState(VoiceState* pVoiceState, uint Flags) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[25]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVoiceState, Flags); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[25]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pVoiceState, Flags); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(26)] + public HResult SetFrequencyRatio(float Ratio, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[26]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Ratio, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[26]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), Ratio, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(27)] + public void GetFrequencyRatio(float* pRatio) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[27]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pRatio); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[27]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), pRatio); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(28)] + public HResult SetSourceSampleRate(uint NewSourceSampleRate) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[28]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), NewSourceSampleRate); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[28]))((IXAudio2SourceVoice*)Unsafe.AsPointer(ref this), NewSourceSampleRate); +#endif + } + + public interface Interface : IXAudio2Voice.Interface + { + [VtblIndex(19)] + HResult Start(uint Flags, uint OperationSet); + + [VtblIndex(20)] + HResult Stop(uint Flags, uint OperationSet); + + [VtblIndex(21)] + HResult SubmitSourceBuffer(Buffer* pBuffer, BufferWma* pBufferWMA); + + [VtblIndex(22)] + HResult FlushSourceBuffers(); + + [VtblIndex(23)] + HResult Discontinuity(); + + [VtblIndex(24)] + HResult ExitLoop(uint OperationSet); + + [VtblIndex(25)] + void GetState(VoiceState* pVoiceState, uint Flags); + + [VtblIndex(26)] + HResult SetFrequencyRatio(float Ratio, uint OperationSet); + + [VtblIndex(27)] + void GetFrequencyRatio(float* pRatio); + + [VtblIndex(28)] + HResult SetSourceSampleRate(uint NewSourceSampleRate); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SubmixVoice.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SubmixVoice.cs new file mode 100644 index 0000000..bb6816e --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2SubmixVoice.cs @@ -0,0 +1,252 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2SubmixVoice +[NativeTypeName("struct IXAudio2SubmixVoice : IXAudio2Voice")] +[NativeInheritance("IXAudio2Voice")] +public unsafe partial struct IXAudio2SubmixVoice : IXAudio2SubmixVoice.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void GetVoiceDetails(VoiceDetails* pVoiceDetails) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public HResult SetOutputVoices(VoiceSends* pSendList) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pSendList); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pSendList); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public HResult SetEffectChain(EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult EnableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult DisableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public void GetEffectState(uint EffectIndex, Bool32* pEnabled) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult SetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HResult GetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[7]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult SetFilterParameters(FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void GetFilterParameters(FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HResult SetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[10]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public void GetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[11]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HResult SetVolume(float Volume, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[12]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public void GetVolume(float* pVolume) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[13]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pVolume); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pVolume); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HResult SetChannelVolumes(uint Channels, float* pVolumes, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[14]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public void GetChannelVolumes(uint Channels, float* pVolumes) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[15]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HResult SetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[16]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public void GetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[17]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public void DestroyVoice() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[18]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IXAudio2SubmixVoice*)Unsafe.AsPointer(ref this)); +#endif + } + + public interface Interface : IXAudio2Voice.Interface + { + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Voice.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Voice.cs new file mode 100644 index 0000000..63c1918 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2Voice.cs @@ -0,0 +1,306 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2Voice +public unsafe partial struct IXAudio2Voice : IXAudio2Voice.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void GetVoiceDetails(VoiceDetails* pVoiceDetails) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pVoiceDetails); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public HResult SetOutputVoices(VoiceSends* pSendList) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pSendList); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pSendList); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public HResult SetEffectChain(EffectChain* pEffectChain) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pEffectChain); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pEffectChain); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HResult EnableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public HResult DisableEffect(uint EffectIndex, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public void GetEffectState(uint EffectIndex, Bool32* pEnabled) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pEnabled); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public HResult SetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(7)] + public HResult GetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[7]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[7]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), EffectIndex, pParameters, ParametersByteSize); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(8)] + public HResult SetFilterParameters(FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[8]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[8]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(9)] + public void GetFilterParameters(FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[9]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[9]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(10)] + public HResult SetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[10]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[10]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(11)] + public void GetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[11]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[11]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, pParameters); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(12)] + public HResult SetVolume(float Volume, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[12]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[12]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Volume, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(13)] + public void GetVolume(float* pVolume) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[13]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pVolume); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pVolume); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(14)] + public HResult SetChannelVolumes(uint Channels, float* pVolumes, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[14]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Channels, pVolumes, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public void GetChannelVolumes(uint Channels, float* pVolumes) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[15]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), Channels, pVolumes); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(16)] + public HResult SetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix, uint OperationSet) + { +#if NET6_0_OR_GREATER + return ((delegate* unmanaged)(lpVtbl[16]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#else + return ((delegate* unmanaged[Stdcall])(lpVtbl[16]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix, OperationSet); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(17)] + public void GetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[17]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[17]))((IXAudio2Voice*)Unsafe.AsPointer(ref this), pDestinationVoice, SourceChannels, DestinationChannels, pLevelMatrix); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(18)] + public void DestroyVoice() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[18]))((IXAudio2Voice*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[18]))((IXAudio2Voice*)Unsafe.AsPointer(ref this)); +#endif + } + + public interface Interface + { + [VtblIndex(0)] + void GetVoiceDetails(VoiceDetails* pVoiceDetails); + + [VtblIndex(1)] + HResult SetOutputVoices(VoiceSends* pSendList); + + [VtblIndex(2)] + HResult SetEffectChain(EffectChain* pEffectChain); + + [VtblIndex(3)] + HResult EnableEffect(uint EffectIndex, uint OperationSet); + + [VtblIndex(4)] + HResult DisableEffect(uint EffectIndex, uint OperationSet); + + [VtblIndex(5)] + void GetEffectState(uint EffectIndex, Bool32* pEnabled); + + [VtblIndex(6)] + HResult SetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize, uint OperationSet); + + [VtblIndex(7)] + HResult GetEffectParameters(uint EffectIndex, void* pParameters, uint ParametersByteSize); + + [VtblIndex(8)] + HResult SetFilterParameters(FilterParameters* pParameters, uint OperationSet); + + [VtblIndex(9)] + void GetFilterParameters(FilterParameters* pParameters); + + [VtblIndex(10)] + HResult SetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters, uint OperationSet); + + [VtblIndex(11)] + void GetOutputFilterParameters(IXAudio2Voice* pDestinationVoice, FilterParameters* pParameters); + + [VtblIndex(12)] + HResult SetVolume(float Volume, uint OperationSet); + + [VtblIndex(13)] + void GetVolume(float* pVolume); + + [VtblIndex(14)] + HResult SetChannelVolumes(uint Channels, float* pVolumes, uint OperationSet); + + [VtblIndex(15)] + void GetChannelVolumes(uint Channels, float* pVolumes); + + [VtblIndex(16)] + HResult SetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix, uint OperationSet); + + [VtblIndex(17)] + void GetOutputMatrix(IXAudio2Voice* pDestinationVoice, uint SourceChannels, uint DestinationChannels, float* pLevelMatrix); + + [VtblIndex(18)] + void DestroyVoice(); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2VoiceCallback.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2VoiceCallback.cs new file mode 100644 index 0000000..bcaa71c --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/IXAudio2VoiceCallback.cs @@ -0,0 +1,126 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// IXAudio2VoiceCallback +public unsafe partial struct IXAudio2VoiceCallback : IXAudio2VoiceCallback.Interface +{ + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public void OnVoiceProcessingPassStart(uint BytesRequired) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[0]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), BytesRequired); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), BytesRequired); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + public void OnVoiceProcessingPassEnd() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[1]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + public void OnStreamEnd() + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[2]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this)); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this)); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public void OnBufferStart(void* pBufferContext) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[3]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(4)] + public void OnBufferEnd(void* pBufferContext) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[4]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[4]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(5)] + public void OnLoopEnd(void* pBufferContext) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[5]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[5]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext); +#endif + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(6)] + public void OnVoiceError(void* pBufferContext, HResult Error) + { +#if NET6_0_OR_GREATER + ((delegate* unmanaged)(lpVtbl[6]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext, Error); +#else + ((delegate* unmanaged[Stdcall])(lpVtbl[6]))((IXAudio2VoiceCallback*)Unsafe.AsPointer(ref this), pBufferContext, Error); +#endif + } + + public interface Interface + { + [VtblIndex(0)] + void OnVoiceProcessingPassStart(uint BytesRequired); + + [VtblIndex(1)] + void OnVoiceProcessingPassEnd(); + + [VtblIndex(2)] + void OnStreamEnd(); + + [VtblIndex(3)] + void OnBufferStart(void* pBufferContext); + + [VtblIndex(4)] + void OnBufferEnd(void* pBufferContext); + + [VtblIndex(5)] + void OnLoopEnd(void* pBufferContext); + + [VtblIndex(6)] + void OnVoiceError(void* pBufferContext, HResult Error); + } +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.Functions.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.Functions.cs new file mode 100644 index 0000000..5c6d51f --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.Functions.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +public static unsafe partial class Apis +{ + /// + [DllImport("XAudio2_9.dll", ExactSpelling = true)] + public static extern HResult CreateFX(Guid* clsid, IUnknown** pEffect, void* pInitDat, uint InitDataByteSize); + + /// + [DllImport("XAudio2_9.dll", ExactSpelling = true)] + public static extern HResult XAudio2CreateWithVersionInfo(IXAudio2** ppXAudio2, uint Flags, uint XAudio2Processor, uint ntddiVersion); + + /// + [DllImport("xaudio2_9.dll", ExactSpelling = true)] + public static extern HResult CreateAudioVolumeMeter(IUnknown** ppApo); + + /// + [DllImport("xaudio2_9.dll", ExactSpelling = true)] + public static extern HResult CreateAudioReverb(IUnknown** ppApo); + + /// + [DllImport("HrtfApo.dll", ExactSpelling = true)] + public static extern HResult CreateHrtfApo(HrtfApoInit* init, IXAPO** xApo); +} diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.cs new file mode 100644 index 0000000..942c037 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Apis.cs @@ -0,0 +1,462 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +public static partial class Apis +{ + public const uint FXEQ_MIN_FRAMERATE = 22000; + + public const uint FXEQ_MAX_FRAMERATE = 48000; + + public const float FXEQ_MIN_FREQUENCY_CENTER = 20f; + + public const float FXEQ_MAX_FREQUENCY_CENTER = 20000f; + + public const float FXEQ_DEFAULT_FREQUENCY_CENTER_0 = 100f; + + public const float FXEQ_DEFAULT_FREQUENCY_CENTER_1 = 800f; + + public const float FXEQ_DEFAULT_FREQUENCY_CENTER_2 = 2000f; + + public const float FXEQ_DEFAULT_FREQUENCY_CENTER_3 = 10000f; + + public const float FXEQ_MIN_GAIN = 0.126f; + + public const float FXEQ_MAX_GAIN = 7.94f; + + public const float FXEQ_DEFAULT_GAIN = 1f; + + public const float FXEQ_MIN_BANDWIDTH = 0.1f; + + public const float FXEQ_MAX_BANDWIDTH = 2f; + + public const float FXEQ_DEFAULT_BANDWIDTH = 1f; + + public const uint FXMASTERINGLIMITER_MIN_RELEASE = 1; + + public const uint FXMASTERINGLIMITER_MAX_RELEASE = 20; + + public const uint FXMASTERINGLIMITER_DEFAULT_RELEASE = 6; + + public const uint FXMASTERINGLIMITER_MIN_LOUDNESS = 1; + + public const uint FXMASTERINGLIMITER_MAX_LOUDNESS = 1800; + + public const uint FXMASTERINGLIMITER_DEFAULT_LOUDNESS = 1000; + + public const float FXREVERB_MIN_DIFFUSION = 0f; + + public const float FXREVERB_MAX_DIFFUSION = 1f; + + public const float FXREVERB_DEFAULT_DIFFUSION = 0.9f; + + public const float FXREVERB_MIN_ROOMSIZE = 0.0001f; + + public const float FXREVERB_MAX_ROOMSIZE = 1f; + + public const float FXREVERB_DEFAULT_ROOMSIZE = 0.6f; + + public const uint FXLOUDNESS_DEFAULT_MOMENTARY_MS = 400; + + public const uint FXLOUDNESS_DEFAULT_SHORTTERM_MS = 3000; + + public const float FXECHO_MIN_WETDRYMIX = 0f; + + public const float FXECHO_MAX_WETDRYMIX = 1f; + + public const float FXECHO_DEFAULT_WETDRYMIX = 0.5f; + + public const float FXECHO_MIN_FEEDBACK = 0f; + + public const float FXECHO_MAX_FEEDBACK = 1f; + + public const float FXECHO_DEFAULT_FEEDBACK = 0.5f; + + public const float FXECHO_MIN_DELAY = 1f; + + public const float FXECHO_MAX_DELAY = 2000f; + + public const float FXECHO_DEFAULT_DELAY = 500f; + + public const string XAUDIO2_DLL_A = "xaudio2_9.dll"; + + public const string XAUDIO2_DLL_W = "xaudio2_9.dll"; + + public const string XAUDIO2D_DLL_A = "xaudio2_9d.dll"; + + public const string XAUDIO2D_DLL_W = "xaudio2_9d.dll"; + + public const string XAUDIO2_DLL = "xaudio2_9.dll"; + + public const string XAUDIO2D_DLL = "xaudio2_9d.dll"; + + public const uint XAUDIO2_MAX_BUFFER_BYTES = 2147483648; + + public const uint XAUDIO2_MAX_QUEUED_BUFFERS = 64; + + public const uint XAUDIO2_MAX_BUFFERS_SYSTEM = 2; + + public const uint XAUDIO2_MAX_AUDIO_CHANNELS = 64; + + public const uint XAUDIO2_MIN_SAMPLE_RATE = 1000; + + public const uint XAUDIO2_MAX_SAMPLE_RATE = 200000; + + public const float XAUDIO2_MAX_VOLUME_LEVEL = 16777216f; + + public const float XAUDIO2_MAX_FREQ_RATIO = 1024f; + + public const float XAUDIO2_DEFAULT_FREQ_RATIO = 2f; + + public const float XAUDIO2_MAX_FILTER_ONEOVERQ = 1.5f; + + public const float XAUDIO2_MAX_FILTER_FREQUENCY = 1f; + + public const uint XAUDIO2_MAX_LOOP_COUNT = 254; + + public const uint XAUDIO2_MAX_INSTANCES = 8; + + public const uint XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO = 600000; + + public const uint XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL = 300000; + + public const uint XAUDIO2_COMMIT_NOW = 0; + + public const uint XAUDIO2_COMMIT_ALL = 0; + + public const uint XAUDIO2_NO_LOOP_REGION = 0; + + public const uint XAUDIO2_LOOP_INFINITE = 255; + + public const uint XAUDIO2_DEFAULT_CHANNELS = 0; + + public const uint XAUDIO2_DEFAULT_SAMPLERATE = 0; + + public const uint XAUDIO2_DEBUG_ENGINE = 1; + + public const uint XAUDIO2_VOICE_NOPITCH = 2; + + public const uint XAUDIO2_VOICE_NOSRC = 4; + + public const uint XAUDIO2_VOICE_USEFILTER = 8; + + public const uint XAUDIO2_PLAY_TAILS = 32; + + public const uint XAUDIO2_END_OF_STREAM = 64; + + public const uint XAUDIO2_SEND_USEFILTER = 128; + + public const uint XAUDIO2_VOICE_NOSAMPLESPLAYED = 256; + + public const uint XAUDIO2_STOP_ENGINE_WHEN_IDLE = 8192; + + public const uint XAUDIO2_1024_QUANTUM = 32768; + + public const uint XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT = 65536; + + public const float XAUDIO2_DEFAULT_FILTER_FREQUENCY = 1f; + + public const float XAUDIO2_DEFAULT_FILTER_ONEOVERQ = 1f; + + public const uint XAUDIO2_QUANTUM_NUMERATOR = 1; + + public const uint XAUDIO2_QUANTUM_DENOMINATOR = 100; + + public const uint FACILITY_XAUDIO2 = 2198; + + public static readonly HResult XAUDIO2_E_INVALID_CALL = -2003435519; + + public static readonly HResult XAUDIO2_E_XMA_DECODER_ERROR = -2003435518; + + public static readonly HResult XAUDIO2_E_XAPO_CREATION_FAILED = -2003435517; + + public static readonly HResult XAUDIO2_E_DEVICE_INVALIDATED = -2003435516; + + public const uint Processor1 = 1; + + public const uint Processor2 = 2; + + public const uint Processor3 = 4; + + public const uint Processor4 = 8; + + public const uint Processor5 = 16; + + public const uint Processor6 = 32; + + public const uint Processor7 = 64; + + public const uint Processor8 = 128; + + public const uint Processor9 = 256; + + public const uint Processor10 = 512; + + public const uint Processor11 = 1024; + + public const uint Processor12 = 2048; + + public const uint Processor13 = 4096; + + public const uint Processor14 = 8192; + + public const uint Processor15 = 16384; + + public const uint Processor16 = 32768; + + public const uint Processor17 = 65536; + + public const uint Processor18 = 131072; + + public const uint Processor19 = 262144; + + public const uint Processor20 = 524288; + + public const uint Processor21 = 1048576; + + public const uint Processor22 = 2097152; + + public const uint Processor23 = 4194304; + + public const uint Processor24 = 8388608; + + public const uint Processor25 = 16777216; + + public const uint Processor26 = 33554432; + + public const uint Processor27 = 67108864; + + public const uint Processor28 = 134217728; + + public const uint Processor29 = 268435456; + + public const uint Processor30 = 536870912; + + public const uint Processor31 = 1073741824; + + public const uint Processor32 = 2147483648; + + public const uint XAUDIO2_ANY_PROCESSOR = 4294967295; + + public const uint XAUDIO2_USE_DEFAULT_PROCESSOR = 0; + + public const uint XAUDIO2_DEFAULT_PROCESSOR = 1; + + public const uint XAUDIO2_LOG_ERRORS = 1; + + public const uint XAUDIO2_LOG_WARNINGS = 2; + + public const uint XAUDIO2_LOG_INFO = 4; + + public const uint XAUDIO2_LOG_DETAIL = 8; + + public const uint XAUDIO2_LOG_API_CALLS = 16; + + public const uint XAUDIO2_LOG_FUNC_CALLS = 32; + + public const uint XAUDIO2_LOG_TIMING = 64; + + public const uint XAUDIO2_LOG_LOCKS = 128; + + public const uint XAUDIO2_LOG_MEMORY = 256; + + public const uint XAUDIO2_LOG_STREAMING = 4096; + + public const uint XAUDIO2FX_REVERB_MIN_FRAMERATE = 20000; + + public const uint XAUDIO2FX_REVERB_MAX_FRAMERATE = 48000; + + public const float XAUDIO2FX_REVERB_MIN_WET_DRY_MIX = 0f; + + public const uint XAUDIO2FX_REVERB_MIN_REFLECTIONS_DELAY = 0; + + public const uint XAUDIO2FX_REVERB_MIN_REVERB_DELAY = 0; + + public const uint XAUDIO2FX_REVERB_MIN_REAR_DELAY = 0; + + public const uint XAUDIO2FX_REVERB_MIN_7POINT1_SIDE_DELAY = 0; + + public const uint XAUDIO2FX_REVERB_MIN_7POINT1_REAR_DELAY = 0; + + public const uint XAUDIO2FX_REVERB_MIN_POSITION = 0; + + public const uint XAUDIO2FX_REVERB_MIN_DIFFUSION = 0; + + public const uint XAUDIO2FX_REVERB_MIN_LOW_EQ_GAIN = 0; + + public const uint XAUDIO2FX_REVERB_MIN_LOW_EQ_CUTOFF = 0; + + public const uint XAUDIO2FX_REVERB_MIN_HIGH_EQ_GAIN = 0; + + public const uint XAUDIO2FX_REVERB_MIN_HIGH_EQ_CUTOFF = 0; + + public const float XAUDIO2FX_REVERB_MIN_ROOM_FILTER_FREQ = 20f; + + public const float XAUDIO2FX_REVERB_MIN_ROOM_FILTER_MAIN = -100f; + + public const float XAUDIO2FX_REVERB_MIN_ROOM_FILTER_HF = -100f; + + public const float XAUDIO2FX_REVERB_MIN_REFLECTIONS_GAIN = -100f; + + public const float XAUDIO2FX_REVERB_MIN_REVERB_GAIN = -100f; + + public const float XAUDIO2FX_REVERB_MIN_DECAY_TIME = 0.1f; + + public const float XAUDIO2FX_REVERB_MIN_DENSITY = 0f; + + public const float XAUDIO2FX_REVERB_MIN_ROOM_SIZE = 0f; + + public const float XAUDIO2FX_REVERB_MAX_WET_DRY_MIX = 100f; + + public const uint XAUDIO2FX_REVERB_MAX_REFLECTIONS_DELAY = 300; + + public const uint XAUDIO2FX_REVERB_MAX_REVERB_DELAY = 85; + + public const uint XAUDIO2FX_REVERB_MAX_REAR_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_MAX_7POINT1_SIDE_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_MAX_7POINT1_REAR_DELAY = 20; + + public const uint XAUDIO2FX_REVERB_MAX_POSITION = 30; + + public const uint XAUDIO2FX_REVERB_MAX_DIFFUSION = 15; + + public const uint XAUDIO2FX_REVERB_MAX_LOW_EQ_GAIN = 12; + + public const uint XAUDIO2FX_REVERB_MAX_LOW_EQ_CUTOFF = 9; + + public const uint XAUDIO2FX_REVERB_MAX_HIGH_EQ_GAIN = 8; + + public const uint XAUDIO2FX_REVERB_MAX_HIGH_EQ_CUTOFF = 14; + + public const float XAUDIO2FX_REVERB_MAX_ROOM_FILTER_FREQ = 20000f; + + public const float XAUDIO2FX_REVERB_MAX_ROOM_FILTER_MAIN = 0f; + + public const float XAUDIO2FX_REVERB_MAX_ROOM_FILTER_HF = 0f; + + public const float XAUDIO2FX_REVERB_MAX_REFLECTIONS_GAIN = 20f; + + public const float XAUDIO2FX_REVERB_MAX_REVERB_GAIN = 20f; + + public const float XAUDIO2FX_REVERB_MAX_DENSITY = 100f; + + public const float XAUDIO2FX_REVERB_MAX_ROOM_SIZE = 100f; + + public const float XAUDIO2FX_REVERB_DEFAULT_WET_DRY_MIX = 100f; + + public const uint XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_DEFAULT_REVERB_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_DEFAULT_REAR_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_DEFAULT_7POINT1_SIDE_DELAY = 5; + + public const uint XAUDIO2FX_REVERB_DEFAULT_7POINT1_REAR_DELAY = 20; + + public const uint XAUDIO2FX_REVERB_DEFAULT_POSITION = 6; + + public const uint XAUDIO2FX_REVERB_DEFAULT_POSITION_MATRIX = 27; + + public const uint XAUDIO2FX_REVERB_DEFAULT_EARLY_DIFFUSION = 8; + + public const uint XAUDIO2FX_REVERB_DEFAULT_LATE_DIFFUSION = 8; + + public const uint XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_GAIN = 8; + + public const uint XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_CUTOFF = 4; + + public const uint XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_GAIN = 8; + + public const uint XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_CUTOFF = 4; + + public const float XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_FREQ = 5000f; + + public const float XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_MAIN = 0f; + + public const float XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_HF = 0f; + + public const float XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_GAIN = 0f; + + public const float XAUDIO2FX_REVERB_DEFAULT_REVERB_GAIN = 0f; + + public const float XAUDIO2FX_REVERB_DEFAULT_DECAY_TIME = 1f; + + public const float XAUDIO2FX_REVERB_DEFAULT_DENSITY = 100f; + + public const float XAUDIO2FX_REVERB_DEFAULT_ROOM_SIZE = 100f; + + public const uint XAUDIO2FX_REVERB_DEFAULT_DISABLE_LATE_FIELD = 0; + + public const float HRTF_MAX_GAIN_LIMIT = 12f; + + public const float HRTF_MIN_GAIN_LIMIT = -96f; + + public const float HRTF_MIN_UNITY_GAIN_DISTANCE = 0.05f; + + public const float HRTF_DEFAULT_UNITY_GAIN_DISTANCE = 1f; + + public const uint FACILITY_XAPO = 2199; + + public static readonly HResult XAPO_E_FORMAT_UNSUPPORTED = -2003369983; + + public const uint XAPO_MIN_CHANNELS = 1; + + public const uint XAPO_MAX_CHANNELS = 64; + + public const uint XAPO_MIN_FRAMERATE = 1000; + + public const uint XAPO_MAX_FRAMERATE = 200000; + + public const uint XAPO_REGISTRATION_STRING_LENGTH = 256; + + public const uint XAPO_FLAG_CHANNELS_MUST_MATCH = 1; + + public const uint XAPO_FLAG_FRAMERATE_MUST_MATCH = 2; + + public const uint XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH = 4; + + public const uint XAPO_FLAG_BUFFERCOUNT_MUST_MATCH = 8; + + public const uint XAPO_FLAG_INPLACE_REQUIRED = 32; + + public const uint XAPO_FLAG_INPLACE_SUPPORTED = 16; + + public const uint SPEAKER_MONO = 4; + + public const uint X3DAUDIO_HANDLE_BYTESIZE = 20; + + public const float X3DAUDIO_PI = 3.1415927f; + + public const float X3DAUDIO_2PI = 6.2831855f; + + public const float X3DAUDIO_SPEED_OF_SOUND = 343.5f; + + public const uint X3DAUDIO_CALCULATE_MATRIX = 1; + + public const uint X3DAUDIO_CALCULATE_DELAY = 2; + + public const uint X3DAUDIO_CALCULATE_LPF_DIRECT = 4; + + public const uint X3DAUDIO_CALCULATE_LPF_REVERB = 8; + + public const uint X3DAUDIO_CALCULATE_REVERB = 16; + + public const uint X3DAUDIO_CALCULATE_DOPPLER = 32; + + public const uint X3DAUDIO_CALCULATE_EMITTER_ANGLE = 64; + + public const uint X3DAUDIO_CALCULATE_ZEROCENTER = 65536; + + public const uint X3DAUDIO_CALCULATE_REDIRECT_TO_LFE = 131072; +} + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Enums.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Enums.cs new file mode 100644 index 0000000..48e1ea6 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Enums.cs @@ -0,0 +1,93 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// XAPO_BUFFER_FLAGS +[Flags] +public enum XAPOBufferFlags +{ + None = 0, + /// + /// XAPO_BUFFER_SILENT + Silent = 0, + /// + /// XAPO_BUFFER_VALID + Valid = 1, +} + +/// +/// XAUDIO2_FILTER_TYPE +public enum FilterType +{ + /// + /// LowPassFilter + LowPassFilter = 0, + /// + /// BandPassFilter + BandPassFilter = 1, + /// + /// HighPassFilter + HighPassFilter = 2, + /// + /// NotchFilter + NotchFilter = 3, + /// + /// LowPassOnePoleFilter + LowPassOnePoleFilter = 4, + /// + /// HighPassOnePoleFilter + HighPassOnePoleFilter = 5, +} + +/// +/// HrtfDirectivityType +public enum HrtfDirectivityType +{ + /// + /// OmniDirectional + OmniDirectional = 0, + /// + /// Cardioid + Cardioid = 1, + /// + /// Cone + Cone = 2, +} + +/// +/// HrtfEnvironment +public enum HrtfEnvironment +{ + /// + /// Small + Small = 0, + /// + /// Medium + Medium = 1, + /// + /// Large + Large = 2, + /// + /// Outdoors + Outdoors = 3, +} + +/// +/// HrtfDistanceDecayType +public enum HrtfDistanceDecayType +{ + /// + /// NaturalDecay + NaturalDecay = 0, + /// + /// CustomDecay + CustomDecay = 1, +} diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Structs.cs b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Structs.cs new file mode 100644 index 0000000..e34aa3b --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Generated/Media.Audio.XAudio2.Structs.cs @@ -0,0 +1,584 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Win32.Media.Audio.XAudio2; + +/// +/// XAPO_REGISTRATION_PROPERTIES +public partial struct XAPORegistrationProperties +{ + /// + public Guid clsid; + + /// + public unsafe fixed ushort FriendlyName[256]; + + /// + public unsafe fixed ushort CopyrightInfo[256]; + + /// + public uint MajorVersion; + + /// + public uint MinorVersion; + + /// + public uint Flags; + + /// + public uint MinInputBufferCount; + + /// + public uint MaxInputBufferCount; + + /// + public uint MinOutputBufferCount; + + /// + public uint MaxOutputBufferCount; +} + +/// +/// XAPO_LOCKFORPROCESS_PARAMETERS +public partial struct XAPOLockForProcessParameters +{ + /// + public unsafe Media.Audio.WaveFormatEx* pFormat; + + /// + public uint MaxFrameCount; +} + +/// +/// XAPO_PROCESS_BUFFER_PARAMETERS +public partial struct XAPOProcessBufferParameters +{ + /// + public unsafe void* pBuffer; + + /// + public XAPOBufferFlags BufferFlags; + + /// + public uint ValidFrameCount; +} + +/// +/// FXEQ_PARAMETERS +public partial struct FXEQParameters +{ + /// + public float FrequencyCenter0; + + /// + public float Gain0; + + /// + public float Bandwidth0; + + /// + public float FrequencyCenter1; + + /// + public float Gain1; + + /// + public float Bandwidth1; + + /// + public float FrequencyCenter2; + + /// + public float Gain2; + + /// + public float Bandwidth2; + + /// + public float FrequencyCenter3; + + /// + public float Gain3; + + /// + public float Bandwidth3; +} + +/// +/// FXMASTERINGLIMITER_PARAMETERS +public partial struct FxMasteringLimiterParameters +{ + /// + public uint Release; + + /// + public uint Loudness; +} + +/// +/// FXREVERB_PARAMETERS +public partial struct FxReverbParameters +{ + /// + public float Diffusion; + + /// + public float RoomSize; +} + +/// +/// FXECHO_INITDATA +public partial struct FxEchoInitData +{ + /// + public float MaxDelay; +} + +/// +/// FXECHO_PARAMETERS +public partial struct FxEchoParameters +{ + /// + public float WetDryMix; + + /// + public float Feedback; + + /// + public float Delay; +} + +/// +/// XAUDIO2_VOICE_DETAILS +public partial struct VoiceDetails +{ + /// + public uint CreationFlags; + + /// + public uint ActiveFlags; + + /// + public uint InputChannels; + + /// + public uint InputSampleRate; +} + +/// +/// XAUDIO2_SEND_DESCRIPTOR +public partial struct SendDescriptor +{ + /// + public uint Flags; + + /// + public unsafe IXAudio2Voice* pOutputVoice; +} + +/// +/// XAUDIO2_VOICE_SENDS +public partial struct VoiceSends +{ + /// + public uint SendCount; + + /// + public unsafe SendDescriptor* pSends; +} + +/// +/// XAUDIO2_EFFECT_DESCRIPTOR +public partial struct EffectDescriptor +{ + /// + public unsafe IUnknown* pEffect; + + /// + public Bool32 InitialState; + + /// + public uint OutputChannels; +} + +/// +/// XAUDIO2_EFFECT_CHAIN +public partial struct EffectChain +{ + /// + public uint EffectCount; + + /// + public unsafe EffectDescriptor* pEffectDescriptors; +} + +/// +/// XAUDIO2_FILTER_PARAMETERS +public partial struct FilterParameters +{ + /// + public FilterType Type; + + /// + public float Frequency; + + /// + public float OneOverQ; +} + +/// +/// XAUDIO2_BUFFER +public partial struct Buffer +{ + /// + public uint Flags; + + /// + public uint AudioBytes; + + /// + public unsafe byte* pAudioData; + + /// + public uint PlayBegin; + + /// + public uint PlayLength; + + /// + public uint LoopBegin; + + /// + public uint LoopLength; + + /// + public uint LoopCount; + + /// + public unsafe void* pContext; +} + +/// +/// XAUDIO2_BUFFER_WMA +public partial struct BufferWma +{ + /// + public unsafe uint* pDecodedPacketCumulativeBytes; + + /// + public uint PacketCount; +} + +/// +/// XAUDIO2_VOICE_STATE +public partial struct VoiceState +{ + /// + public unsafe void* pCurrentBufferContext; + + /// + public uint BuffersQueued; + + /// + public ulong SamplesPlayed; +} + +/// +/// XAUDIO2_PERFORMANCE_DATA +public partial struct PerformanceData +{ + /// + public ulong AudioCyclesSinceLastQuery; + + /// + public ulong TotalCyclesSinceLastQuery; + + /// + public uint MinimumCyclesPerQuantum; + + /// + public uint MaximumCyclesPerQuantum; + + /// + public uint MemoryUsageInBytes; + + /// + public uint CurrentLatencyInSamples; + + /// + public uint GlitchesSinceEngineStarted; + + /// + public uint ActiveSourceVoiceCount; + + /// + public uint TotalSourceVoiceCount; + + /// + public uint ActiveSubmixVoiceCount; + + /// + public uint ActiveResamplerCount; + + /// + public uint ActiveMatrixMixCount; + + /// + public uint ActiveXmaSourceVoices; + + /// + public uint ActiveXmaStreams; +} + +/// +/// XAUDIO2_DEBUG_CONFIGURATION +public partial struct DebugConfiguration +{ + /// + public uint TraceMask; + + /// + public uint BreakMask; + + /// + public Bool32 LogThreadID; + + /// + public Bool32 LogFileline; + + /// + public Bool32 LogFunctionName; + + /// + public Bool32 LogTiming; +} + +/// +/// XAUDIO2FX_VOLUMEMETER_LEVELS +public partial struct FXVolumeMeterLevels +{ + /// + public unsafe float* pPeakLevels; + + /// + public unsafe float* pRMSLevels; + + /// + public uint ChannelCount; +} + +/// +/// XAUDIO2FX_REVERB_PARAMETERS +public partial struct FXReverbParameters +{ + /// + public float WetDryMix; + + /// + public uint ReflectionsDelay; + + /// + public byte ReverbDelay; + + /// + public byte RearDelay; + + /// + public byte SideDelay; + + /// + public byte PositionLeft; + + /// + public byte PositionRight; + + /// + public byte PositionMatrixLeft; + + /// + public byte PositionMatrixRight; + + /// + public byte EarlyDiffusion; + + /// + public byte LateDiffusion; + + /// + public byte LowEQGain; + + /// + public byte LowEQCutoff; + + /// + public byte HighEQGain; + + /// + public byte HighEQCutoff; + + /// + public float RoomFilterFreq; + + /// + public float RoomFilterMain; + + /// + public float RoomFilterHF; + + /// + public float ReflectionsGain; + + /// + public float ReverbGain; + + /// + public float DecayTime; + + /// + public float Density; + + /// + public float RoomSize; + + /// + public Bool32 DisableLateField; +} + +/// +/// XAUDIO2FX_REVERB_I3DL2_PARAMETERS +public partial struct FXReverbI3DL2Parameters +{ + /// + public float WetDryMix; + + /// + public int Room; + + /// + public int RoomHF; + + /// + public float RoomRolloffFactor; + + /// + public float DecayTime; + + /// + public float DecayHFRatio; + + /// + public int Reflections; + + /// + public float ReflectionsDelay; + + /// + public int Reverb; + + /// + public float ReverbDelay; + + /// + public float Diffusion; + + /// + public float Density; + + /// + public float HFReference; +} + +/// +/// HrtfPosition +public partial struct HrtfPosition +{ + /// + public float x; + + /// + public float y; + + /// + public float z; +} + +/// +/// HrtfOrientation +public partial struct HrtfOrientation +{ + /// + public unsafe fixed float element[9]; +} + +/// +/// HrtfDirectivity +public partial struct HrtfDirectivity +{ + /// + public HrtfDirectivityType type; + + /// + public float scaling; +} + +/// +/// HrtfDirectivityCardioid +public partial struct HrtfDirectivityCardioid +{ + /// + public HrtfDirectivity directivity; + + /// + public float order; +} + +/// +/// HrtfDirectivityCone +public partial struct HrtfDirectivityCone +{ + /// + public HrtfDirectivity directivity; + + /// + public float innerAngle; + + /// + public float outerAngle; +} + +/// +/// HrtfDistanceDecay +public partial struct HrtfDistanceDecay +{ + /// + public HrtfDistanceDecayType type; + + /// + public float maxGain; + + /// + public float minGain; + + /// + public float unityGainDistance; + + /// + public float cutoffDistance; +} + +/// +/// HrtfApoInit +public partial struct HrtfApoInit +{ + /// + public unsafe HrtfDistanceDecay* distanceDecay; + + /// + public unsafe HrtfDirectivity* directivity; +} diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/Vortice.Win32.Media.Audio.XAudio2.csproj b/src/Vortice.Win32.Media.Audio.XAudio2/Vortice.Win32.Media.Audio.XAudio2.csproj new file mode 100644 index 0000000..fd752a6 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/Vortice.Win32.Media.Audio.XAudio2.csproj @@ -0,0 +1,24 @@ + + + + netstandard2.0;netstandard2.1;net6.0;net7.0 + Direct3D11on12 bindings. + + $(NoWarn);CS0419;IDE0017 + + + + + + + + + + + + + + + + + diff --git a/src/Vortice.Win32.Media.Audio.XAudio2/XAudio2.xml b/src/Vortice.Win32.Media.Audio.XAudio2/XAudio2.xml new file mode 100644 index 0000000..2a90c45 --- /dev/null +++ b/src/Vortice.Win32.Media.Audio.XAudio2/XAudio2.xml @@ -0,0 +1,773 @@ + + + + + Reconfigures the voice to consume source data at a different sample rate than the rate specified when the voice was created. + Microsoft Docs: + The new sample rate the voice should process submitted data at. Valid sample rates are 1kHz to 200kHz. + + + + + Releases a reference to the XAudio2 object. + Microsoft Docs: + + + + + Stops looping the voice when it reaches the end of the current loop region. + Microsoft Docs: + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Returns current resource usage details, such as available memory or CPU usage. + Microsoft Docs: + On success, pointer to an XAUDIO2_PERFORMANCE_DATA structure that is returned. + + + + + Returns information about the creation flags, input channels, and sample rate of a voice. + Microsoft Docs: + XAUDIO2_VOICE_DETAILS structure containing information about the voice. + + + + + Creates and configures a mastering voice. + Microsoft Docs: + If successful, returns a pointer to the new IXAudio2MasteringVoice object. + TBD + Flags that specify the behavior of the mastering voice. Must be 0. + Number of channels the mastering voice expects in its input audio. +InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. + + + +You can set InputChannels to XAUDIO2_DEFAULT_CHANNELS, which causes XAudio2 to try to detect the system speaker configuration setup. + Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. +InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. + + + +You can set InputSampleRate to XAUDIO2_DEFAULT_SAMPLERATE, with the default being determined by the current platform. + + + +Windows XP defaults to 44100. + + + +Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). + +Flags + The audio stream category to use for this mastering voice. + Pointer to an XAUDIO2_EFFECT_CHAIN structure that describes an effect chain to use in the mastering voice, or NULL to use no effects. + Identifier of the device to receive the output audio. Specifying the default value of NULL causes XAudio2 to select the global default audio device. + + + + + Inline function that converts from the radian frequencies used in XAUDIO2_FILTER_PARAMETERS back to absolute frequencies in hertz. + Microsoft Docs: + Value of the Frequency member of the XAUDIO2_FILTER_PARAMETERS structure. + The sample rate of the audio data affected by the XAUDIO2_FILTER_PARAMETERS structure. + + + + + Enables the effect at a given position in the effect chain of the voice. + Microsoft Docs: + Zero-based index of an effect in the effect chain of the voice. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Called by XAudio2 just before an audio processing pass begins. + Microsoft Docs: + + + + + Called if a critical system error occurs that requires XAudio2 to be closed down and restarted. + Microsoft Docs: + Error code returned by XAudio2. + + + + + Sets parameters for a given effect in the voice's effect chain. + Microsoft Docs: + Zero-based index of an effect within the voice's effect chain. + Returns the current values of the effect-specific parameters. + Size of the pParameters array in bytes. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Removes all pending audio buffers from the voice queue. + Microsoft Docs: + + + + + Notifies an XAudio2 voice that no more buffers are coming after the last one that is currently in its queue. + Microsoft Docs: + + + + + Inline function that converts from filter cutoff frequencies expressed in hertz to the radian frequency values used in the Frequency member of the XAUDIO2_FILTER_PARAMETERS structure. + Microsoft Docs: + The cutoff frequency in hertz. Frequencies greater than SampleRate ÷ 6 are clamped to XAUDIO2_MAX_FILTER_FREQUENCY. + The sample rate of the audio data affected by the XAUDIO2_FILTER_PARAMETERS structure. + + + + + Gets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice. + Microsoft Docs: + Pointer specifying the destination IXAudio2Voice to retrieve the output matrix for. + +
Note  If the voice sends to a single target voice then specifying NULL will cause GetOutputMatrix to operate on that target voice.
+
 
+ Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain. + Confirms the input channel count of the destination voice. + Array of [SourceChannels * DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is returned in the form pLevelMatrix[DestinationChannels × S + D]. See Remarks for more information on volume levels. +
+
+ + + Called during each processing pass for each voice, just before XAudio2 reads data from the voice's buffer queue. + Microsoft Docs: + The number of bytes that must be submitted immediately to avoid starvation. This allows the implementation of just-in-time streaming scenarios; the client can keep the absolute minimum data queued on the voice at all times, and pass it fresh data just before the data is required. This model provides the lowest possible latency attainable with XAudio2. For xWMA and XMA data BytesRequired will always be zero, since the concept of a frame of xWMA or XMA data is meaningless. + +
Note  In a situation where there is always plenty of data available on the source voice, BytesRequired should always report zero, because it doesn't need any samples immediately to avoid glitching.
+
 
+
+
+ + + Gets the voice's filter parameters. + Microsoft Docs: + Pointer to an XAUDIO2_FILTER_PARAMETERS structure containing the filter information. + + + + + Creates a new volume meter audio processing object (APO) and returns a pointer to it. + Microsoft Docs: + Contains the created volume meter APO. + + + + + Called when the voice is about to start processing a new audio buffer. + Microsoft Docs: + Context pointer that was assigned to the pContext member of the XAUDIO2_BUFFER structure when the buffer was submitted. + + + + + Removes an IXAudio2EngineCallback pointer from the XAudio2 engine callback list. + Microsoft Docs: + IXAudio2EngineCallback pointer to remove from the XAudio2 engine callback list. +If the given pointer is present more than once in the list, only the first instance in the list will be removed. + + + + + Sets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice. + Microsoft Docs: + Pointer to a destination IXAudio2Voice for which to set volume levels. + +
Note  If the voice sends to a single target voice then specifying NULL will cause SetOutputMatrix to operate on that target voice.
+
 
+ Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain. + Confirms the input channel count of the destination voice. + Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form pLevelMatrix[SourceChannels × D + S]. + + +For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels—but is absent from the center and low-frequency channels—the matrix might have the values shown in the following table. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OutputLeft Input [Array Index]Right Input [Array Index]
Left1.0 [0]0.0 [1]
Right0.0 [2]1.0 [3]
Front Center0.0 [4]0.0 [5]
LFE0.0 [6]0.0 [7]
Rear Left0.8 [8]0.0 [9]
Rear Right0.0 [10]0.8 [11]
+  + +
Note  The left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels.
+
 
+See Remarks for more information on volume levels. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. +
+
+ + + Adds a new audio buffer to the voice queue. + Microsoft Docs: + Pointer to an XAUDIO2_BUFFER structure to queue. + TBD + Pointer to an additional XAUDIO2_BUFFER_WMA structure used when submitting WMA data. + + + + + Adds a reference to the XAudio2 object. + Microsoft Docs: + + + + + Called when the voice has just finished playing a contiguous audio stream. + Microsoft Docs: + + + + + Called when the voice reaches the end position of a loop. + Microsoft Docs: + Context pointer that was assigned to the pContext member of the XAUDIO2_BUFFER structure when the buffer was submitted. + + + + + Sets the overall volume level for the voice. + Microsoft Docs: + Overall volume level to use. See Remarks for more information on volume levels. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Queries for a given COM interface on the XAudio2 object. + Microsoft Docs: + The REFIID that identifies the interface to query for. + Address of a pointer that receives the interface. + + + + + Returns the volume levels for the voice, per channel. + Microsoft Docs: + Confirms the channel count of the voice. + Returns the current volume level of each channel in the voice. The array must have at least Channels elements. See Remarks for more information on volume levels. + + + + + Gets the current overall volume level of the voice. + Microsoft Docs: + Returns the current overall volume level of the voice. See Remarks for more information on volume levels. + + + + + Destroys the voice. If necessary, stops the voice and removes it from the XAudio2 graph. + Microsoft Docs: + + + + + Called when a critical error occurs during voice processing. + Microsoft Docs: + Context pointer that was assigned to the pContext member of the XAUDIO2_BUFFER structure when the buffer was submitted. + The HRESULT code of the error encountered. + + + + + Returns the running state of the effect at a specified position in the effect chain of the voice. + Microsoft Docs: + Zero-based index of an effect in the effect chain of the voice. + Returns TRUE If the effect is enabled. If the effect is disabled, returns FALSE. + + + + + Sets the voice's filter parameters. + Microsoft Docs: + Pointer to an XAUDIO2_FILTER_PARAMETERS structure containing the filter information. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Returns the current effect-specific parameters of a given effect in the voice's effect chain. + Microsoft Docs: + Zero-based index of an effect within the voice's effect chain. + Returns the current values of the effect-specific parameters. + Size, in bytes, of the pParameters array. + + + + + Returns the voice's current cursor position data. + Microsoft Docs: + Pointer to an XAUDIO2_VOICE_STATE structure containing the state of the voice. + TBD + Flags controlling which voice state data should be returned. Valid values are 0 or XAUDIO2_VOICE_NOSAMPLESPLAYED. The default value is 0. If you specify XAUDIO2_VOICE_NOSAMPLESPLAYED, GetState returns only the buffer state, not the sampler state. GetState takes roughly one-third as much time to complete when you specify +XAUDIO2_VOICE_NOSAMPLESPLAYED. + + + + + Returns the filter parameters from one of this voice's sends. + Microsoft Docs: + IXAudio2Voice pointer to the destination voice of the send whose filter parameters will be read. + Pointer to an XAUDIO2_FILTER_PARAMETERS structure containing the filter information. + + + + + Creates a new reverb audio processing object (APO), and returns a pointer to it. + Microsoft Docs: + Contains a pointer to the reverb APO that is created. + + + + + Inline function that converts a frequency ratio value to a semitone value. + Microsoft Docs: + Floating point value representing the frequency ratio. + + + + + Adds an IXAudio2EngineCallback pointer to the XAudio2 engine callback list. + Microsoft Docs: + IXAudio2EngineCallback pointer to add to the XAudio2 engine callback list. + + + + + Returns the channel mask for this voice. + Microsoft Docs: + Returns the channel mask for this voice. This corresponds to the dwChannelMask member of the WAVEFORMATEXTENSIBLE structure. + + + + + Creates a new XAudio2 object and returns a pointer to its IXAudio2 interface. + Microsoft Docs: + If the operation is successful, returns a pointer to an IXAudio2 object. + Flags that specify the behavior of the IXAudio2 object. The value of this parameter must be 0. + + + An XAUDIO2_PROCESSOR-typed value that specifies which CPU to use. If multiple bits are specified, the system will create a separate worker thread for each processor. + + + XAUDIO2_PROCESSOR default value is XAUDIO2_DEFAULT_PROCESSOR. + + + Warning If you specify XAUDIO2_ANY_PROCESSOR, the system will use all of the device's processors and, as noted above, create a worker thread for each processor. + + + Note  Specifying a processor should generally be avoided because it can interfere with the scheduler's ability to schedule threads effectively across processors. Instead, pass the XAUDIO2_DEFAULT_PROCESSOR value (see below). + + The special XAUDIO2_DEFAULT_PROCESSOR value causes XAudio2 to use its default processor. + + + + + + Changes global debug logging options for XAudio2. + Microsoft Docs: + Pointer to a XAUDIO2_DEBUG_CONFIGURATION structure that contains the new debug configuration. + This parameter is reserved and must be NULL. + + + + + Creates and configures a source voice. + Microsoft Docs: + If successful, returns a pointer to the new IXAudio2SourceVoice object. + Pointer to a one of the structures in the table below. This structure contains the expected format for all audio buffers submitted to the source voice. +XAudio2 supports PCM and ADPCM voice types. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Format tagWave format structureSize (in bytes)
WAVE_FORMAT_PCM (0x0001) +PCMWAVEFORMAT +16
-or- +WAVEFORMATEX +18
WAVE_FORMAT_IEEE_FLOAT (0x0003) [32-bit] +PCMWAVEFORMAT +18
WAVE_FORMAT_ADPCM (0x0002) [MS-ADPCM] +ADPCMWAVEFORMAT +50
WAVE_FORMAT_EXTENSIBLE (0xFFFE) +WAVEFORMATEXTENSIBLE +40
+  + +XAudio2 supports the following PCM formats. + + +
    +
  • 8-bit (unsigned) integer PCM + +
  • +
  • 16-bit integer PCM (optimal format for XAudio2) + +
  • +
  • 20-bit integer PCM (either in 24 or 32 bit containers) + +
  • +
  • 24-bit integer PCM (either in 24 or 32 bit containers) + +
  • +
  • 32-bit integer PCM + +
  • +
  • 32-bit float PCM (preferred format after 16-bit integer) +
  • +
+The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. + +
Note  PCM data formats such as PCMWAVEFORMAT and ADPCMWAVEFORMAT that require more information than provided by WAVEFORMATEX have a WAVEFORMATEX structure as the first member in their format structures. When you create a source voice with one of those formats, cast the format's structure as a WAVEFORMATEX structure and use it as the value for pSourceFormat.
+
 
+ TBD + Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: + + + + + + + + + + + + + + + + + + +
ValueDescription
XAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice. 
XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice. + The voice's outputs must have the same sample rate.
Note  The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified.
+
 
+
XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice. 
+  + +
Note  The XAUDIO2_VOICE_MUSIC flag is not supported on Windows.
+
 
+ Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to IXAudio2SourceVoice::SetFrequencyRatio are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. +The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. + + + +If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). + + + + + + + + + + + +
Xbox 360
For XMA voices, there is one more restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. +
+  + +
Note  You can use the lowest possible MaxFrequencyRatio value to reduce XAudio2's memory usage.
+
 
+ Pointer to a client-provided callback interface, IXAudio2VoiceCallback. + Pointer to a list of XAUDIO2_EFFECT_CHAIN structures that describe an effect chain to use in the source voice. + Pointer to a list of XAUDIO2_VOICE_SENDS structures that describe the set of destination voices for the source voice. If pSendList is NULL, the send list defaults to a single output to the first mastering voice created. +
+
+ + + Inline function that converts a decibel value to an amplitude ratio value. + Microsoft Docs: + Floating point value representing the decibel level. + + + + + Creates and configures a submix voice. + Microsoft Docs: + On success, returns a pointer to the new IXAudio2SubmixVoice object. + Number of channels in the input audio data of the submix voice. +InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. + Sample rate of the input audio data of submix voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. + TBD + Flags that specify the behavior of the submix voice. It can be 0 or the following: + + + + + + + + + + +
ValueDescription
XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.
+ An arbitrary number that specifies when this voice is processed with respect to other submix voices, if the XAudio2 engine is running other submix voices. The voice is processed after all other voices that include a smaller ProcessingStage value and before all other voices that include a larger ProcessingStage value. Voices that include the same ProcessingStage value are processed in any order. A submix voice cannot send to another submix voice with a lower or equal ProcessingStage value. This prevents audio being lost due to a submix cycle. + Pointer to a list of XAUDIO2_EFFECT_CHAIN structures that describe an effect chain to use in the submix voice. + Pointer to a list of XAUDIO2_VOICE_SENDS structures that describe the set of destination voices for the submix voice. If pSendList is NULL, the send list will default to a single output to the first mastering voice created. +
+
+ + + Stops consumption of audio by the current voice. + Microsoft Docs: + TBD + Flags that control how the voice is stopped. Can be 0 or the following: + + + + + + + + + + + +
ValueDescription
XAUDIO2_PLAY_TAILSContinue emitting effect output after the voice is stopped. 
+ Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. +
+
+ + + The IXAudio2VoiceCallback interface contains methods that notify the client when certain events happen in a given IXAudio2SourceVoice. + Microsoft Docs: + + + + + Inline function that converts a semitone value to a frequency ratio value. + Microsoft Docs: + Floating point value representing the semitone value. + + + + + Designates a new set of submix or mastering voices to receive the output of the voice. + Microsoft Docs: + Array of XAUDIO2_VOICE_SENDS structure pointers to destination voices. If pSendList is NULL, the voice will send its output to the current mastering voice. To set the voice to not send its output anywhere set the OutputCount member of XAUDIO2_VOICE_SENDS to 0. All of the voices in a send list must have the same input sample rate, see XAudio2 Sample Rate Conversions for additional information. + + + + + Called just after the processing pass for the voice ends. + Microsoft Docs: + + + + + Sets the frequency adjustment ratio of the voice. + Microsoft Docs: + Frequency adjustment ratio. This value must be between XAUDIO2_MIN_FREQ_RATIO and the MaxFrequencyRatio parameter specified when the voice was created (see IXAudio2::CreateSourceVoice). XAUDIO2_MIN_FREQ_RATIO currently is 0.0005, which allows pitch to be lowered by up to 11 octaves. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Called by XAudio2 just after an audio processing pass ends. + Microsoft Docs: + + + + + Stops the audio processing thread. + Microsoft Docs: + + + + + The IXAudio2EngineCallback interface contains methods that notify the client when certain events happen in the IXAudio2 engine. + Microsoft Docs: + + + + + Atomically applies a set of operations that are tagged with a given identifier. + Microsoft Docs: + Identifier of the set of operations to be applied. To commit all pending operations, pass XAUDIO2_COMMIT_ALL. + + + + + Inline function that converts an amplitude ratio value to a decibel value. + Microsoft Docs: + Floating point value representing the amplitude ratio. + + + + + Returns the frequency adjustment ratio of the voice. + Microsoft Docs: + Returns the current frequency adjustment ratio if successful. + + + + + Sets the filter parameters on one of this voice's sends. + Microsoft Docs: + IXAudio2Voice pointer to the destination voice of the send whose filter parameters will be set. + Pointer to an XAUDIO2_FILTER_PARAMETERS structure containing the filter information. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Replaces the effect chain of the voice. + Microsoft Docs: + Pointer to an XAUDIO2_EFFECT_CHAIN structure that describes the new effect chain to use. If NULL is passed, the current effect chain is removed. + +
Note  If pEffectChain is non-NULL, the XAUDIO2_EFFECT_CHAIN structure that it points to must specify at least one effect.
+
 
+
+
+ + + Disables the effect at a given position in the effect chain of the voice. + Microsoft Docs: + Zero-based index of an effect in the effect chain of the voice. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + A submix voice is used primarily for performance improvements and effects processing. + Microsoft Docs: + + + + + A mastering voice is used to represent the audio output device. + Microsoft Docs: + + + + + Inline function that converts from filter cutoff frequencies expressed in hertz to the filter coefficients used with the Frequency member of the XAUDIO2_FILTER_PARAMETERS structure. + Microsoft Docs: + The cutoff frequency in hertz. Frequencies greater than SampleRate are clamped to XAUDIO2_MAX_FILTER_FREQUENCY. + The sample rate of the audio data affected by the XAUDIO2_FILTER_PARAMETERS structure. + + + + + Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device. + Microsoft Docs: + TBD + Flags that control how the voice is started. Must be 0. + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + + + + Starts the audio processing thread. + Microsoft Docs: + + + + + Use a source voice to submit audio data to the XAudio2 processing pipeline. + Microsoft Docs: + + + + + Called when the voice finishes processing a buffer. + Microsoft Docs: + Context pointer assigned to the pContext member of the XAUDIO2_BUFFER structure when the buffer was submitted. + + + + + Sets the volume levels for the voice, per channel. + Microsoft Docs: + Number of channels in the voice. + Array containing the new volumes of each channel in the voice. The array must have Channels elements. See Remarks for more information on volume levels. + TBD + Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information. + + +
diff --git a/src/Vortice.Win32/Media/Audio/ADPCMCoefSet.cs b/src/Vortice.Win32/Media/Audio/ADPCMCoefSet.cs new file mode 100644 index 0000000..e6b843c --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/ADPCMCoefSet.cs @@ -0,0 +1,13 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// ADPCMCOEFSET +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct ADPCMCoefSet +{ + public short iCoef1; + + public short iCoef2; +} diff --git a/src/Vortice.Win32/Media/Audio/ADPCMWaveFormat.cs b/src/Vortice.Win32/Media/Audio/ADPCMWaveFormat.cs new file mode 100644 index 0000000..dd06096 --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/ADPCMWaveFormat.cs @@ -0,0 +1,40 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// ADPCMWAVEFORMAT +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct ADPCMWaveFormat +{ + public WaveFormatEx wfx; + + [NativeTypeName("WORD")] + public ushort wSamplesPerBlock; + + [NativeTypeName("WORD")] + public ushort wNumCoef; + + [NativeTypeName("ADPCMCOEFSET[]")] + public _aCoef_e__FixedBuffer aCoef; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public partial struct _aCoef_e__FixedBuffer + { + public ADPCMCoefSet e0; + + [UnscopedRef] + public ref ADPCMCoefSet this[int index] + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { + return ref AsSpan(int.MaxValue)[index]; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [UnscopedRef] + public Span AsSpan(int length) => MemoryMarshal.CreateSpan(ref e0, length); + } +} diff --git a/src/Vortice.Win32/Media/Audio/AudioStreamCategory.cs b/src/Vortice.Win32/Media/Audio/AudioStreamCategory.cs new file mode 100644 index 0000000..e818166 --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/AudioStreamCategory.cs @@ -0,0 +1,23 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// AUDIO_STREAM_CATEGORY +public enum AudioStreamCategory +{ + Other = 0, + ForegroundOnlyMedia = 1, + Communications = 3, + Alerts = 4, + SoundEffects = 5, + GameEffects = 6, + GameMedia = 7, + GameChat = 8, + Speech = 9, + Movie = 10, + Media = 11, + FarFieldSpeech = 12, + UniformSpeech = 13, + VoiceTyping = 14, +} diff --git a/src/Vortice.Win32/Media/Audio/PCMWaveFormat.cs b/src/Vortice.Win32/Media/Audio/PCMWaveFormat.cs new file mode 100644 index 0000000..b58e357 --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/PCMWaveFormat.cs @@ -0,0 +1,14 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// PCMWAVEFORMAT +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct PCMWaveFormat +{ + public WaveFormat wf; + + [NativeTypeName("WORD")] + public ushort wBitsPerSample; +} diff --git a/src/Vortice.Win32/Media/Audio/WaveFormat.cs b/src/Vortice.Win32/Media/Audio/WaveFormat.cs new file mode 100644 index 0000000..7b29dbd --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/WaveFormat.cs @@ -0,0 +1,24 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// WAVEFORMAT +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct WaveFormat +{ + [NativeTypeName("WORD")] + public ushort wFormatTag; + + [NativeTypeName("WORD")] + public ushort nChannels; + + [NativeTypeName("DWORD")] + public uint nSamplesPerSec; + + [NativeTypeName("DWORD")] + public uint nAvgBytesPerSec; + + [NativeTypeName("WORD")] + public ushort nBlockAlign; +} diff --git a/src/Vortice.Win32/Media/Audio/WaveFormatEx.cs b/src/Vortice.Win32/Media/Audio/WaveFormatEx.cs new file mode 100644 index 0000000..c2bb408 --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/WaveFormatEx.cs @@ -0,0 +1,30 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// WAVEFORMATEX +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct WaveFormatEx +{ + [NativeTypeName("WORD")] + public ushort wFormatTag; + + [NativeTypeName("WORD")] + public ushort nChannels; + + [NativeTypeName("DWORD")] + public uint nSamplesPerSec; + + [NativeTypeName("DWORD")] + public uint nAvgBytesPerSec; + + [NativeTypeName("WORD")] + public ushort nBlockAlign; + + [NativeTypeName("WORD")] + public ushort wBitsPerSample; + + [NativeTypeName("WORD")] + public ushort cbSize; +} diff --git a/src/Vortice.Win32/Media/Audio/WaveFormatExtensible.cs b/src/Vortice.Win32/Media/Audio/WaveFormatExtensible.cs new file mode 100644 index 0000000..ad824f2 --- /dev/null +++ b/src/Vortice.Win32/Media/Audio/WaveFormatExtensible.cs @@ -0,0 +1,35 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +namespace Win32.Media.Audio; + +/// WAVEFORMATEXTENSIBLE +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public partial struct WaveFormatExtensible +{ + public WaveFormatEx Format; + + [NativeTypeName("union (anonymous union at C:/Program Files (x86)/Windows Kits/10/include/10.0.22621.0/shared/mmreg.h:2525:5)")] + public _Samples_e__Union Samples; + + [NativeTypeName("DWORD")] + public uint dwChannelMask; + + public Guid SubFormat; + + [StructLayout(LayoutKind.Explicit, Pack = 1)] + public partial struct _Samples_e__Union + { + [FieldOffset(0)] + [NativeTypeName("WORD")] + public ushort wValidBitsPerSample; + + [FieldOffset(0)] + [NativeTypeName("WORD")] + public ushort wSamplesPerBlock; + + [FieldOffset(0)] + [NativeTypeName("WORD")] + public ushort wReserved; + } +} diff --git a/src/Vortice.Win32/Properties/AssemblyInfo.cs b/src/Vortice.Win32/Properties/AssemblyInfo.cs index 617ca5d..64d9097 100644 --- a/src/Vortice.Win32/Properties/AssemblyInfo.cs +++ b/src/Vortice.Win32/Properties/AssemblyInfo.cs @@ -11,3 +11,4 @@ [assembly: InternalsVisibleTo("Vortice.Win32.Graphics.Direct3D.Dxc")] [assembly: InternalsVisibleTo("Vortice.Win32.Graphics.Direct3D.Fxc")] [assembly: InternalsVisibleTo("Vortice.Win32.Graphics.DirectComposition")] +[assembly: InternalsVisibleTo("Vortice.Win32.Media.Audio.XAudio2")] diff --git a/src/samples/01-ClearScreen/01-ClearScreen.csproj b/src/samples/01-ClearScreen/01-ClearScreen.csproj index c996953..cca32b9 100644 --- a/src/samples/01-ClearScreen/01-ClearScreen.csproj +++ b/src/samples/01-ClearScreen/01-ClearScreen.csproj @@ -15,6 +15,7 @@ +