diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..48297a1
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+[*]
+indent_style = tab
+
+# Code files
+[*.*]
+indent_size = 2
+insert_final_newline = true
+charset = utf-8-bom
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..afe42ca
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,19 @@
+# [Changelog](http://keepachangelog.com/en/1.0.0/):
+
+## [Unreleased]
+
+
+
+## [v2.0.0.0] - *29.06.2020*
+
+### Added:
+
+- Added FMOD Studio support.
+
+### Changed:
+
+- Reworked the overall API.
+
+### Removed:
+
+- Removed `fmod.jar` from the Android library.
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Additions/AboutAdditions.txt b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Additions/AboutAdditions.txt
similarity index 100%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Additions/AboutAdditions.txt
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Additions/AboutAdditions.txt
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/ChaiFoxes.FMODAudio.Android.Bindings.csproj b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/ChaiFoxes.FMODAudio.Demos.Android.Bindings.csproj
similarity index 86%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/ChaiFoxes.FMODAudio.Android.Bindings.csproj
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/ChaiFoxes.FMODAudio.Demos.Android.Bindings.csproj
index 97e9c91..3206ff4 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/ChaiFoxes.FMODAudio.Android.Bindings.csproj
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/ChaiFoxes.FMODAudio.Demos.Android.Bindings.csproj
@@ -5,18 +5,20 @@
AnyCPU
8.0.30703
2.0
- {2546D47C-EEA5-41D3-8906-B28A3B819889}
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}
{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}
Library
Properties
- ChaiFoxes.FMODAudio.Android.Bindings
- ChaiFoxes.FMODAudio.Android.Bindings
+ ChaiFoxes.FMODAudio.Demos.Android.Bindings
+ ChaiFoxes.FMODAudio.Demos.Android.Bindings
512
+ True
false
- v8.1
+ v9.0
class-parse
XAJavaInterop1
+ PackageReference
true
@@ -28,7 +30,7 @@
4
- pdbonly
+ portable
true
bin\Release\
TRACE
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Jars/AboutJars.txt b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Jars/AboutJars.txt
similarity index 100%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Jars/AboutJars.txt
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Jars/AboutJars.txt
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Jars/fmod.jar b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Jars/fmod.jar
similarity index 71%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Jars/fmod.jar
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Jars/fmod.jar
index a1bbc81..4cf3402 100644
Binary files a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Jars/fmod.jar and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Jars/fmod.jar differ
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Properties/AssemblyInfo.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Properties/AssemblyInfo.cs
similarity index 74%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Properties/AssemblyInfo.cs
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Properties/AssemblyInfo.cs
index 0689958..e9d8176 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Properties/AssemblyInfo.cs
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Properties/AssemblyInfo.cs
@@ -6,11 +6,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("ChaiFoxes.FMODAudio.Android")]
+[assembly: AssemblyTitle("ChaiFoxes.FMODAudio.Demos.Android.Bindings")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ChaiFoxes.FMODAudio.Android")]
+[assembly: AssemblyProduct("ChaiFoxes.FMODAudio.Demos.Android.Bindings")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -22,9 +22,5 @@
// Minor Version
// Build Number
// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/EnumFields.xml b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/EnumFields.xml
similarity index 100%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/EnumFields.xml
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/EnumFields.xml
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/EnumMethods.xml b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/EnumMethods.xml
similarity index 100%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/EnumMethods.xml
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/EnumMethods.xml
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/Metadata.xml b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/Metadata.xml
similarity index 100%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Transforms/Metadata.xml
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android.Bindings/Transforms/Metadata.xml
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Activity1.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Activity1.cs
index 546cced..98f4d7e 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Activity1.cs
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Activity1.cs
@@ -1,4 +1,4 @@
-using Android.App;
+using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Views;
@@ -11,7 +11,7 @@ namespace ChaiFoxes.FMODAudio.Demos.Android
, Theme = "@style/Theme.Splash"
, AlwaysRetainTaskState = true
, LaunchMode = LaunchMode.SingleInstance
- , ScreenOrientation = ScreenOrientation.FullUser
+ , ScreenOrientation = ScreenOrientation.Portrait
, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)]
public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity
{
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/ChaiFoxes.FMODAudio.Demos.Android.csproj b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/ChaiFoxes.FMODAudio.Demos.Android.csproj
index 87106f7..ef355f9 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/ChaiFoxes.FMODAudio.Demos.Android.csproj
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/ChaiFoxes.FMODAudio.Demos.Android.csproj
@@ -45,10 +45,6 @@
SdkOnly
-
- False
- ..\..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Android\bin\Debug\ChaiFoxes.FMODAudio.Android.dll
-
@@ -66,6 +62,9 @@
+
+
+
@@ -93,9 +92,17 @@
-
-
+
+
+
+ {08d5910f-1ca1-4a7e-a3f7-354ff1b03858}
+ ChaiFoxes.FMODAudio.Android
+
+
+ {4b06addf-e4dc-4f8e-8a1a-0489bfc6a6b4}
+ ChaiFoxes.FMODAudio.Demos.Android.Bindings
+
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Resources/Resource.Designer.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Resources/Resource.Designer.cs
index baddc48..1856d5f 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Resources/Resource.Designer.cs
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/Resources/Resource.Designer.cs
@@ -15,7 +15,7 @@ namespace ChaiFoxes.FMODAudio.Demos.Android
{
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
@@ -46,11 +46,11 @@ private Attribute()
public partial class Drawable
{
- // aapt resource value: 0x7f020000
- public const int Icon = 2130837504;
+ // aapt resource value: 0x7F010000
+ public const int Icon = 2130771968;
- // aapt resource value: 0x7f020001
- public const int Splash = 2130837505;
+ // aapt resource value: 0x7F010001
+ public const int Splash = 2130771969;
static Drawable()
{
@@ -65,17 +65,17 @@ private Drawable()
public partial class String
{
- // aapt resource value: 0x7f030003
- public const int ApplicationName = 2130903043;
+ // aapt resource value: 0x7F020000
+ public const int ApplicationName = 2130837504;
- // aapt resource value: 0x7f030002
- public const int Hello = 2130903042;
+ // aapt resource value: 0x7F020002
+ public const int app_name = 2130837506;
- // aapt resource value: 0x7f030001
- public const int app_name = 2130903041;
+ // aapt resource value: 0x7F020001
+ public const int Hello = 2130837505;
- // aapt resource value: 0x7f030000
- public const int hello = 2130903040;
+ // aapt resource value: 0x7F020003
+ public const int hello = 2130837507;
static String()
{
@@ -90,8 +90,8 @@ private String()
public partial class Style
{
- // aapt resource value: 0x7f040000
- public const int Theme_Splash = 2130968576;
+ // aapt resource value: 0x7F030000
+ public const int Theme_Splash = 2130903040;
static Style()
{
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmod.so
index 337f6c5..5abe692 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmod.so and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmod.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmodstudio.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmodstudio.so
new file mode 100644
index 0000000..4bf285e
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/arm64-v8a/libfmodstudio.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmod.so
index b55cad6..a10df27 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmod.so and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmod.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmodstudio.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmodstudio.so
new file mode 100644
index 0000000..a25e70e
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi-v7a/libfmodstudio.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi/libfmod.so
deleted file mode 100644
index f966387..0000000
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/armeabi/libfmod.so and /dev/null differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmod.so
index 3a462a3..b22450b 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmod.so and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmod.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmodstudio.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmodstudio.so
new file mode 100644
index 0000000..7e7617a
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86/libfmodstudio.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86_64/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86_64/libfmod.so
deleted file mode 100644
index 64374a4..0000000
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Android/libs/x86_64/libfmod.so and /dev/null differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/ChaiFoxes.FMODAudio.Demos.Desktop.csproj b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/ChaiFoxes.FMODAudio.Demos.Desktop.csproj
index c27a634..0a02024 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/ChaiFoxes.FMODAudio.Demos.Desktop.csproj
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/ChaiFoxes.FMODAudio.Demos.Desktop.csproj
@@ -13,7 +13,7 @@
ChaiFoxes.FMODAudio.Demos.Desktop
512
DesktopGL
- v4.6.2
+ v4.5.2
publish\
true
@@ -62,9 +62,6 @@
-
- ..\..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Desktop\bin\Debug\ChaiFoxes.FMODAudio.Desktop.dll
-
$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll
@@ -128,7 +125,16 @@
PreserveNewest
-
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
PreserveNewest
@@ -137,7 +143,16 @@
PreserveNewest
-
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
PreserveNewest
@@ -160,9 +175,21 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
+
+ PreserveNewest
+
+
+
+
+ {f712bf21-58f9-448c-bef5-286cec991ebb}
+ ChaiFoxes.FMODAudio.Desktop
+
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/app.config b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/app.config
index 2a0024f..ff99501 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/app.config
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/app.config
@@ -1,3 +1,3 @@
-
+
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmod.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmod.dll
index f2b6c92..2eb335f 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmod.dll and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmod.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmodstudio.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmodstudio.dll
new file mode 100644
index 0000000..8d509e7
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/fmodstudio.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so
index 6c3db98..f9e294b 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11
index 6c3db98..f9e294b 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11 and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.0 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.8
similarity index 51%
rename from ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.0
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.8
index 6c3db98..f9e294b 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.0 and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmod.so.11.8 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so
new file mode 100644
index 0000000..0fe45c6
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11
new file mode 100644
index 0000000..0fe45c6
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11.8 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11.8
new file mode 100644
index 0000000..0fe45c6
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x64/libfmodstudio.so.11.8 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmod.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmod.dll
index f338a1d..93ee962 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmod.dll and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmod.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmodstudio.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmodstudio.dll
new file mode 100644
index 0000000..12972cb
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/fmodstudio.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so
index d3d6467..019aaa1 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11
index d3d6467..019aaa1 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11 and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.0 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.0
deleted file mode 100644
index d3d6467..0000000
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.0 and /dev/null differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.8 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.8
new file mode 100644
index 0000000..019aaa1
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmod.so.11.8 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so
new file mode 100644
index 0000000..dbf466d
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11
new file mode 100644
index 0000000..dbf466d
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11.8 b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11.8
new file mode 100644
index 0000000..dbf466d
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Desktop/x86/libfmodstudio.so.11.8 differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/ChaiFoxes.FMODAudio.Demos.Windows.csproj b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/ChaiFoxes.FMODAudio.Demos.Windows.csproj
new file mode 100644
index 0000000..a6d5e20
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/ChaiFoxes.FMODAudio.Demos.Windows.csproj
@@ -0,0 +1,91 @@
+
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {0144A105-BAD8-4EE2-9254-53A02643E360}
+ WinExe
+ Properties
+ ChaiFoxes.FMODAudio.Demos.Windows
+ ChaiFoxes.FMODAudio.Demos.Windows
+ 512
+ Windows
+ v4.5.2
+
+
+ x86
+ true
+ full
+ false
+ bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\
+ DEBUG;TRACE;WINDOWS
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\
+ TRACE;WINDOWS
+ prompt
+ 4
+
+
+ Icon.ico
+
+
+ app.manifest
+
+
+
+
+
+
+
+ $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+ {f712bf21-58f9-448c-bef5-286cec991ebb}
+ ChaiFoxes.FMODAudio.Desktop
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Icon.ico b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Icon.ico
new file mode 100644
index 0000000..7d9dec1
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Icon.ico differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Program.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Program.cs
new file mode 100644
index 0000000..06d6079
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Program.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace ChaiFoxes.FMODAudio.Demos.Windows
+{
+#if WINDOWS || LINUX
+ ///
+ /// The main class.
+ ///
+ public static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ using (var game = new Game1())
+ game.Run();
+ }
+ }
+#endif
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/Properties/AssemblyInfo.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Properties/AssemblyInfo.cs
similarity index 77%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/Properties/AssemblyInfo.cs
rename to ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Properties/AssemblyInfo.cs
index 79615a7..fc8fcba 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/Properties/AssemblyInfo.cs
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/Properties/AssemblyInfo.cs
@@ -2,34 +2,34 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("ChaiFoxes.FMOD.Desktop")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyTitle("ChaiFoxes.FMODAudio.Demos.Windows")]
+[assembly: AssemblyProduct("ChaiFoxes.FMODAudio.Demos.Windows")]
[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ChaiFoxes.FMOD.Desktop")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f712bf21-58f9-448c-bef5-286cec991ebb")]
+[assembly: Guid("c5994495-b7bf-4c03-8072-919106476506")]
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/app.manifest b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/app.manifest
new file mode 100644
index 0000000..442d164
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/app.manifest
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true/pm
+
+
+
+
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmod.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmod.dll
new file mode 100644
index 0000000..2eb335f
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmod.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmodstudio.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmodstudio.dll
new file mode 100644
index 0000000..8d509e7
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x64/fmodstudio.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmod.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmod.dll
new file mode 100644
index 0000000..93ee962
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmod.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmodstudio.dll b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmodstudio.dll
new file mode 100644
index 0000000..12972cb
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.Windows/x86/fmodstudio.dll differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.sln b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.sln
index c903f46..0ad04d8 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.sln
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28307.572
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Demos.Desktop", "ChaiFoxes.FMODAudio.Demos.Desktop\ChaiFoxes.FMODAudio.Demos.Desktop.csproj", "{16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}"
EndProject
@@ -9,31 +9,99 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Demos.A
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ChaiFoxes.FMODAudio.Demos", "ChaiFoxes.FMODAudio.Demos\ChaiFoxes.FMODAudio.Demos.shproj", "{4FC7A6B9-6D95-4D0B-B748-3EDD39FC97DB}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fmod", "fmod", "{F2AB0DE1-F671-431F-ACF2-1F68749AB21F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChaiFoxes.FMODAudio.Desktop", "..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Desktop\ChaiFoxes.FMODAudio.Desktop.csproj", "{F712BF21-58F9-448C-BEF5-286CEC991EBB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChaiFoxes.FMODAudio.Android", "..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Android\ChaiFoxes.FMODAudio.Android.csproj", "{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}"
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ChaiFoxes.FMODAudio.Shared", "..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.shproj", "{B5933BD7-E07E-4EB2-99BE-2814508425A1}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4AC19750-0192-466E-B5DB-D1391270E608}"
+ ProjectSection(SolutionItems) = preProject
+ ..\.editorconfig = ..\.editorconfig
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Demos.Windows", "ChaiFoxes.FMODAudio.Demos.Windows\ChaiFoxes.FMODAudio.Demos.Windows.csproj", "{0144A105-BAD8-4EE2-9254-53A02643E360}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Demos.Android.Bindings", "ChaiFoxes.FMODAudio.Demos.Android.Bindings\ChaiFoxes.FMODAudio.Demos.Android.Bindings.csproj", "{4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}"
+EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ ChaiFoxes.FMODAudio.Demos\ChaiFoxes.FMODAudio.Demos.projitems*{0144a105-bad8-4ee2-9254-53a02643e360}*SharedItemsImports = 4
+ ..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{08d5910f-1ca1-4a7e-a3f7-354ff1b03858}*SharedItemsImports = 5
ChaiFoxes.FMODAudio.Demos\ChaiFoxes.FMODAudio.Demos.projitems*{16ca3ccc-663f-40b2-b9c8-a910ce35c7a9}*SharedItemsImports = 4
ChaiFoxes.FMODAudio.Demos\ChaiFoxes.FMODAudio.Demos.projitems*{1ac29f42-1a31-4213-9c36-37ff51ae5b1b}*SharedItemsImports = 4
ChaiFoxes.FMODAudio.Demos\ChaiFoxes.FMODAudio.Demos.projitems*{4fc7a6b9-6d95-4d0b-b748-3edd39fc97db}*SharedItemsImports = 13
+ ..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{b5933bd7-e07e-4eb2-99be-2814508425a1}*SharedItemsImports = 13
+ ..\ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{f712bf21-58f9-448c-bef5-286cec991ebb}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Debug|x86.Build.0 = Debug|Any CPU
{16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Release|x86.ActiveCfg = Release|Any CPU
+ {16CA3CCC-663F-40B2-B9C8-A910CE35C7A9}.Release|x86.Build.0 = Release|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|x86.Build.0 = Debug|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Debug|x86.Deploy.0 = Debug|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|Any CPU.Build.0 = Release|Any CPU
{1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|x86.ActiveCfg = Release|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|x86.Build.0 = Release|Any CPU
+ {1AC29F42-1A31-4213-9C36-37FF51AE5B1B}.Release|x86.Deploy.0 = Release|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Debug|x86.Build.0 = Debug|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Release|x86.ActiveCfg = Release|Any CPU
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB}.Release|x86.Build.0 = Release|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Debug|x86.Build.0 = Debug|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|Any CPU.Build.0 = Release|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|x86.ActiveCfg = Release|Any CPU
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|x86.Build.0 = Release|Any CPU
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Debug|x86.ActiveCfg = Debug|x86
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Debug|x86.Build.0 = Debug|x86
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Release|Any CPU.ActiveCfg = Release|x86
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Release|x86.ActiveCfg = Release|x86
+ {0144A105-BAD8-4EE2-9254-53A02643E360}.Release|x86.Build.0 = Release|x86
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Debug|x86.Build.0 = Debug|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Release|x86.ActiveCfg = Release|Any CPU
+ {4B06ADDF-E4DC-4F8E-8A1A-0489BFC6A6B4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {F712BF21-58F9-448C-BEF5-286CEC991EBB} = {F2AB0DE1-F671-431F-ACF2-1F68749AB21F}
+ {08D5910F-1CA1-4A7E-A3F7-354FF1B03858} = {F2AB0DE1-F671-431F-ACF2-1F68749AB21F}
+ {B5933BD7-E07E-4EB2-99BE-2814508425A1} = {F2AB0DE1-F671-431F-ACF2-1F68749AB21F}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A0E082C2-1837-4496-9124-1243364D2CFF}
EndGlobalSection
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.projitems b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.projitems
index 7bf06d8..0f5a980 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.projitems
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos.projitems
@@ -9,9 +9,23 @@
ChaiFoxes.FMODAudio.Demos
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Arial.spritefont b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Arial.spritefont
new file mode 100644
index 0000000..550bfdb
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Arial.spritefont
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+ Arial
+
+
+ 20
+
+
+ 0
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Ѐ
+ ӿ
+
+
+
+
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Button.png b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Button.png
new file mode 100644
index 0000000..5723ff3
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Button.png differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Content.mgcb b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Content.mgcb
index 001975c..5ca2bfd 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Content.mgcb
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Content.mgcb
@@ -1,4 +1,4 @@
-
+
#----------------------------- Global Properties ----------------------------#
/outputDir:bin/$(Platform)
@@ -16,7 +16,7 @@
#begin test.mp3
/copy:test.mp3
-#begin gato.png
+#begin Gato.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@@ -26,5 +26,54 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
-/build:gato.png
+/build:Gato.png
+
+#begin Button.png
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:Button.png
+
+#begin Arial.spritefont
+/importer:FontDescriptionImporter
+/processor:FontDescriptionProcessor
+/processorParam:PremultiplyAlpha=True
+/processorParam:TextureFormat=Compressed
+/build:Arial.spritefont
+
+
+#begin Master.bank
+/copy:Master.bank
+
+#begin Master.strings.bank
+/copy:Master.strings.bank
+
+#begin test.mp3
+/copy:test.mp3
+
+#begin Dialogue_CN.bank
+/copy:Dialogue_CN.bank
+
+#begin Dialogue_EN.bank
+/copy:Dialogue_EN.bank
+
+#begin Dialogue_JP.bank
+/copy:Dialogue_JP.bank
+
+#begin Music.bank
+/copy:Music.bank
+
+#begin SFX.bank
+/copy:SFX.bank
+
+#begin Vehicles.bank
+/copy:Vehicles.bank
+#begin VO.bank
+/copy:VO.bank
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_CN.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_CN.bank
new file mode 100644
index 0000000..ba36952
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_CN.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_EN.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_EN.bank
new file mode 100644
index 0000000..aff240f
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_EN.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_JP.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_JP.bank
new file mode 100644
index 0000000..9ec0935
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Dialogue_JP.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.bank
new file mode 100644
index 0000000..f282659
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.strings.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.strings.bank
new file mode 100644
index 0000000..1dc906e
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Master.strings.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Music.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Music.bank
new file mode 100644
index 0000000..2806d53
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Music.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/SFX.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/SFX.bank
new file mode 100644
index 0000000..3c8c0dd
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/SFX.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/VO.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/VO.bank
new file mode 100644
index 0000000..7834ef3
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/VO.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Vehicles.bank b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Vehicles.bank
new file mode 100644
index 0000000..1d373e0
Binary files /dev/null and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/Vehicles.bank differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/gato.png b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/gato.png
index 88feffc..67a99d9 100644
Binary files a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/gato.png and b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Content/gato.png differ
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Game1.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Game1.cs
index 870f0c6..b51f178 100644
--- a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Game1.cs
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Game1.cs
@@ -1,4 +1,8 @@
-using System;
+using System;
+using System.Runtime.InteropServices;
+using ChaiFoxes.FMODAudio.Demos.Scenes;
+using ChaiFoxes.FMODAudio.Demos.UI;
+using ChaiFoxes.FMODAudio.Studio;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
@@ -10,28 +14,50 @@ namespace ChaiFoxes.FMODAudio.Demos
///
public class Game1 : Game
{
- GraphicsDeviceManager graphics;
- SpriteBatch spriteBatch;
+ private static GraphicsDeviceManager _graphics;
- Texture2D gato;
+ public Game1()
+ {
+ _graphics = new GraphicsDeviceManager(this);
+ Content.RootDirectory = "Content";
- float rotation;
- float rotationSpeed = 0.01f;
+#if ANDROID
+ _graphics.IsFullScreen = true;
+ _graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
+ _graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
+ _graphics.SupportedOrientations = DisplayOrientation.Portrait;
+#endif
+ IsMouseVisible = true;
+ }
- public Game1()
+ Bank masterBank;
+ Bank masterStringBank;
+
+ EventDescription musicDescription;
+ EventDescription sfxDescription;
+
+ EventInstance musicInstance;
+
+
+ public static Vector2 ScreenSize
{
- graphics = new GraphicsDeviceManager(this);
- Content.RootDirectory = "Content";
-
- #if ANDROID
- graphics.IsFullScreen = true;
- graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
- graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
- graphics.SupportedOrientations = DisplayOrientation.Portrait;
- #endif
+ get
+ {
+#if !ANDROID
+ return new Vector2(
+ _graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight
+ );
+#else
+ return new Vector2(
+ GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width,
+ GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
+ );
+#endif
+ }
}
+
///
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
@@ -40,24 +66,13 @@ public Game1()
///
protected override void Initialize()
{
- // All our music files reside in Content directory.
- AudioMgr.Init("Content");
-
- // You can load pretty much any popular audio format.
- // I'd recommend .ogg for music, tho.
- var sound = AudioMgr.LoadStreamedSound("test.mp3");
- sound.Looping = true;
- //sound.LowPass = 0.1f;
- //sound.Volume = 2;
- //sound.Pitch = 2;
-
- var channel = sound.Play();
-
- /*
- // Add some effects to the sound! :0
- channel.LowPass = 0.5f;
- channel.Pitch = 2f;
- */
+ // NOTE: You HAVE TO init fmod in the Initialize().
+ // Otherwise, it may not work on some platforms.
+ FMODManager.Init(FMODMode.CoreAndStudio, "Content");
+ //FMODManager.Init(FMODMode.Core, "Content"); // Use this if you don't want Studio functionality.
+
+ UIController.Init(GraphicsDevice);
+ SceneController.ChangeScene(new DemoSelectorScene());
base.Initialize();
}
@@ -68,10 +83,7 @@ protected override void Initialize()
///
protected override void LoadContent()
{
- // Create a new SpriteBatch, which can be used to draw textures.
- spriteBatch = new SpriteBatch(GraphicsDevice);
-
- gato = Content.Load("gato");
+ Resources.Load(Content);
}
///
@@ -80,7 +92,7 @@ protected override void LoadContent()
///
protected override void UnloadContent()
{
- AudioMgr.Unload();
+ FMODManager.Unload();
}
///
@@ -90,6 +102,10 @@ protected override void UnloadContent()
/// Provides a snapshot of timing values.
protected override void Update(GameTime gameTime)
{
+ FMODManager.Update();
+ UIController.Update();
+ SceneController.Update();
+
if (
GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed
|| GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed
@@ -99,51 +115,20 @@ protected override void Update(GameTime gameTime)
Exit();
}
- AudioMgr.Update();
-
- rotation += rotationSpeed;
- if (rotation > MathHelper.TwoPi)
- {
- rotation -= MathHelper.TwoPi;
- }
-
base.Update(gameTime);
}
+
///
/// This is called when the game should draw itself.
///
/// Provides a snapshot of timing values.
protected override void Draw(GameTime gameTime)
{
- GraphicsDevice.Clear(new Color(187, 163, 255));
-
- #if !ANDROID
- var screenSize = new Vector2(
- graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight
- ) / 2;
- #else
- var screenSize = new Vector2(
- GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width,
- GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
- ) / 2;
- #endif
-
- var scale = Math.Min(screenSize.X, screenSize.Y) / (float)gato.Width;
-
- spriteBatch.Begin();
- spriteBatch.Draw(
- gato,
- screenSize,
- null,
- Color.White,
- rotation,
- Vector2.One * gato.Width / 2,
- Vector2.One * scale,
- SpriteEffects.None,
- 0
- );
- spriteBatch.End();
+ GraphicsDevice.Clear(UIController.Backgroud);
+
+ UIController.Draw();
+ SceneController.Draw();
base.Draw(gameTime);
}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Resources.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Resources.cs
new file mode 100644
index 0000000..b8ea744
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Resources.cs
@@ -0,0 +1,21 @@
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace ChaiFoxes.FMODAudio.Demos
+{
+ public static class Resources
+ {
+ public static SpriteFont Arial;
+
+ public static Texture2D Button;
+ public static Texture2D Gato;
+
+ public static void Load(ContentManager content)
+ {
+ Arial = content.Load("Arial");
+
+ Button = content.Load("Button");
+ Gato = content.Load("Gato");
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/CoreDemoScene.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/CoreDemoScene.cs
new file mode 100644
index 0000000..094db1f
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/CoreDemoScene.cs
@@ -0,0 +1,184 @@
+using ChaiFoxes.FMODAudio.Demos.UI;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+
+namespace ChaiFoxes.FMODAudio.Demos.Scenes
+{
+ public class CoreDemoScene : Scene
+ {
+ private Sound _sound;
+ private Channel _channel;
+
+ private float _rotation;
+ private float _rotationSpeed = 0.01f;
+
+ private Button _lowPassUp;
+ private Button _lowPassDown;
+ private Label _lowPass;
+
+ private Button _pitchUp;
+ private Button _pitchDown;
+ private Label _pitch;
+
+ private Button _pause;
+
+ private Button _back;
+
+ public override void Enter()
+ {
+ InitUI();
+
+ // You can load pretty much any popular audio format.
+ // I'd recommend .ogg for music, tho.
+ _sound = CoreSystem.LoadStreamedSound("test.mp3");
+ _sound.Looping = true;
+ //sound.LowPass = 0.1f;
+ //sound.Volume = 2;
+ //sound.Pitch = 2;
+
+ _channel = _sound.Play();
+ }
+
+
+ public override void Update()
+ {
+ _lowPass.Text = "low pass " + _channel.LowPass.ToString("0.00");
+ _pitch.Text = "pitch " + _channel.Pitch.ToString("0.00");
+
+ if (_channel.Paused)
+ {
+ return;
+ }
+
+ _rotation += _rotationSpeed * _channel.Pitch * _channel.Pitch;
+ if (_rotation > MathHelper.TwoPi)
+ {
+ _rotation -= MathHelper.TwoPi;
+ }
+ }
+
+
+ public override void Draw()
+ {
+#if !ANDROID
+ var scale = 1;
+#else
+ var scale = Math.Min(Game1.ScreenSize.X, Game1.ScreenSize.Y) / 2f / (float)Resources.Gato.Width;
+#endif
+
+ UIController.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);
+ UIController.SpriteBatch.Draw(
+ Resources.Gato,
+ Game1.ScreenSize / 2,
+ null,
+ UIController.Text,
+ _rotation,
+ Vector2.One * Resources.Gato.Width / 2,
+ Vector2.One * scale,
+ SpriteEffects.None,
+ 0
+ );
+ UIController.SpriteBatch.End();
+ }
+
+
+ public override void Leave()
+ {
+ _lowPassUp.Destroy();
+ _lowPassDown.Destroy();
+ _lowPass.Destroy();
+
+ _pitchUp.Destroy();
+ _pitchDown.Destroy();
+ _pitch.Destroy();
+
+ _pause.Destroy();
+
+ _channel.Stop();
+ _sound.Dispose();
+
+ _back.Destroy();
+ }
+
+
+ private void InitUI()
+ {
+ _lowPass = new Label(
+ "low pass",
+ () => new Vector2(Game1.ScreenSize.X / 2 - Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.7f)
+ );
+ _lowPassDown = new Button(
+ "<",
+ () => new Vector2(
+ _lowPass.Position.X - 48,
+ _lowPass.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () => _channel.LowPass -= 0.01f
+ );
+ _lowPassUp = new Button(
+ ">",
+ () => new Vector2(
+ _lowPass.Position.X + 48,
+ _lowPass.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () => _channel.LowPass += 0.01f
+ );
+
+ _pitch = new Label(
+ "low pass",
+ () => new Vector2(Game1.ScreenSize.X / 2 + Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.7f)
+ );
+ _pitchDown = new Button(
+ "<",
+ () => new Vector2(
+ _pitch.Position.X - 48,
+ _pitch.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () => _channel.Pitch -= 0.01f
+ );
+ _pitchUp = new Button(
+ ">",
+ () => new Vector2(
+ _pitch.Position.X + 48,
+ _pitch.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () => _channel.Pitch += 0.01f
+ );
+
+ _pause = new Button(
+ "pause",
+ () => new Vector2(Game1.ScreenSize.X / 2, Game1.ScreenSize.Y * 0.7f + 64),
+ new Vector2(128, 64),
+ null,
+ () =>
+ {
+ if (_channel.Paused)
+ {
+ _pause.Text = "pause";
+ _channel.Resume();
+ }
+ else
+ {
+ _pause.Text = "resume";
+ _channel.Pause();
+ }
+ }
+ );
+
+
+ _back = new Button(
+ "<-",
+ () => new Vector2(32, 32),
+ new Vector2(64, 64),
+ null,
+ () => SceneController.ChangeScene(new DemoSelectorScene())
+ );
+ }
+
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/DemoSelectorScene.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/DemoSelectorScene.cs
new file mode 100644
index 0000000..5c5cfb8
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/DemoSelectorScene.cs
@@ -0,0 +1,62 @@
+using ChaiFoxes.FMODAudio.Demos.UI;
+using Microsoft.Xna.Framework;
+
+namespace ChaiFoxes.FMODAudio.Demos.Scenes
+{
+ public class DemoSelectorScene : Scene
+ {
+ private Button _selectCore;
+ private Button _selectStudio;
+ private Label _title;
+
+ public override void Enter()
+ {
+ // If Studio is not loaded, skip the selection screen,
+ // since we can only select Core.
+ if (!FMODManager.UsesStudio)
+ {
+ SceneController.ChangeScene(new CoreDemoScene());
+ return;
+ }
+
+ _title = new Label(
+ "Choose your destiny",
+ () => new Vector2(Game1.ScreenSize.X / 2, Game1.ScreenSize.Y / 2f)
+ );
+
+ _selectCore = new Button(
+ "Core Demo",
+ () => new Vector2(Game1.ScreenSize.X / 2 - Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.75f),
+ new Vector2(200, 100),
+ null,
+ () => SceneController.ChangeScene(new CoreDemoScene())
+ );
+
+ _selectStudio = new Button(
+ "Studio Demo",
+ () => new Vector2(Game1.ScreenSize.X / 2 + Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.75f),
+ new Vector2(200, 100),
+ null,
+ () => SceneController.ChangeScene(new StudioDemoScene())
+ );
+ }
+
+
+ public override void Update()
+ {
+ }
+
+
+ public override void Draw()
+ {
+ }
+
+
+ public override void Leave()
+ {
+ _title?.Destroy();
+ _selectCore?.Destroy();
+ _selectStudio?.Destroy();
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/Scene.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/Scene.cs
new file mode 100644
index 0000000..3d069dd
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/Scene.cs
@@ -0,0 +1,11 @@
+
+namespace ChaiFoxes.FMODAudio.Demos.Scenes
+{
+ public abstract class Scene
+ {
+ public abstract void Update();
+ public abstract void Draw();
+ public abstract void Enter();
+ public abstract void Leave();
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/SceneController.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/SceneController.cs
new file mode 100644
index 0000000..777be9c
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/SceneController.cs
@@ -0,0 +1,25 @@
+
+namespace ChaiFoxes.FMODAudio.Demos.Scenes
+{
+ public static class SceneController
+ {
+ private static Scene _currentScene;
+
+ public static void Update()
+ {
+ _currentScene?.Update();
+ }
+
+ public static void Draw()
+ {
+ _currentScene?.Draw();
+ }
+
+ public static void ChangeScene(Scene scene)
+ {
+ _currentScene?.Leave();
+ _currentScene = scene;
+ _currentScene?.Enter();
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/StudioDemoScene.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/StudioDemoScene.cs
new file mode 100644
index 0000000..c82c9b4
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/Scenes/StudioDemoScene.cs
@@ -0,0 +1,321 @@
+using ChaiFoxes.FMODAudio.Demos.UI;
+using ChaiFoxes.FMODAudio.Studio;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+using System.Collections.Generic;
+
+namespace ChaiFoxes.FMODAudio.Demos.Scenes
+{
+ public class StudioDemoScene : Scene
+ {
+ private List _banks = new List();
+
+ EventDescription _engineDescription;
+ EventDescription _musicDescription;
+ EventDescription _bonkDescription;
+
+ EventInstance _engineInstance;
+ EventInstance _musicInstance;
+
+ int _rpm = 2300;
+
+ private float _rotation;
+ private float _rotationSpeed = 0.0001f;
+
+ private int _musicIntensity = 1;
+
+
+ private Button _rpmUp;
+ private Button _rpmDown;
+ private Label _rpmLabel;
+ private Button _engineStart;
+
+ private Button _intensityUp;
+ private Button _intensityDown;
+ private Label _musicLabel;
+ private Button _musicStart;
+
+ private Button _bonk;
+
+ private Button _back;
+
+
+ public override void Enter()
+ {
+ InitUI();
+
+ // You would rather place the following in LoadContent() - it's here more for readability.
+ // Here you load any banks that you're using. This could be a music bank, a SFX bank, etc.
+ // The strings bank isn't actually necessary - however if you want to do string lookups, include it.
+ _banks.Add(StudioSystem.LoadBank("Master.bank"));
+ _banks.Add(StudioSystem.LoadBank("Master.strings.bank"));
+ _banks.Add(StudioSystem.LoadBank("Music.bank"));
+ _banks.Add(StudioSystem.LoadBank("SFX.bank"));
+ _banks.Add(StudioSystem.LoadBank("Vehicles.bank"));
+ _banks.Add(StudioSystem.LoadBank("VO.bank"));
+ _banks.Add(StudioSystem.LoadBank("Dialogue_EN.bank"));
+
+ // Events are split in the code into descriptions and instances.
+ // You may have multiple instances of one event, but the description for it should only be loaded once.
+ // Here is why you want the strings bank loaded, btw. So much more intuitive than Guids.
+
+ _engineDescription = StudioSystem.GetEvent("event:/Vehicles/Car Engine");
+ _musicDescription = StudioSystem.GetEvent("event:/Music/Level 03");
+
+ // Loading an event description by Guid.
+ // FMOD Studio will give you a string like below when you select "Copy Guid". It has to be parsed to be used.
+ FMOD.Studio.Util.parseID("{be6203d8-c8d8-41c5-8ce6-bce0de95807b}", out Guid sfxGuid);
+ _bonkDescription = StudioSystem.GetEvent(sfxGuid);
+
+ // There are three ways to load sample data (any non-streamed sounds):
+ // -From a bank. This will keep ALL the bank's data in memory until unloaded.
+ // -From an event description. This will just keep the event's necessary data in memory until unloaded.
+ // -From an event instance. Same as above, except the data will only be in memory while an instance is.
+ // Assess when you need memory loaded and for how long, then choose which method to use properly.
+ _engineDescription.LoadSampleData();
+ // The music doesn't need its data pre-loaded, since it'll just play right away, continuously.
+ _engineInstance = _engineDescription.CreateInstance();
+ _musicInstance = _musicDescription.CreateInstance();
+
+ // Sound effects could be played whenever, so you don't want them constantly loading / unloading.
+ _bonkDescription.LoadSampleData();
+
+ // If you have any parameters set within FMOD Studio, you can change them within the code.
+ _engineInstance.SetParameterValue("RPM", _rpm);
+ _engineInstance.SetParameterValue("Load", -1f);
+
+ }
+
+
+ public override void Update()
+ {
+ _rpmLabel.Text = "rpm " + _rpm;
+ _musicLabel.Text = "music intensity " + _musicIntensity;
+
+ if (_engineInstance.PlaybackState == FMOD.Studio.PLAYBACK_STATE.PLAYING)
+ {
+ _rotation += _rotationSpeed * _rpm;
+ }
+ if (_rotation > MathHelper.TwoPi)
+ {
+ _rotation -= MathHelper.TwoPi;
+ }
+
+ // haxx
+ // Basically, I am too lazy to look up how
+ // to detect the end of music properly. : - )
+ if (_musicInstance.TimelinePosition > (60 * 2 + 32) * 1000)
+ {
+ _musicStart.Text = "start";
+ _musicInstance.Stop();
+ }
+ }
+
+
+ public override void Draw()
+ {
+#if !ANDROID
+ var scale = 1;
+#else
+ var scale = Math.Min(Game1.ScreenSize.X, Game1.ScreenSize.Y) / 2f / (float)Resources.Gato.Width;
+#endif
+
+ UIController.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);
+ UIController.SpriteBatch.Draw(
+ Resources.Gato,
+ new Vector2(Game1.ScreenSize.X / 2, Game1.ScreenSize.Y * 0.3f),
+ null,
+ UIController.Text,
+ _rotation,
+ Vector2.One * Resources.Gato.Width / 2,
+ Vector2.One * scale,
+ SpriteEffects.None,
+ 0
+ );
+ UIController.SpriteBatch.End();
+ }
+
+ public override void Leave()
+ {
+ _engineInstance.Stop();
+ _musicInstance.Stop();
+
+ _engineInstance.Dispose();
+ _musicInstance.Dispose();
+
+ _rpmUp.Destroy();
+ _rpmDown.Destroy();
+ _rpmLabel.Destroy();
+ _engineStart.Destroy();
+
+ _intensityUp.Destroy();
+ _intensityDown.Destroy();
+ _musicLabel.Destroy();
+ _musicStart.Destroy();
+
+ _bonk.Destroy();
+
+ _back.Destroy();
+
+ foreach(var bank in _banks)
+ {
+ bank.Unload();
+ }
+ }
+
+ private void InitUI()
+ {
+
+ _rpmLabel = new Label(
+ "rpm",
+ () => new Vector2(Game1.ScreenSize.X / 2 - Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.7f - 64)
+ );
+ _rpmDown = new Button(
+ "<",
+ () => new Vector2(
+ _rpmLabel.Position.X - 48,
+ _rpmLabel.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () =>
+ {
+ _rpm -= 25;
+ if (_rpm < 0)
+ {
+ _rpm = 0;
+ }
+ _engineInstance.SetParameterValue("RPM", _rpm);
+ }
+ );
+ _rpmUp = new Button(
+ ">",
+ () => new Vector2(
+ _rpmLabel.Position.X + 48,
+ _rpmLabel.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ () =>
+ {
+ _rpm += 25;
+ if (_rpm > 10000)
+ {
+ _rpm = 10000;
+ }
+ _engineInstance.SetParameterValue("RPM", _rpm);
+ }
+ );
+
+ _engineStart = new Button(
+ "start",
+ () => new Vector2(
+ _rpmLabel.Position.X,
+ _rpmLabel.Position.Y + 128 + 32
+ ),
+ new Vector2(128 + 32, 64),
+ null,
+ () =>
+ {
+ if (_engineInstance.PlaybackState == FMOD.Studio.PLAYBACK_STATE.PLAYING)
+ {
+ _engineStart.Text = "start";
+ _engineInstance.Stop();
+ }
+ else
+ {
+ _engineStart.Text = "stop";
+ _engineInstance.Start();
+ }
+ }
+ );
+
+ _musicLabel = new Label(
+ "music",
+ () => new Vector2(Game1.ScreenSize.X / 2 + Game1.ScreenSize.X / 4, Game1.ScreenSize.Y * 0.7f - 64)
+ );
+ _intensityDown = new Button(
+ "<",
+ () => new Vector2(
+ _musicLabel.Position.X - 48,
+ _musicLabel.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ null,
+ () =>
+ {
+ _musicIntensity -= 1;
+ if (_musicIntensity < 0)
+ {
+ _musicIntensity = 0;
+ }
+ _musicInstance.SetParameterValue("Intensity", _musicIntensity);
+ }
+ );
+ _intensityUp = new Button(
+ ">",
+ () => new Vector2(
+ _musicLabel.Position.X + 48,
+ _musicLabel.Position.Y + 64
+ ),
+ new Vector2(64, 64),
+ null,
+ () =>
+ {
+ _musicIntensity += 1;
+ if (_musicIntensity > 4)
+ {
+ _musicIntensity = 4;
+ }
+ _musicInstance.SetParameterValue("Intensity", _musicIntensity);
+ }
+ );
+
+ _musicStart = new Button(
+ "start",
+ () => new Vector2(
+ _musicLabel.Position.X,
+ _musicLabel.Position.Y + 128 + 32
+ ),
+ new Vector2(128 + 32, 64),
+ null,
+ () =>
+ {
+ if (_musicInstance.PlaybackState == FMOD.Studio.PLAYBACK_STATE.PLAYING)
+ {
+ _musicStart.Text = "start";
+ _musicInstance.Stop();
+ }
+ else
+ {
+ _musicStart.Text = "stop";
+ _musicInstance.Start();
+ _musicInstance.SetParameterValue("Intensity", _musicIntensity);
+ }
+ }
+ );
+
+
+ _bonk = new Button(
+ "bonk",
+ () => new Vector2(Game1.ScreenSize.X / 2, _musicLabel.Position.Y + 128 + 32),
+ new Vector2(128, 64),
+ null,
+ () =>
+ {
+ var i = _bonkDescription.CreateInstance();
+ i.SetParameterValue("Speed", 4);
+ i.Start(); // That's actually a memory leak. Event instances should be disposed.
+ }
+ );
+
+
+ _back = new Button(
+ "<-",
+ () => new Vector2(32, 32),
+ new Vector2(64, 64),
+ null,
+ () => SceneController.ChangeScene(new DemoSelectorScene())
+ );
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Button.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Button.cs
new file mode 100644
index 0000000..11d2a24
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Button.cs
@@ -0,0 +1,106 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System;
+
+namespace ChaiFoxes.FMODAudio.Demos.UI
+{
+ public class Button : UIElement
+ {
+ public string Text;
+ public Vector2 Position { get; private set; }
+ public Vector2 Size;
+ private readonly Func _positionUpdate;
+ private readonly Action _click;
+ private readonly Action _clickRelease;
+
+ private bool _animationRunning = false;
+ private float _animation = 0;
+ private float _animationSpeed = 1f / 10f;
+ private float _animationAmplitude = 8;
+
+ public Button(
+ string text,
+ Func positionUpdate,
+ Vector2 size,
+ Action click,
+ Action clickRelease = null
+ ) : base()
+ {
+ Text = text;
+ _positionUpdate = positionUpdate;
+ Position = _positionUpdate();
+ Size = size;
+ _click = click;
+ _clickRelease = clickRelease;
+ }
+
+ public override void Update()
+ {
+ _positionUpdate();
+
+ if (PointInRectangleBySize(InputManager.MousePosition, Position, Size))
+ {
+ if (InputManager.MouseHeld)
+ {
+ _click?.Invoke();
+ _animationRunning = true;
+ }
+ if (InputManager.MousePressed)
+ {
+ _animation = 0;
+ }
+ if (InputManager.MouseReleased)
+ {
+ _clickRelease?.Invoke();
+ }
+ }
+
+ if (_animationRunning)
+ {
+ _animation += _animationSpeed;
+ if (InputManager.MouseHeld)
+ {
+ if (_animation > 0.25f)
+ {
+ _animation = 0.25f;
+ }
+ }
+ if (_animation > 1)
+ {
+ _animationRunning = false;
+ _animation = 0;
+ }
+ }
+ }
+
+ public override void Draw()
+ {
+ UIController.SpriteBatch.Draw(
+ Resources.Button,
+ Position,
+ null,
+ UIController.Accent,
+ 0,
+ new Vector2(Resources.Button.Width, Resources.Button.Height) / 2f,
+ Size + Vector2.One * _animationAmplitude * (float)Math.Sin(Math.PI * _animation * 2),
+ SpriteEffects.None,
+ 0
+ );
+ UIController.SpriteBatch.DrawString(
+ Resources.Arial,
+ Text,
+ (Position - Resources.Arial.MeasureString(Text) / 2f).ToPoint().ToVector2(),
+ UIController.Text
+ );
+ }
+
+ public static bool PointInRectangleBySize(Vector2 point, Vector2 rectCenter, Vector2 rectSize)
+ {
+ var rectHalfSize = rectSize / 2f;
+ var pt1 = rectCenter - rectHalfSize;
+ var pt2 = rectCenter + rectHalfSize;
+ return point.X >= pt1.X && point.X <= pt2.X && point.Y >= pt1.Y && point.Y <= pt2.Y;
+ }
+
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/InputManager.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/InputManager.cs
new file mode 100644
index 0000000..e8fced4
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/InputManager.cs
@@ -0,0 +1,39 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Input.Touch;
+
+namespace ChaiFoxes.FMODAudio.Demos.UI
+{
+ public static class InputManager
+ {
+ public static Vector2 MousePosition { get; private set; }
+
+ public static bool MouseHeld => _click;
+ public static bool MousePressed => _click && !_oldClick;
+ public static bool MouseReleased => !_click && _oldClick;
+
+ private static bool _click;
+ private static bool _oldClick;
+
+ public static void Update()
+ {
+ _oldClick = _click;
+
+#if ANDROID
+ MousePosition = Vector2.Zero;
+ _click = false;
+ var state = TouchPanel.GetState();
+
+ if (state.Count > 0)
+ {
+ MousePosition = state[0].Position;
+ _click = state[0].State == TouchLocationState.Moved;
+ }
+#else
+ var mouse = Mouse.GetState();
+ MousePosition = mouse.Position.ToVector2();
+ _click = (mouse.LeftButton == ButtonState.Pressed);
+#endif
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Label.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Label.cs
new file mode 100644
index 0000000..fc1312c
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/Label.cs
@@ -0,0 +1,38 @@
+using Microsoft.Xna.Framework;
+using System;
+
+namespace ChaiFoxes.FMODAudio.Demos.UI
+{
+ public class Label : UIElement
+ {
+ public string Text;
+ public Vector2 Position { get; private set; }
+
+ private readonly Func _positionUpdate;
+
+ public Label(
+ string text,
+ Func positionUpdate
+ ) : base()
+ {
+ Text = text;
+ _positionUpdate = positionUpdate;
+ Position = _positionUpdate();
+ }
+
+ public override void Update()
+ {
+ _positionUpdate();
+ }
+
+ public override void Draw()
+ {
+ UIController.SpriteBatch.DrawString(
+ Resources.Arial,
+ Text,
+ (Position - Resources.Arial.MeasureString(Text) / 2f).ToPoint().ToVector2(),
+ UIController.Text
+ );
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIController.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIController.cs
new file mode 100644
index 0000000..f4c808e
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIController.cs
@@ -0,0 +1,48 @@
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework;
+using System.Collections.Generic;
+
+namespace ChaiFoxes.FMODAudio.Demos.UI
+{
+ public static class UIController
+ {
+ public static readonly Color Backgroud = new Color(110, 87, 115);
+ public static readonly Color Accent = new Color(234, 144, 133);
+ public static readonly Color Text = new Color(233, 225, 204);
+
+ public static SpriteBatch SpriteBatch { get; private set; }
+
+ private static List _elements = new List();
+
+ public static void Init(GraphicsDevice device)
+ {
+ SpriteBatch = new SpriteBatch(device);
+ }
+
+ public static void Update()
+ {
+ InputManager.Update();
+ foreach (var element in _elements.ToArray()) // Yeah, yeah, the thing generates garbage, who cares. :S
+ {
+ element.Update();
+ }
+ }
+
+ public static void Draw()
+ {
+ SpriteBatch.Begin();
+ foreach(var element in _elements.ToArray()) // Yeah, yeah, the thing generates garbage, who cares. :S
+ {
+ element.Draw();
+ }
+ SpriteBatch.End();
+ }
+
+ public static void Add(UIElement element) =>
+ _elements.Add(element);
+
+ public static void Remove(UIElement element) =>
+ _elements.Remove(element);
+
+ }
+}
diff --git a/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIElement.cs b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIElement.cs
new file mode 100644
index 0000000..ec7fd5a
--- /dev/null
+++ b/ChaiFoxes.FMODAudio.Demos/ChaiFoxes.FMODAudio.Demos/UI/UIElement.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ChaiFoxes.FMODAudio.Demos.UI
+{
+ public abstract class UIElement
+ {
+ public UIElement()
+ {
+ UIController.Add(this);
+ }
+
+ public abstract void Update();
+ public abstract void Draw();
+
+ public void Destroy() =>
+ UIController.Remove(this);
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Properties/AssemblyInfo.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2619674..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android.Bindings/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using Android.App;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ChaiFoxes.FMODAudio.Android.Bindings")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ChaiFoxes.FMODAudio.Android.Bindings")]
-[assembly: AssemblyCopyright("Copyright © 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-[assembly: ComVisible(false)]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.csproj b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.csproj
index 278e024..196d316 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.csproj
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.csproj
@@ -1,49 +1,27 @@
-
-
+
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {08D5910F-1CA1-4A7E-A3F7-354FF1B03858}
- {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {9ef11e43-1701-4396-8835-8392d57abb70}
- Library
- Properties
ChaiFoxes.FMODAudio.Android
- ChaiFoxes.FMODAudio.Android
- 512
- Resources\Resource.designer.cs
- Off
- false
+ ChaiFoxes.FMODAudio.Android
+ 512
+ MonoAndroid81
+ MonoAndroid
v8.1
-
+ ..\bin\$(Configuration)\$(AssemblyName)\
+ ..\bin\$(Configuration)\$(AssemblyName)\$(AssemblyName).xml
+ 1591
+ Monogame, FMOD, Audio, Music, Android
+ ..\..\Release\
+ icon.png
+
- true
- portable
- false
- bin\Debug\
- TRACE;DEBUG;ANDROID
- prompt
- 4
- bin\Debug\ChaiFoxes.FMODAudio.Android.xml
+ TRACE;DEBUG;ANDROID;UNITY_2017_4_OR_NEWER;UNITY_PS4
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\ChaiFoxes.FMODAudio.Android.xml
+ TRACE;ANDROID;UNITY_2017_4_OR_NEWER;UNITY_PS4
-
- False
- ..\..\..\..\..\Program Files (x86)\MonoGame\v3.0\Assemblies\Android\MonoGame.Framework.dll
-
@@ -51,32 +29,22 @@
-
-
-
-
-
-
- Designer
+
+ True
+
+
+
+ True
+
-
-
-
-
-
-
-
-
-
-
-
- {2546d47c-eea5-41d3-8906-b28a3b819889}
- ChaiFoxes.FMODAudio.Android.Bindings
-
+
+ All
+
+
-
+
-
\ No newline at end of file
+
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.nuspec b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.nuspec
deleted file mode 100644
index 1a8a6b9..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/ChaiFoxes.FMODAudio.Android.nuspec
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- ChaiFoxes.FMODAudio.Android
- 1.0.3
- ChaiFoxes.FMODAudio.Android
- gn Fur
- Chai Foxes
- MPL-2.0
- https://github.com/gnFur/ChaiFoxes.FMODAudio
- https://raw.githubusercontent.com/gnFur/ChaiFoxes.FMODAudio/master/Icon/icon.png
- false
- FMOD library wrapper for Android Monogame projects.
- Fixed streamed sounds crashing everything after GC.
- Copyright 2019
- fmod audio monogame android
-
-
-
-
-
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/AudioMgr.Android.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/NativeLibraryLoader.cs
similarity index 57%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/AudioMgr.Android.cs
rename to ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/NativeLibraryLoader.cs
index 1b49a6c..55258e5 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/AudioMgr.Android.cs
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/NativeLibraryLoader.cs
@@ -3,14 +3,12 @@
///
/// Android-specific part of the audio manager.
///
- public static partial class AudioMgr
+ public static class NativeLibraryLoader
{
///
/// Loads Android version of FMOD library.
///
- public static void LoadNativeLibrary()
- {
- Java.Lang.JavaSystem.LoadLibrary("fmod");
- }
+ public static void LoadNativeLibrary(string libName) =>
+ Java.Lang.JavaSystem.LoadLibrary(libName);
}
}
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/AboutResources.txt b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/AboutResources.txt
deleted file mode 100644
index c2bca97..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/AboutResources.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Images, layout descriptions, binary blobs and string dictionaries can be included
-in your application as resource files. Various Android APIs are designed to
-operate on the resource IDs instead of dealing with images, strings or binary blobs
-directly.
-
-For example, a sample Android app that contains a user interface layout (main.axml),
-an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
-would keep its resources in the "Resources" directory of the application:
-
-Resources/
- drawable/
- icon.png
-
- layout/
- main.axml
-
- values/
- strings.xml
-
-In order to get the build system to recognize Android resources, set the build action to
-"AndroidResource". The native Android APIs do not operate directly with filenames, but
-instead operate on resource IDs. When you compile an Android application that uses resources,
-the build system will package the resources for distribution and generate a class called "R"
-(this is an Android convention) that contains the tokens for each one of the resources
-included. For example, for the above Resources layout, this is what the R class would expose:
-
-public class R {
- public class drawable {
- public const int icon = 0x123;
- }
-
- public class layout {
- public const int main = 0x456;
- }
-
- public class strings {
- public const int first_string = 0xabc;
- public const int second_string = 0xbcd;
- }
-}
-
-You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
-to reference the layout/main.axml file, or R.strings.first_string to reference the first
-string in the dictionary file values/strings.xml.
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/Resource.designer.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/Resource.designer.cs
deleted file mode 100644
index c7c0c42..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/Resource.designer.cs
+++ /dev/null
@@ -1,5078 +0,0 @@
-#pragma warning disable 1591
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-[assembly: global::Android.Runtime.ResourceDesignerAttribute("ChaiFoxes.FMODAudio.Android.Resource", IsApplication=false)]
-
-namespace ChaiFoxes.FMODAudio.Android
-{
-
-
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
- public partial class Resource
- {
-
- static Resource()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- public partial class Animation
- {
-
- // aapt resource value: 0x7f040000
- public static int abc_fade_in = 2130968576;
-
- // aapt resource value: 0x7f040001
- public static int abc_fade_out = 2130968577;
-
- // aapt resource value: 0x7f040002
- public static int abc_grow_fade_in_from_bottom = 2130968578;
-
- // aapt resource value: 0x7f040003
- public static int abc_popup_enter = 2130968579;
-
- // aapt resource value: 0x7f040004
- public static int abc_popup_exit = 2130968580;
-
- // aapt resource value: 0x7f040005
- public static int abc_shrink_fade_out_from_bottom = 2130968581;
-
- // aapt resource value: 0x7f040006
- public static int abc_slide_in_bottom = 2130968582;
-
- // aapt resource value: 0x7f040007
- public static int abc_slide_in_top = 2130968583;
-
- // aapt resource value: 0x7f040008
- public static int abc_slide_out_bottom = 2130968584;
-
- // aapt resource value: 0x7f040009
- public static int abc_slide_out_top = 2130968585;
-
- // aapt resource value: 0x7f04000a
- public static int tooltip_enter = 2130968586;
-
- // aapt resource value: 0x7f04000b
- public static int tooltip_exit = 2130968587;
-
- static Animation()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Animation()
- {
- }
- }
-
- public partial class Attribute
- {
-
- // aapt resource value: 0x7f010049
- public static int actionBarDivider = 2130772041;
-
- // aapt resource value: 0x7f01004a
- public static int actionBarItemBackground = 2130772042;
-
- // aapt resource value: 0x7f010043
- public static int actionBarPopupTheme = 2130772035;
-
- // aapt resource value: 0x7f010048
- public static int actionBarSize = 2130772040;
-
- // aapt resource value: 0x7f010045
- public static int actionBarSplitStyle = 2130772037;
-
- // aapt resource value: 0x7f010044
- public static int actionBarStyle = 2130772036;
-
- // aapt resource value: 0x7f01003f
- public static int actionBarTabBarStyle = 2130772031;
-
- // aapt resource value: 0x7f01003e
- public static int actionBarTabStyle = 2130772030;
-
- // aapt resource value: 0x7f010040
- public static int actionBarTabTextStyle = 2130772032;
-
- // aapt resource value: 0x7f010046
- public static int actionBarTheme = 2130772038;
-
- // aapt resource value: 0x7f010047
- public static int actionBarWidgetTheme = 2130772039;
-
- // aapt resource value: 0x7f010064
- public static int actionButtonStyle = 2130772068;
-
- // aapt resource value: 0x7f010060
- public static int actionDropDownStyle = 2130772064;
-
- // aapt resource value: 0x7f0100bb
- public static int actionLayout = 2130772155;
-
- // aapt resource value: 0x7f01004b
- public static int actionMenuTextAppearance = 2130772043;
-
- // aapt resource value: 0x7f01004c
- public static int actionMenuTextColor = 2130772044;
-
- // aapt resource value: 0x7f01004f
- public static int actionModeBackground = 2130772047;
-
- // aapt resource value: 0x7f01004e
- public static int actionModeCloseButtonStyle = 2130772046;
-
- // aapt resource value: 0x7f010051
- public static int actionModeCloseDrawable = 2130772049;
-
- // aapt resource value: 0x7f010053
- public static int actionModeCopyDrawable = 2130772051;
-
- // aapt resource value: 0x7f010052
- public static int actionModeCutDrawable = 2130772050;
-
- // aapt resource value: 0x7f010057
- public static int actionModeFindDrawable = 2130772055;
-
- // aapt resource value: 0x7f010054
- public static int actionModePasteDrawable = 2130772052;
-
- // aapt resource value: 0x7f010059
- public static int actionModePopupWindowStyle = 2130772057;
-
- // aapt resource value: 0x7f010055
- public static int actionModeSelectAllDrawable = 2130772053;
-
- // aapt resource value: 0x7f010056
- public static int actionModeShareDrawable = 2130772054;
-
- // aapt resource value: 0x7f010050
- public static int actionModeSplitBackground = 2130772048;
-
- // aapt resource value: 0x7f01004d
- public static int actionModeStyle = 2130772045;
-
- // aapt resource value: 0x7f010058
- public static int actionModeWebSearchDrawable = 2130772056;
-
- // aapt resource value: 0x7f010041
- public static int actionOverflowButtonStyle = 2130772033;
-
- // aapt resource value: 0x7f010042
- public static int actionOverflowMenuStyle = 2130772034;
-
- // aapt resource value: 0x7f0100bd
- public static int actionProviderClass = 2130772157;
-
- // aapt resource value: 0x7f0100bc
- public static int actionViewClass = 2130772156;
-
- // aapt resource value: 0x7f01006c
- public static int activityChooserViewStyle = 2130772076;
-
- // aapt resource value: 0x7f010091
- public static int alertDialogButtonGroupStyle = 2130772113;
-
- // aapt resource value: 0x7f010092
- public static int alertDialogCenterButtons = 2130772114;
-
- // aapt resource value: 0x7f010090
- public static int alertDialogStyle = 2130772112;
-
- // aapt resource value: 0x7f010093
- public static int alertDialogTheme = 2130772115;
-
- // aapt resource value: 0x7f0100a9
- public static int allowStacking = 2130772137;
-
- // aapt resource value: 0x7f0100aa
- public static int alpha = 2130772138;
-
- // aapt resource value: 0x7f0100b8
- public static int alphabeticModifiers = 2130772152;
-
- // aapt resource value: 0x7f0100b1
- public static int arrowHeadLength = 2130772145;
-
- // aapt resource value: 0x7f0100b2
- public static int arrowShaftLength = 2130772146;
-
- // aapt resource value: 0x7f010098
- public static int autoCompleteTextViewStyle = 2130772120;
-
- // aapt resource value: 0x7f010032
- public static int autoSizeMaxTextSize = 2130772018;
-
- // aapt resource value: 0x7f010031
- public static int autoSizeMinTextSize = 2130772017;
-
- // aapt resource value: 0x7f010030
- public static int autoSizePresetSizes = 2130772016;
-
- // aapt resource value: 0x7f01002f
- public static int autoSizeStepGranularity = 2130772015;
-
- // aapt resource value: 0x7f01002e
- public static int autoSizeTextType = 2130772014;
-
- // aapt resource value: 0x7f01000c
- public static int background = 2130771980;
-
- // aapt resource value: 0x7f01000e
- public static int backgroundSplit = 2130771982;
-
- // aapt resource value: 0x7f01000d
- public static int backgroundStacked = 2130771981;
-
- // aapt resource value: 0x7f0100f4
- public static int backgroundTint = 2130772212;
-
- // aapt resource value: 0x7f0100f5
- public static int backgroundTintMode = 2130772213;
-
- // aapt resource value: 0x7f0100b3
- public static int barLength = 2130772147;
-
- // aapt resource value: 0x7f010069
- public static int borderlessButtonStyle = 2130772073;
-
- // aapt resource value: 0x7f010066
- public static int buttonBarButtonStyle = 2130772070;
-
- // aapt resource value: 0x7f010096
- public static int buttonBarNegativeButtonStyle = 2130772118;
-
- // aapt resource value: 0x7f010097
- public static int buttonBarNeutralButtonStyle = 2130772119;
-
- // aapt resource value: 0x7f010095
- public static int buttonBarPositiveButtonStyle = 2130772117;
-
- // aapt resource value: 0x7f010065
- public static int buttonBarStyle = 2130772069;
-
- // aapt resource value: 0x7f0100e9
- public static int buttonGravity = 2130772201;
-
- // aapt resource value: 0x7f010021
- public static int buttonPanelSideLayout = 2130772001;
-
- // aapt resource value: 0x7f010099
- public static int buttonStyle = 2130772121;
-
- // aapt resource value: 0x7f01009a
- public static int buttonStyleSmall = 2130772122;
-
- // aapt resource value: 0x7f0100ab
- public static int buttonTint = 2130772139;
-
- // aapt resource value: 0x7f0100ac
- public static int buttonTintMode = 2130772140;
-
- // aapt resource value: 0x7f01009b
- public static int checkboxStyle = 2130772123;
-
- // aapt resource value: 0x7f01009c
- public static int checkedTextViewStyle = 2130772124;
-
- // aapt resource value: 0x7f0100cc
- public static int closeIcon = 2130772172;
-
- // aapt resource value: 0x7f01001e
- public static int closeItemLayout = 2130771998;
-
- // aapt resource value: 0x7f0100eb
- public static int collapseContentDescription = 2130772203;
-
- // aapt resource value: 0x7f0100ea
- public static int collapseIcon = 2130772202;
-
- // aapt resource value: 0x7f0100ad
- public static int color = 2130772141;
-
- // aapt resource value: 0x7f010088
- public static int colorAccent = 2130772104;
-
- // aapt resource value: 0x7f01008f
- public static int colorBackgroundFloating = 2130772111;
-
- // aapt resource value: 0x7f01008c
- public static int colorButtonNormal = 2130772108;
-
- // aapt resource value: 0x7f01008a
- public static int colorControlActivated = 2130772106;
-
- // aapt resource value: 0x7f01008b
- public static int colorControlHighlight = 2130772107;
-
- // aapt resource value: 0x7f010089
- public static int colorControlNormal = 2130772105;
-
- // aapt resource value: 0x7f0100a8
- public static int colorError = 2130772136;
-
- // aapt resource value: 0x7f010086
- public static int colorPrimary = 2130772102;
-
- // aapt resource value: 0x7f010087
- public static int colorPrimaryDark = 2130772103;
-
- // aapt resource value: 0x7f01008d
- public static int colorSwitchThumbNormal = 2130772109;
-
- // aapt resource value: 0x7f0100d1
- public static int commitIcon = 2130772177;
-
- // aapt resource value: 0x7f0100be
- public static int contentDescription = 2130772158;
-
- // aapt resource value: 0x7f010017
- public static int contentInsetEnd = 2130771991;
-
- // aapt resource value: 0x7f01001b
- public static int contentInsetEndWithActions = 2130771995;
-
- // aapt resource value: 0x7f010018
- public static int contentInsetLeft = 2130771992;
-
- // aapt resource value: 0x7f010019
- public static int contentInsetRight = 2130771993;
-
- // aapt resource value: 0x7f010016
- public static int contentInsetStart = 2130771990;
-
- // aapt resource value: 0x7f01001a
- public static int contentInsetStartWithNavigation = 2130771994;
-
- // aapt resource value: 0x7f01008e
- public static int controlBackground = 2130772110;
-
- // aapt resource value: 0x7f01000f
- public static int customNavigationLayout = 2130771983;
-
- // aapt resource value: 0x7f0100cb
- public static int defaultQueryHint = 2130772171;
-
- // aapt resource value: 0x7f01005e
- public static int dialogPreferredPadding = 2130772062;
-
- // aapt resource value: 0x7f01005d
- public static int dialogTheme = 2130772061;
-
- // aapt resource value: 0x7f010005
- public static int displayOptions = 2130771973;
-
- // aapt resource value: 0x7f01000b
- public static int divider = 2130771979;
-
- // aapt resource value: 0x7f01006b
- public static int dividerHorizontal = 2130772075;
-
- // aapt resource value: 0x7f0100b7
- public static int dividerPadding = 2130772151;
-
- // aapt resource value: 0x7f01006a
- public static int dividerVertical = 2130772074;
-
- // aapt resource value: 0x7f0100af
- public static int drawableSize = 2130772143;
-
- // aapt resource value: 0x7f010000
- public static int drawerArrowStyle = 2130771968;
-
- // aapt resource value: 0x7f01007d
- public static int dropDownListViewStyle = 2130772093;
-
- // aapt resource value: 0x7f010061
- public static int dropdownListPreferredItemHeight = 2130772065;
-
- // aapt resource value: 0x7f010072
- public static int editTextBackground = 2130772082;
-
- // aapt resource value: 0x7f010071
- public static int editTextColor = 2130772081;
-
- // aapt resource value: 0x7f01009d
- public static int editTextStyle = 2130772125;
-
- // aapt resource value: 0x7f01001c
- public static int elevation = 2130771996;
-
- // aapt resource value: 0x7f010020
- public static int expandActivityOverflowButtonDrawable = 2130772000;
-
- // aapt resource value: 0x7f0100fd
- public static int font = 2130772221;
-
- // aapt resource value: 0x7f010033
- public static int fontFamily = 2130772019;
-
- // aapt resource value: 0x7f0100f6
- public static int fontProviderAuthority = 2130772214;
-
- // aapt resource value: 0x7f0100f9
- public static int fontProviderCerts = 2130772217;
-
- // aapt resource value: 0x7f0100fa
- public static int fontProviderFetchStrategy = 2130772218;
-
- // aapt resource value: 0x7f0100fb
- public static int fontProviderFetchTimeout = 2130772219;
-
- // aapt resource value: 0x7f0100f7
- public static int fontProviderPackage = 2130772215;
-
- // aapt resource value: 0x7f0100f8
- public static int fontProviderQuery = 2130772216;
-
- // aapt resource value: 0x7f0100fc
- public static int fontStyle = 2130772220;
-
- // aapt resource value: 0x7f0100fe
- public static int fontWeight = 2130772222;
-
- // aapt resource value: 0x7f0100b0
- public static int gapBetweenBars = 2130772144;
-
- // aapt resource value: 0x7f0100cd
- public static int goIcon = 2130772173;
-
- // aapt resource value: 0x7f010001
- public static int height = 2130771969;
-
- // aapt resource value: 0x7f010015
- public static int hideOnContentScroll = 2130771989;
-
- // aapt resource value: 0x7f010063
- public static int homeAsUpIndicator = 2130772067;
-
- // aapt resource value: 0x7f010010
- public static int homeLayout = 2130771984;
-
- // aapt resource value: 0x7f010009
- public static int icon = 2130771977;
-
- // aapt resource value: 0x7f0100c0
- public static int iconTint = 2130772160;
-
- // aapt resource value: 0x7f0100c1
- public static int iconTintMode = 2130772161;
-
- // aapt resource value: 0x7f0100c9
- public static int iconifiedByDefault = 2130772169;
-
- // aapt resource value: 0x7f010073
- public static int imageButtonStyle = 2130772083;
-
- // aapt resource value: 0x7f010012
- public static int indeterminateProgressStyle = 2130771986;
-
- // aapt resource value: 0x7f01001f
- public static int initialActivityCount = 2130771999;
-
- // aapt resource value: 0x7f010002
- public static int isLightTheme = 2130771970;
-
- // aapt resource value: 0x7f010014
- public static int itemPadding = 2130771988;
-
- // aapt resource value: 0x7f0100c8
- public static int layout = 2130772168;
-
- // aapt resource value: 0x7f010085
- public static int listChoiceBackgroundIndicator = 2130772101;
-
- // aapt resource value: 0x7f01005f
- public static int listDividerAlertDialog = 2130772063;
-
- // aapt resource value: 0x7f010025
- public static int listItemLayout = 2130772005;
-
- // aapt resource value: 0x7f010022
- public static int listLayout = 2130772002;
-
- // aapt resource value: 0x7f0100a5
- public static int listMenuViewStyle = 2130772133;
-
- // aapt resource value: 0x7f01007e
- public static int listPopupWindowStyle = 2130772094;
-
- // aapt resource value: 0x7f010078
- public static int listPreferredItemHeight = 2130772088;
-
- // aapt resource value: 0x7f01007a
- public static int listPreferredItemHeightLarge = 2130772090;
-
- // aapt resource value: 0x7f010079
- public static int listPreferredItemHeightSmall = 2130772089;
-
- // aapt resource value: 0x7f01007b
- public static int listPreferredItemPaddingLeft = 2130772091;
-
- // aapt resource value: 0x7f01007c
- public static int listPreferredItemPaddingRight = 2130772092;
-
- // aapt resource value: 0x7f01000a
- public static int logo = 2130771978;
-
- // aapt resource value: 0x7f0100ee
- public static int logoDescription = 2130772206;
-
- // aapt resource value: 0x7f0100e8
- public static int maxButtonHeight = 2130772200;
-
- // aapt resource value: 0x7f0100b5
- public static int measureWithLargestChild = 2130772149;
-
- // aapt resource value: 0x7f010023
- public static int multiChoiceItemLayout = 2130772003;
-
- // aapt resource value: 0x7f0100ed
- public static int navigationContentDescription = 2130772205;
-
- // aapt resource value: 0x7f0100ec
- public static int navigationIcon = 2130772204;
-
- // aapt resource value: 0x7f010004
- public static int navigationMode = 2130771972;
-
- // aapt resource value: 0x7f0100b9
- public static int numericModifiers = 2130772153;
-
- // aapt resource value: 0x7f0100c4
- public static int overlapAnchor = 2130772164;
-
- // aapt resource value: 0x7f0100c6
- public static int paddingBottomNoButtons = 2130772166;
-
- // aapt resource value: 0x7f0100f2
- public static int paddingEnd = 2130772210;
-
- // aapt resource value: 0x7f0100f1
- public static int paddingStart = 2130772209;
-
- // aapt resource value: 0x7f0100c7
- public static int paddingTopNoTitle = 2130772167;
-
- // aapt resource value: 0x7f010082
- public static int panelBackground = 2130772098;
-
- // aapt resource value: 0x7f010084
- public static int panelMenuListTheme = 2130772100;
-
- // aapt resource value: 0x7f010083
- public static int panelMenuListWidth = 2130772099;
-
- // aapt resource value: 0x7f01006f
- public static int popupMenuStyle = 2130772079;
-
- // aapt resource value: 0x7f01001d
- public static int popupTheme = 2130771997;
-
- // aapt resource value: 0x7f010070
- public static int popupWindowStyle = 2130772080;
-
- // aapt resource value: 0x7f0100c2
- public static int preserveIconSpacing = 2130772162;
-
- // aapt resource value: 0x7f010013
- public static int progressBarPadding = 2130771987;
-
- // aapt resource value: 0x7f010011
- public static int progressBarStyle = 2130771985;
-
- // aapt resource value: 0x7f0100d3
- public static int queryBackground = 2130772179;
-
- // aapt resource value: 0x7f0100ca
- public static int queryHint = 2130772170;
-
- // aapt resource value: 0x7f01009e
- public static int radioButtonStyle = 2130772126;
-
- // aapt resource value: 0x7f01009f
- public static int ratingBarStyle = 2130772127;
-
- // aapt resource value: 0x7f0100a0
- public static int ratingBarStyleIndicator = 2130772128;
-
- // aapt resource value: 0x7f0100a1
- public static int ratingBarStyleSmall = 2130772129;
-
- // aapt resource value: 0x7f0100cf
- public static int searchHintIcon = 2130772175;
-
- // aapt resource value: 0x7f0100ce
- public static int searchIcon = 2130772174;
-
- // aapt resource value: 0x7f010077
- public static int searchViewStyle = 2130772087;
-
- // aapt resource value: 0x7f0100a2
- public static int seekBarStyle = 2130772130;
-
- // aapt resource value: 0x7f010067
- public static int selectableItemBackground = 2130772071;
-
- // aapt resource value: 0x7f010068
- public static int selectableItemBackgroundBorderless = 2130772072;
-
- // aapt resource value: 0x7f0100ba
- public static int showAsAction = 2130772154;
-
- // aapt resource value: 0x7f0100b6
- public static int showDividers = 2130772150;
-
- // aapt resource value: 0x7f0100df
- public static int showText = 2130772191;
-
- // aapt resource value: 0x7f010026
- public static int showTitle = 2130772006;
-
- // aapt resource value: 0x7f010024
- public static int singleChoiceItemLayout = 2130772004;
-
- // aapt resource value: 0x7f0100ae
- public static int spinBars = 2130772142;
-
- // aapt resource value: 0x7f010062
- public static int spinnerDropDownItemStyle = 2130772066;
-
- // aapt resource value: 0x7f0100a3
- public static int spinnerStyle = 2130772131;
-
- // aapt resource value: 0x7f0100de
- public static int splitTrack = 2130772190;
-
- // aapt resource value: 0x7f010027
- public static int srcCompat = 2130772007;
-
- // aapt resource value: 0x7f0100c5
- public static int state_above_anchor = 2130772165;
-
- // aapt resource value: 0x7f0100c3
- public static int subMenuArrow = 2130772163;
-
- // aapt resource value: 0x7f0100d4
- public static int submitBackground = 2130772180;
-
- // aapt resource value: 0x7f010006
- public static int subtitle = 2130771974;
-
- // aapt resource value: 0x7f0100e1
- public static int subtitleTextAppearance = 2130772193;
-
- // aapt resource value: 0x7f0100f0
- public static int subtitleTextColor = 2130772208;
-
- // aapt resource value: 0x7f010008
- public static int subtitleTextStyle = 2130771976;
-
- // aapt resource value: 0x7f0100d2
- public static int suggestionRowLayout = 2130772178;
-
- // aapt resource value: 0x7f0100dc
- public static int switchMinWidth = 2130772188;
-
- // aapt resource value: 0x7f0100dd
- public static int switchPadding = 2130772189;
-
- // aapt resource value: 0x7f0100a4
- public static int switchStyle = 2130772132;
-
- // aapt resource value: 0x7f0100db
- public static int switchTextAppearance = 2130772187;
-
- // aapt resource value: 0x7f01002d
- public static int textAllCaps = 2130772013;
-
- // aapt resource value: 0x7f01005a
- public static int textAppearanceLargePopupMenu = 2130772058;
-
- // aapt resource value: 0x7f01007f
- public static int textAppearanceListItem = 2130772095;
-
- // aapt resource value: 0x7f010080
- public static int textAppearanceListItemSecondary = 2130772096;
-
- // aapt resource value: 0x7f010081
- public static int textAppearanceListItemSmall = 2130772097;
-
- // aapt resource value: 0x7f01005c
- public static int textAppearancePopupMenuHeader = 2130772060;
-
- // aapt resource value: 0x7f010075
- public static int textAppearanceSearchResultSubtitle = 2130772085;
-
- // aapt resource value: 0x7f010074
- public static int textAppearanceSearchResultTitle = 2130772084;
-
- // aapt resource value: 0x7f01005b
- public static int textAppearanceSmallPopupMenu = 2130772059;
-
- // aapt resource value: 0x7f010094
- public static int textColorAlertDialogListItem = 2130772116;
-
- // aapt resource value: 0x7f010076
- public static int textColorSearchUrl = 2130772086;
-
- // aapt resource value: 0x7f0100f3
- public static int theme = 2130772211;
-
- // aapt resource value: 0x7f0100b4
- public static int thickness = 2130772148;
-
- // aapt resource value: 0x7f0100da
- public static int thumbTextPadding = 2130772186;
-
- // aapt resource value: 0x7f0100d5
- public static int thumbTint = 2130772181;
-
- // aapt resource value: 0x7f0100d6
- public static int thumbTintMode = 2130772182;
-
- // aapt resource value: 0x7f01002a
- public static int tickMark = 2130772010;
-
- // aapt resource value: 0x7f01002b
- public static int tickMarkTint = 2130772011;
-
- // aapt resource value: 0x7f01002c
- public static int tickMarkTintMode = 2130772012;
-
- // aapt resource value: 0x7f010028
- public static int tint = 2130772008;
-
- // aapt resource value: 0x7f010029
- public static int tintMode = 2130772009;
-
- // aapt resource value: 0x7f010003
- public static int title = 2130771971;
-
- // aapt resource value: 0x7f0100e2
- public static int titleMargin = 2130772194;
-
- // aapt resource value: 0x7f0100e6
- public static int titleMarginBottom = 2130772198;
-
- // aapt resource value: 0x7f0100e4
- public static int titleMarginEnd = 2130772196;
-
- // aapt resource value: 0x7f0100e3
- public static int titleMarginStart = 2130772195;
-
- // aapt resource value: 0x7f0100e5
- public static int titleMarginTop = 2130772197;
-
- // aapt resource value: 0x7f0100e7
- public static int titleMargins = 2130772199;
-
- // aapt resource value: 0x7f0100e0
- public static int titleTextAppearance = 2130772192;
-
- // aapt resource value: 0x7f0100ef
- public static int titleTextColor = 2130772207;
-
- // aapt resource value: 0x7f010007
- public static int titleTextStyle = 2130771975;
-
- // aapt resource value: 0x7f01006e
- public static int toolbarNavigationButtonStyle = 2130772078;
-
- // aapt resource value: 0x7f01006d
- public static int toolbarStyle = 2130772077;
-
- // aapt resource value: 0x7f0100a7
- public static int tooltipForegroundColor = 2130772135;
-
- // aapt resource value: 0x7f0100a6
- public static int tooltipFrameBackground = 2130772134;
-
- // aapt resource value: 0x7f0100bf
- public static int tooltipText = 2130772159;
-
- // aapt resource value: 0x7f0100d7
- public static int track = 2130772183;
-
- // aapt resource value: 0x7f0100d8
- public static int trackTint = 2130772184;
-
- // aapt resource value: 0x7f0100d9
- public static int trackTintMode = 2130772185;
-
- // aapt resource value: 0x7f0100d0
- public static int voiceIcon = 2130772176;
-
- // aapt resource value: 0x7f010034
- public static int windowActionBar = 2130772020;
-
- // aapt resource value: 0x7f010036
- public static int windowActionBarOverlay = 2130772022;
-
- // aapt resource value: 0x7f010037
- public static int windowActionModeOverlay = 2130772023;
-
- // aapt resource value: 0x7f01003b
- public static int windowFixedHeightMajor = 2130772027;
-
- // aapt resource value: 0x7f010039
- public static int windowFixedHeightMinor = 2130772025;
-
- // aapt resource value: 0x7f010038
- public static int windowFixedWidthMajor = 2130772024;
-
- // aapt resource value: 0x7f01003a
- public static int windowFixedWidthMinor = 2130772026;
-
- // aapt resource value: 0x7f01003c
- public static int windowMinWidthMajor = 2130772028;
-
- // aapt resource value: 0x7f01003d
- public static int windowMinWidthMinor = 2130772029;
-
- // aapt resource value: 0x7f010035
- public static int windowNoTitle = 2130772021;
-
- static Attribute()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Attribute()
- {
- }
- }
-
- public partial class Boolean
- {
-
- // aapt resource value: 0x7f080000
- public static int abc_action_bar_embed_tabs = 2131230720;
-
- // aapt resource value: 0x7f080001
- public static int abc_allow_stacked_button_bar = 2131230721;
-
- // aapt resource value: 0x7f080002
- public static int abc_config_actionMenuItemAllCaps = 2131230722;
-
- // aapt resource value: 0x7f080003
- public static int abc_config_closeDialogWhenTouchOutside = 2131230723;
-
- // aapt resource value: 0x7f080004
- public static int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131230724;
-
- static Boolean()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Boolean()
- {
- }
- }
-
- public partial class Color
- {
-
- // aapt resource value: 0x7f09003e
- public static int abc_background_cache_hint_selector_material_dark = 2131296318;
-
- // aapt resource value: 0x7f09003f
- public static int abc_background_cache_hint_selector_material_light = 2131296319;
-
- // aapt resource value: 0x7f090040
- public static int abc_btn_colored_borderless_text_material = 2131296320;
-
- // aapt resource value: 0x7f090041
- public static int abc_btn_colored_text_material = 2131296321;
-
- // aapt resource value: 0x7f090042
- public static int abc_color_highlight_material = 2131296322;
-
- // aapt resource value: 0x7f090043
- public static int abc_hint_foreground_material_dark = 2131296323;
-
- // aapt resource value: 0x7f090044
- public static int abc_hint_foreground_material_light = 2131296324;
-
- // aapt resource value: 0x7f090000
- public static int abc_input_method_navigation_guard = 2131296256;
-
- // aapt resource value: 0x7f090045
- public static int abc_primary_text_disable_only_material_dark = 2131296325;
-
- // aapt resource value: 0x7f090046
- public static int abc_primary_text_disable_only_material_light = 2131296326;
-
- // aapt resource value: 0x7f090047
- public static int abc_primary_text_material_dark = 2131296327;
-
- // aapt resource value: 0x7f090048
- public static int abc_primary_text_material_light = 2131296328;
-
- // aapt resource value: 0x7f090049
- public static int abc_search_url_text = 2131296329;
-
- // aapt resource value: 0x7f090001
- public static int abc_search_url_text_normal = 2131296257;
-
- // aapt resource value: 0x7f090002
- public static int abc_search_url_text_pressed = 2131296258;
-
- // aapt resource value: 0x7f090003
- public static int abc_search_url_text_selected = 2131296259;
-
- // aapt resource value: 0x7f09004a
- public static int abc_secondary_text_material_dark = 2131296330;
-
- // aapt resource value: 0x7f09004b
- public static int abc_secondary_text_material_light = 2131296331;
-
- // aapt resource value: 0x7f09004c
- public static int abc_tint_btn_checkable = 2131296332;
-
- // aapt resource value: 0x7f09004d
- public static int abc_tint_default = 2131296333;
-
- // aapt resource value: 0x7f09004e
- public static int abc_tint_edittext = 2131296334;
-
- // aapt resource value: 0x7f09004f
- public static int abc_tint_seek_thumb = 2131296335;
-
- // aapt resource value: 0x7f090050
- public static int abc_tint_spinner = 2131296336;
-
- // aapt resource value: 0x7f090051
- public static int abc_tint_switch_track = 2131296337;
-
- // aapt resource value: 0x7f090004
- public static int accent_material_dark = 2131296260;
-
- // aapt resource value: 0x7f090005
- public static int accent_material_light = 2131296261;
-
- // aapt resource value: 0x7f090006
- public static int background_floating_material_dark = 2131296262;
-
- // aapt resource value: 0x7f090007
- public static int background_floating_material_light = 2131296263;
-
- // aapt resource value: 0x7f090008
- public static int background_material_dark = 2131296264;
-
- // aapt resource value: 0x7f090009
- public static int background_material_light = 2131296265;
-
- // aapt resource value: 0x7f09000a
- public static int bright_foreground_disabled_material_dark = 2131296266;
-
- // aapt resource value: 0x7f09000b
- public static int bright_foreground_disabled_material_light = 2131296267;
-
- // aapt resource value: 0x7f09000c
- public static int bright_foreground_inverse_material_dark = 2131296268;
-
- // aapt resource value: 0x7f09000d
- public static int bright_foreground_inverse_material_light = 2131296269;
-
- // aapt resource value: 0x7f09000e
- public static int bright_foreground_material_dark = 2131296270;
-
- // aapt resource value: 0x7f09000f
- public static int bright_foreground_material_light = 2131296271;
-
- // aapt resource value: 0x7f090010
- public static int button_material_dark = 2131296272;
-
- // aapt resource value: 0x7f090011
- public static int button_material_light = 2131296273;
-
- // aapt resource value: 0x7f090012
- public static int dim_foreground_disabled_material_dark = 2131296274;
-
- // aapt resource value: 0x7f090013
- public static int dim_foreground_disabled_material_light = 2131296275;
-
- // aapt resource value: 0x7f090014
- public static int dim_foreground_material_dark = 2131296276;
-
- // aapt resource value: 0x7f090015
- public static int dim_foreground_material_light = 2131296277;
-
- // aapt resource value: 0x7f090016
- public static int error_color_material = 2131296278;
-
- // aapt resource value: 0x7f090017
- public static int foreground_material_dark = 2131296279;
-
- // aapt resource value: 0x7f090018
- public static int foreground_material_light = 2131296280;
-
- // aapt resource value: 0x7f090019
- public static int highlighted_text_material_dark = 2131296281;
-
- // aapt resource value: 0x7f09001a
- public static int highlighted_text_material_light = 2131296282;
-
- // aapt resource value: 0x7f09001b
- public static int material_blue_grey_800 = 2131296283;
-
- // aapt resource value: 0x7f09001c
- public static int material_blue_grey_900 = 2131296284;
-
- // aapt resource value: 0x7f09001d
- public static int material_blue_grey_950 = 2131296285;
-
- // aapt resource value: 0x7f09001e
- public static int material_deep_teal_200 = 2131296286;
-
- // aapt resource value: 0x7f09001f
- public static int material_deep_teal_500 = 2131296287;
-
- // aapt resource value: 0x7f090020
- public static int material_grey_100 = 2131296288;
-
- // aapt resource value: 0x7f090021
- public static int material_grey_300 = 2131296289;
-
- // aapt resource value: 0x7f090022
- public static int material_grey_50 = 2131296290;
-
- // aapt resource value: 0x7f090023
- public static int material_grey_600 = 2131296291;
-
- // aapt resource value: 0x7f090024
- public static int material_grey_800 = 2131296292;
-
- // aapt resource value: 0x7f090025
- public static int material_grey_850 = 2131296293;
-
- // aapt resource value: 0x7f090026
- public static int material_grey_900 = 2131296294;
-
- // aapt resource value: 0x7f09003c
- public static int notification_action_color_filter = 2131296316;
-
- // aapt resource value: 0x7f09003d
- public static int notification_icon_bg_color = 2131296317;
-
- // aapt resource value: 0x7f09003b
- public static int notification_material_background_media_default_color = 2131296315;
-
- // aapt resource value: 0x7f090027
- public static int primary_dark_material_dark = 2131296295;
-
- // aapt resource value: 0x7f090028
- public static int primary_dark_material_light = 2131296296;
-
- // aapt resource value: 0x7f090029
- public static int primary_material_dark = 2131296297;
-
- // aapt resource value: 0x7f09002a
- public static int primary_material_light = 2131296298;
-
- // aapt resource value: 0x7f09002b
- public static int primary_text_default_material_dark = 2131296299;
-
- // aapt resource value: 0x7f09002c
- public static int primary_text_default_material_light = 2131296300;
-
- // aapt resource value: 0x7f09002d
- public static int primary_text_disabled_material_dark = 2131296301;
-
- // aapt resource value: 0x7f09002e
- public static int primary_text_disabled_material_light = 2131296302;
-
- // aapt resource value: 0x7f09002f
- public static int ripple_material_dark = 2131296303;
-
- // aapt resource value: 0x7f090030
- public static int ripple_material_light = 2131296304;
-
- // aapt resource value: 0x7f090031
- public static int secondary_text_default_material_dark = 2131296305;
-
- // aapt resource value: 0x7f090032
- public static int secondary_text_default_material_light = 2131296306;
-
- // aapt resource value: 0x7f090033
- public static int secondary_text_disabled_material_dark = 2131296307;
-
- // aapt resource value: 0x7f090034
- public static int secondary_text_disabled_material_light = 2131296308;
-
- // aapt resource value: 0x7f090035
- public static int switch_thumb_disabled_material_dark = 2131296309;
-
- // aapt resource value: 0x7f090036
- public static int switch_thumb_disabled_material_light = 2131296310;
-
- // aapt resource value: 0x7f090052
- public static int switch_thumb_material_dark = 2131296338;
-
- // aapt resource value: 0x7f090053
- public static int switch_thumb_material_light = 2131296339;
-
- // aapt resource value: 0x7f090037
- public static int switch_thumb_normal_material_dark = 2131296311;
-
- // aapt resource value: 0x7f090038
- public static int switch_thumb_normal_material_light = 2131296312;
-
- // aapt resource value: 0x7f090039
- public static int tooltip_background_dark = 2131296313;
-
- // aapt resource value: 0x7f09003a
- public static int tooltip_background_light = 2131296314;
-
- static Color()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Color()
- {
- }
- }
-
- public partial class Dimension
- {
-
- // aapt resource value: 0x7f06000c
- public static int abc_action_bar_content_inset_material = 2131099660;
-
- // aapt resource value: 0x7f06000d
- public static int abc_action_bar_content_inset_with_nav = 2131099661;
-
- // aapt resource value: 0x7f060001
- public static int abc_action_bar_default_height_material = 2131099649;
-
- // aapt resource value: 0x7f06000e
- public static int abc_action_bar_default_padding_end_material = 2131099662;
-
- // aapt resource value: 0x7f06000f
- public static int abc_action_bar_default_padding_start_material = 2131099663;
-
- // aapt resource value: 0x7f060011
- public static int abc_action_bar_elevation_material = 2131099665;
-
- // aapt resource value: 0x7f060012
- public static int abc_action_bar_icon_vertical_padding_material = 2131099666;
-
- // aapt resource value: 0x7f060013
- public static int abc_action_bar_overflow_padding_end_material = 2131099667;
-
- // aapt resource value: 0x7f060014
- public static int abc_action_bar_overflow_padding_start_material = 2131099668;
-
- // aapt resource value: 0x7f060002
- public static int abc_action_bar_progress_bar_size = 2131099650;
-
- // aapt resource value: 0x7f060015
- public static int abc_action_bar_stacked_max_height = 2131099669;
-
- // aapt resource value: 0x7f060016
- public static int abc_action_bar_stacked_tab_max_width = 2131099670;
-
- // aapt resource value: 0x7f060017
- public static int abc_action_bar_subtitle_bottom_margin_material = 2131099671;
-
- // aapt resource value: 0x7f060018
- public static int abc_action_bar_subtitle_top_margin_material = 2131099672;
-
- // aapt resource value: 0x7f060019
- public static int abc_action_button_min_height_material = 2131099673;
-
- // aapt resource value: 0x7f06001a
- public static int abc_action_button_min_width_material = 2131099674;
-
- // aapt resource value: 0x7f06001b
- public static int abc_action_button_min_width_overflow_material = 2131099675;
-
- // aapt resource value: 0x7f060000
- public static int abc_alert_dialog_button_bar_height = 2131099648;
-
- // aapt resource value: 0x7f06001c
- public static int abc_button_inset_horizontal_material = 2131099676;
-
- // aapt resource value: 0x7f06001d
- public static int abc_button_inset_vertical_material = 2131099677;
-
- // aapt resource value: 0x7f06001e
- public static int abc_button_padding_horizontal_material = 2131099678;
-
- // aapt resource value: 0x7f06001f
- public static int abc_button_padding_vertical_material = 2131099679;
-
- // aapt resource value: 0x7f060020
- public static int abc_cascading_menus_min_smallest_width = 2131099680;
-
- // aapt resource value: 0x7f060005
- public static int abc_config_prefDialogWidth = 2131099653;
-
- // aapt resource value: 0x7f060021
- public static int abc_control_corner_material = 2131099681;
-
- // aapt resource value: 0x7f060022
- public static int abc_control_inset_material = 2131099682;
-
- // aapt resource value: 0x7f060023
- public static int abc_control_padding_material = 2131099683;
-
- // aapt resource value: 0x7f060006
- public static int abc_dialog_fixed_height_major = 2131099654;
-
- // aapt resource value: 0x7f060007
- public static int abc_dialog_fixed_height_minor = 2131099655;
-
- // aapt resource value: 0x7f060008
- public static int abc_dialog_fixed_width_major = 2131099656;
-
- // aapt resource value: 0x7f060009
- public static int abc_dialog_fixed_width_minor = 2131099657;
-
- // aapt resource value: 0x7f060024
- public static int abc_dialog_list_padding_bottom_no_buttons = 2131099684;
-
- // aapt resource value: 0x7f060025
- public static int abc_dialog_list_padding_top_no_title = 2131099685;
-
- // aapt resource value: 0x7f06000a
- public static int abc_dialog_min_width_major = 2131099658;
-
- // aapt resource value: 0x7f06000b
- public static int abc_dialog_min_width_minor = 2131099659;
-
- // aapt resource value: 0x7f060026
- public static int abc_dialog_padding_material = 2131099686;
-
- // aapt resource value: 0x7f060027
- public static int abc_dialog_padding_top_material = 2131099687;
-
- // aapt resource value: 0x7f060028
- public static int abc_dialog_title_divider_material = 2131099688;
-
- // aapt resource value: 0x7f060029
- public static int abc_disabled_alpha_material_dark = 2131099689;
-
- // aapt resource value: 0x7f06002a
- public static int abc_disabled_alpha_material_light = 2131099690;
-
- // aapt resource value: 0x7f06002b
- public static int abc_dropdownitem_icon_width = 2131099691;
-
- // aapt resource value: 0x7f06002c
- public static int abc_dropdownitem_text_padding_left = 2131099692;
-
- // aapt resource value: 0x7f06002d
- public static int abc_dropdownitem_text_padding_right = 2131099693;
-
- // aapt resource value: 0x7f06002e
- public static int abc_edit_text_inset_bottom_material = 2131099694;
-
- // aapt resource value: 0x7f06002f
- public static int abc_edit_text_inset_horizontal_material = 2131099695;
-
- // aapt resource value: 0x7f060030
- public static int abc_edit_text_inset_top_material = 2131099696;
-
- // aapt resource value: 0x7f060031
- public static int abc_floating_window_z = 2131099697;
-
- // aapt resource value: 0x7f060032
- public static int abc_list_item_padding_horizontal_material = 2131099698;
-
- // aapt resource value: 0x7f060033
- public static int abc_panel_menu_list_width = 2131099699;
-
- // aapt resource value: 0x7f060034
- public static int abc_progress_bar_height_material = 2131099700;
-
- // aapt resource value: 0x7f060035
- public static int abc_search_view_preferred_height = 2131099701;
-
- // aapt resource value: 0x7f060036
- public static int abc_search_view_preferred_width = 2131099702;
-
- // aapt resource value: 0x7f060037
- public static int abc_seekbar_track_background_height_material = 2131099703;
-
- // aapt resource value: 0x7f060038
- public static int abc_seekbar_track_progress_height_material = 2131099704;
-
- // aapt resource value: 0x7f060039
- public static int abc_select_dialog_padding_start_material = 2131099705;
-
- // aapt resource value: 0x7f060010
- public static int abc_switch_padding = 2131099664;
-
- // aapt resource value: 0x7f06003a
- public static int abc_text_size_body_1_material = 2131099706;
-
- // aapt resource value: 0x7f06003b
- public static int abc_text_size_body_2_material = 2131099707;
-
- // aapt resource value: 0x7f06003c
- public static int abc_text_size_button_material = 2131099708;
-
- // aapt resource value: 0x7f06003d
- public static int abc_text_size_caption_material = 2131099709;
-
- // aapt resource value: 0x7f06003e
- public static int abc_text_size_display_1_material = 2131099710;
-
- // aapt resource value: 0x7f06003f
- public static int abc_text_size_display_2_material = 2131099711;
-
- // aapt resource value: 0x7f060040
- public static int abc_text_size_display_3_material = 2131099712;
-
- // aapt resource value: 0x7f060041
- public static int abc_text_size_display_4_material = 2131099713;
-
- // aapt resource value: 0x7f060042
- public static int abc_text_size_headline_material = 2131099714;
-
- // aapt resource value: 0x7f060043
- public static int abc_text_size_large_material = 2131099715;
-
- // aapt resource value: 0x7f060044
- public static int abc_text_size_medium_material = 2131099716;
-
- // aapt resource value: 0x7f060045
- public static int abc_text_size_menu_header_material = 2131099717;
-
- // aapt resource value: 0x7f060046
- public static int abc_text_size_menu_material = 2131099718;
-
- // aapt resource value: 0x7f060047
- public static int abc_text_size_small_material = 2131099719;
-
- // aapt resource value: 0x7f060048
- public static int abc_text_size_subhead_material = 2131099720;
-
- // aapt resource value: 0x7f060003
- public static int abc_text_size_subtitle_material_toolbar = 2131099651;
-
- // aapt resource value: 0x7f060049
- public static int abc_text_size_title_material = 2131099721;
-
- // aapt resource value: 0x7f060004
- public static int abc_text_size_title_material_toolbar = 2131099652;
-
- // aapt resource value: 0x7f06005f
- public static int compat_button_inset_horizontal_material = 2131099743;
-
- // aapt resource value: 0x7f060060
- public static int compat_button_inset_vertical_material = 2131099744;
-
- // aapt resource value: 0x7f060061
- public static int compat_button_padding_horizontal_material = 2131099745;
-
- // aapt resource value: 0x7f060062
- public static int compat_button_padding_vertical_material = 2131099746;
-
- // aapt resource value: 0x7f060063
- public static int compat_control_corner_material = 2131099747;
-
- // aapt resource value: 0x7f06004a
- public static int disabled_alpha_material_dark = 2131099722;
-
- // aapt resource value: 0x7f06004b
- public static int disabled_alpha_material_light = 2131099723;
-
- // aapt resource value: 0x7f06004c
- public static int highlight_alpha_material_colored = 2131099724;
-
- // aapt resource value: 0x7f06004d
- public static int highlight_alpha_material_dark = 2131099725;
-
- // aapt resource value: 0x7f06004e
- public static int highlight_alpha_material_light = 2131099726;
-
- // aapt resource value: 0x7f06004f
- public static int hint_alpha_material_dark = 2131099727;
-
- // aapt resource value: 0x7f060050
- public static int hint_alpha_material_light = 2131099728;
-
- // aapt resource value: 0x7f060051
- public static int hint_pressed_alpha_material_dark = 2131099729;
-
- // aapt resource value: 0x7f060052
- public static int hint_pressed_alpha_material_light = 2131099730;
-
- // aapt resource value: 0x7f060064
- public static int notification_action_icon_size = 2131099748;
-
- // aapt resource value: 0x7f060065
- public static int notification_action_text_size = 2131099749;
-
- // aapt resource value: 0x7f060066
- public static int notification_big_circle_margin = 2131099750;
-
- // aapt resource value: 0x7f06005c
- public static int notification_content_margin_start = 2131099740;
-
- // aapt resource value: 0x7f060067
- public static int notification_large_icon_height = 2131099751;
-
- // aapt resource value: 0x7f060068
- public static int notification_large_icon_width = 2131099752;
-
- // aapt resource value: 0x7f06005d
- public static int notification_main_column_padding_top = 2131099741;
-
- // aapt resource value: 0x7f06005e
- public static int notification_media_narrow_margin = 2131099742;
-
- // aapt resource value: 0x7f060069
- public static int notification_right_icon_size = 2131099753;
-
- // aapt resource value: 0x7f06005b
- public static int notification_right_side_padding_top = 2131099739;
-
- // aapt resource value: 0x7f06006a
- public static int notification_small_icon_background_padding = 2131099754;
-
- // aapt resource value: 0x7f06006b
- public static int notification_small_icon_size_as_large = 2131099755;
-
- // aapt resource value: 0x7f06006c
- public static int notification_subtext_size = 2131099756;
-
- // aapt resource value: 0x7f06006d
- public static int notification_top_pad = 2131099757;
-
- // aapt resource value: 0x7f06006e
- public static int notification_top_pad_large_text = 2131099758;
-
- // aapt resource value: 0x7f060053
- public static int tooltip_corner_radius = 2131099731;
-
- // aapt resource value: 0x7f060054
- public static int tooltip_horizontal_padding = 2131099732;
-
- // aapt resource value: 0x7f060055
- public static int tooltip_margin = 2131099733;
-
- // aapt resource value: 0x7f060056
- public static int tooltip_precise_anchor_extra_offset = 2131099734;
-
- // aapt resource value: 0x7f060057
- public static int tooltip_precise_anchor_threshold = 2131099735;
-
- // aapt resource value: 0x7f060058
- public static int tooltip_vertical_padding = 2131099736;
-
- // aapt resource value: 0x7f060059
- public static int tooltip_y_offset_non_touch = 2131099737;
-
- // aapt resource value: 0x7f06005a
- public static int tooltip_y_offset_touch = 2131099738;
-
- static Dimension()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Dimension()
- {
- }
- }
-
- public partial class Drawable
- {
-
- // aapt resource value: 0x7f020000
- public static int abc_ab_share_pack_mtrl_alpha = 2130837504;
-
- // aapt resource value: 0x7f020001
- public static int abc_action_bar_item_background_material = 2130837505;
-
- // aapt resource value: 0x7f020002
- public static int abc_btn_borderless_material = 2130837506;
-
- // aapt resource value: 0x7f020003
- public static int abc_btn_check_material = 2130837507;
-
- // aapt resource value: 0x7f020004
- public static int abc_btn_check_to_on_mtrl_000 = 2130837508;
-
- // aapt resource value: 0x7f020005
- public static int abc_btn_check_to_on_mtrl_015 = 2130837509;
-
- // aapt resource value: 0x7f020006
- public static int abc_btn_colored_material = 2130837510;
-
- // aapt resource value: 0x7f020007
- public static int abc_btn_default_mtrl_shape = 2130837511;
-
- // aapt resource value: 0x7f020008
- public static int abc_btn_radio_material = 2130837512;
-
- // aapt resource value: 0x7f020009
- public static int abc_btn_radio_to_on_mtrl_000 = 2130837513;
-
- // aapt resource value: 0x7f02000a
- public static int abc_btn_radio_to_on_mtrl_015 = 2130837514;
-
- // aapt resource value: 0x7f02000b
- public static int abc_btn_switch_to_on_mtrl_00001 = 2130837515;
-
- // aapt resource value: 0x7f02000c
- public static int abc_btn_switch_to_on_mtrl_00012 = 2130837516;
-
- // aapt resource value: 0x7f02000d
- public static int abc_cab_background_internal_bg = 2130837517;
-
- // aapt resource value: 0x7f02000e
- public static int abc_cab_background_top_material = 2130837518;
-
- // aapt resource value: 0x7f02000f
- public static int abc_cab_background_top_mtrl_alpha = 2130837519;
-
- // aapt resource value: 0x7f020010
- public static int abc_control_background_material = 2130837520;
-
- // aapt resource value: 0x7f020011
- public static int abc_dialog_material_background = 2130837521;
-
- // aapt resource value: 0x7f020012
- public static int abc_edit_text_material = 2130837522;
-
- // aapt resource value: 0x7f020013
- public static int abc_ic_ab_back_material = 2130837523;
-
- // aapt resource value: 0x7f020014
- public static int abc_ic_arrow_drop_right_black_24dp = 2130837524;
-
- // aapt resource value: 0x7f020015
- public static int abc_ic_clear_material = 2130837525;
-
- // aapt resource value: 0x7f020016
- public static int abc_ic_commit_search_api_mtrl_alpha = 2130837526;
-
- // aapt resource value: 0x7f020017
- public static int abc_ic_go_search_api_material = 2130837527;
-
- // aapt resource value: 0x7f020018
- public static int abc_ic_menu_copy_mtrl_am_alpha = 2130837528;
-
- // aapt resource value: 0x7f020019
- public static int abc_ic_menu_cut_mtrl_alpha = 2130837529;
-
- // aapt resource value: 0x7f02001a
- public static int abc_ic_menu_overflow_material = 2130837530;
-
- // aapt resource value: 0x7f02001b
- public static int abc_ic_menu_paste_mtrl_am_alpha = 2130837531;
-
- // aapt resource value: 0x7f02001c
- public static int abc_ic_menu_selectall_mtrl_alpha = 2130837532;
-
- // aapt resource value: 0x7f02001d
- public static int abc_ic_menu_share_mtrl_alpha = 2130837533;
-
- // aapt resource value: 0x7f02001e
- public static int abc_ic_search_api_material = 2130837534;
-
- // aapt resource value: 0x7f02001f
- public static int abc_ic_star_black_16dp = 2130837535;
-
- // aapt resource value: 0x7f020020
- public static int abc_ic_star_black_36dp = 2130837536;
-
- // aapt resource value: 0x7f020021
- public static int abc_ic_star_black_48dp = 2130837537;
-
- // aapt resource value: 0x7f020022
- public static int abc_ic_star_half_black_16dp = 2130837538;
-
- // aapt resource value: 0x7f020023
- public static int abc_ic_star_half_black_36dp = 2130837539;
-
- // aapt resource value: 0x7f020024
- public static int abc_ic_star_half_black_48dp = 2130837540;
-
- // aapt resource value: 0x7f020025
- public static int abc_ic_voice_search_api_material = 2130837541;
-
- // aapt resource value: 0x7f020026
- public static int abc_item_background_holo_dark = 2130837542;
-
- // aapt resource value: 0x7f020027
- public static int abc_item_background_holo_light = 2130837543;
-
- // aapt resource value: 0x7f020028
- public static int abc_list_divider_mtrl_alpha = 2130837544;
-
- // aapt resource value: 0x7f020029
- public static int abc_list_focused_holo = 2130837545;
-
- // aapt resource value: 0x7f02002a
- public static int abc_list_longpressed_holo = 2130837546;
-
- // aapt resource value: 0x7f02002b
- public static int abc_list_pressed_holo_dark = 2130837547;
-
- // aapt resource value: 0x7f02002c
- public static int abc_list_pressed_holo_light = 2130837548;
-
- // aapt resource value: 0x7f02002d
- public static int abc_list_selector_background_transition_holo_dark = 2130837549;
-
- // aapt resource value: 0x7f02002e
- public static int abc_list_selector_background_transition_holo_light = 2130837550;
-
- // aapt resource value: 0x7f02002f
- public static int abc_list_selector_disabled_holo_dark = 2130837551;
-
- // aapt resource value: 0x7f020030
- public static int abc_list_selector_disabled_holo_light = 2130837552;
-
- // aapt resource value: 0x7f020031
- public static int abc_list_selector_holo_dark = 2130837553;
-
- // aapt resource value: 0x7f020032
- public static int abc_list_selector_holo_light = 2130837554;
-
- // aapt resource value: 0x7f020033
- public static int abc_menu_hardkey_panel_mtrl_mult = 2130837555;
-
- // aapt resource value: 0x7f020034
- public static int abc_popup_background_mtrl_mult = 2130837556;
-
- // aapt resource value: 0x7f020035
- public static int abc_ratingbar_indicator_material = 2130837557;
-
- // aapt resource value: 0x7f020036
- public static int abc_ratingbar_material = 2130837558;
-
- // aapt resource value: 0x7f020037
- public static int abc_ratingbar_small_material = 2130837559;
-
- // aapt resource value: 0x7f020038
- public static int abc_scrubber_control_off_mtrl_alpha = 2130837560;
-
- // aapt resource value: 0x7f020039
- public static int abc_scrubber_control_to_pressed_mtrl_000 = 2130837561;
-
- // aapt resource value: 0x7f02003a
- public static int abc_scrubber_control_to_pressed_mtrl_005 = 2130837562;
-
- // aapt resource value: 0x7f02003b
- public static int abc_scrubber_primary_mtrl_alpha = 2130837563;
-
- // aapt resource value: 0x7f02003c
- public static int abc_scrubber_track_mtrl_alpha = 2130837564;
-
- // aapt resource value: 0x7f02003d
- public static int abc_seekbar_thumb_material = 2130837565;
-
- // aapt resource value: 0x7f02003e
- public static int abc_seekbar_tick_mark_material = 2130837566;
-
- // aapt resource value: 0x7f02003f
- public static int abc_seekbar_track_material = 2130837567;
-
- // aapt resource value: 0x7f020040
- public static int abc_spinner_mtrl_am_alpha = 2130837568;
-
- // aapt resource value: 0x7f020041
- public static int abc_spinner_textfield_background_material = 2130837569;
-
- // aapt resource value: 0x7f020042
- public static int abc_switch_thumb_material = 2130837570;
-
- // aapt resource value: 0x7f020043
- public static int abc_switch_track_mtrl_alpha = 2130837571;
-
- // aapt resource value: 0x7f020044
- public static int abc_tab_indicator_material = 2130837572;
-
- // aapt resource value: 0x7f020045
- public static int abc_tab_indicator_mtrl_alpha = 2130837573;
-
- // aapt resource value: 0x7f020046
- public static int abc_text_cursor_material = 2130837574;
-
- // aapt resource value: 0x7f020047
- public static int abc_text_select_handle_left_mtrl_dark = 2130837575;
-
- // aapt resource value: 0x7f020048
- public static int abc_text_select_handle_left_mtrl_light = 2130837576;
-
- // aapt resource value: 0x7f020049
- public static int abc_text_select_handle_middle_mtrl_dark = 2130837577;
-
- // aapt resource value: 0x7f02004a
- public static int abc_text_select_handle_middle_mtrl_light = 2130837578;
-
- // aapt resource value: 0x7f02004b
- public static int abc_text_select_handle_right_mtrl_dark = 2130837579;
-
- // aapt resource value: 0x7f02004c
- public static int abc_text_select_handle_right_mtrl_light = 2130837580;
-
- // aapt resource value: 0x7f02004d
- public static int abc_textfield_activated_mtrl_alpha = 2130837581;
-
- // aapt resource value: 0x7f02004e
- public static int abc_textfield_default_mtrl_alpha = 2130837582;
-
- // aapt resource value: 0x7f02004f
- public static int abc_textfield_search_activated_mtrl_alpha = 2130837583;
-
- // aapt resource value: 0x7f020050
- public static int abc_textfield_search_default_mtrl_alpha = 2130837584;
-
- // aapt resource value: 0x7f020051
- public static int abc_textfield_search_material = 2130837585;
-
- // aapt resource value: 0x7f020052
- public static int abc_vector_test = 2130837586;
-
- // aapt resource value: 0x7f020053
- public static int notification_action_background = 2130837587;
-
- // aapt resource value: 0x7f020054
- public static int notification_bg = 2130837588;
-
- // aapt resource value: 0x7f020055
- public static int notification_bg_low = 2130837589;
-
- // aapt resource value: 0x7f020056
- public static int notification_bg_low_normal = 2130837590;
-
- // aapt resource value: 0x7f020057
- public static int notification_bg_low_pressed = 2130837591;
-
- // aapt resource value: 0x7f020058
- public static int notification_bg_normal = 2130837592;
-
- // aapt resource value: 0x7f020059
- public static int notification_bg_normal_pressed = 2130837593;
-
- // aapt resource value: 0x7f02005a
- public static int notification_icon_background = 2130837594;
-
- // aapt resource value: 0x7f02005f
- public static int notification_template_icon_bg = 2130837599;
-
- // aapt resource value: 0x7f020060
- public static int notification_template_icon_low_bg = 2130837600;
-
- // aapt resource value: 0x7f02005b
- public static int notification_tile_bg = 2130837595;
-
- // aapt resource value: 0x7f02005c
- public static int notify_panel_notification_icon_bg = 2130837596;
-
- // aapt resource value: 0x7f02005d
- public static int tooltip_frame_dark = 2130837597;
-
- // aapt resource value: 0x7f02005e
- public static int tooltip_frame_light = 2130837598;
-
- static Drawable()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Drawable()
- {
- }
- }
-
- public partial class Id
- {
-
- // aapt resource value: 0x7f0a0024
- public static int ALT = 2131361828;
-
- // aapt resource value: 0x7f0a0025
- public static int CTRL = 2131361829;
-
- // aapt resource value: 0x7f0a0026
- public static int FUNCTION = 2131361830;
-
- // aapt resource value: 0x7f0a0027
- public static int META = 2131361831;
-
- // aapt resource value: 0x7f0a0028
- public static int SHIFT = 2131361832;
-
- // aapt resource value: 0x7f0a0029
- public static int SYM = 2131361833;
-
- // aapt resource value: 0x7f0a0069
- public static int action0 = 2131361897;
-
- // aapt resource value: 0x7f0a0057
- public static int action_bar = 2131361879;
-
- // aapt resource value: 0x7f0a0000
- public static int action_bar_activity_content = 2131361792;
-
- // aapt resource value: 0x7f0a0056
- public static int action_bar_container = 2131361878;
-
- // aapt resource value: 0x7f0a0052
- public static int action_bar_root = 2131361874;
-
- // aapt resource value: 0x7f0a0001
- public static int action_bar_spinner = 2131361793;
-
- // aapt resource value: 0x7f0a0036
- public static int action_bar_subtitle = 2131361846;
-
- // aapt resource value: 0x7f0a0035
- public static int action_bar_title = 2131361845;
-
- // aapt resource value: 0x7f0a0066
- public static int action_container = 2131361894;
-
- // aapt resource value: 0x7f0a0058
- public static int action_context_bar = 2131361880;
-
- // aapt resource value: 0x7f0a006d
- public static int action_divider = 2131361901;
-
- // aapt resource value: 0x7f0a0067
- public static int action_image = 2131361895;
-
- // aapt resource value: 0x7f0a0002
- public static int action_menu_divider = 2131361794;
-
- // aapt resource value: 0x7f0a0003
- public static int action_menu_presenter = 2131361795;
-
- // aapt resource value: 0x7f0a0054
- public static int action_mode_bar = 2131361876;
-
- // aapt resource value: 0x7f0a0053
- public static int action_mode_bar_stub = 2131361875;
-
- // aapt resource value: 0x7f0a0037
- public static int action_mode_close_button = 2131361847;
-
- // aapt resource value: 0x7f0a0068
- public static int action_text = 2131361896;
-
- // aapt resource value: 0x7f0a0076
- public static int actions = 2131361910;
-
- // aapt resource value: 0x7f0a0038
- public static int activity_chooser_view_content = 2131361848;
-
- // aapt resource value: 0x7f0a0019
- public static int add = 2131361817;
-
- // aapt resource value: 0x7f0a004b
- public static int alertTitle = 2131361867;
-
- // aapt resource value: 0x7f0a002a
- public static int always = 2131361834;
-
- // aapt resource value: 0x7f0a0031
- public static int async = 2131361841;
-
- // aapt resource value: 0x7f0a0021
- public static int beginning = 2131361825;
-
- // aapt resource value: 0x7f0a0032
- public static int blocking = 2131361842;
-
- // aapt resource value: 0x7f0a002f
- public static int bottom = 2131361839;
-
- // aapt resource value: 0x7f0a003e
- public static int buttonPanel = 2131361854;
-
- // aapt resource value: 0x7f0a006a
- public static int cancel_action = 2131361898;
-
- // aapt resource value: 0x7f0a004e
- public static int checkbox = 2131361870;
-
- // aapt resource value: 0x7f0a0072
- public static int chronometer = 2131361906;
-
- // aapt resource value: 0x7f0a002b
- public static int collapseActionView = 2131361835;
-
- // aapt resource value: 0x7f0a0041
- public static int contentPanel = 2131361857;
-
- // aapt resource value: 0x7f0a0048
- public static int custom = 2131361864;
-
- // aapt resource value: 0x7f0a0047
- public static int customPanel = 2131361863;
-
- // aapt resource value: 0x7f0a0055
- public static int decor_content_parent = 2131361877;
-
- // aapt resource value: 0x7f0a003b
- public static int default_activity_button = 2131361851;
-
- // aapt resource value: 0x7f0a0012
- public static int disableHome = 2131361810;
-
- // aapt resource value: 0x7f0a0059
- public static int edit_query = 2131361881;
-
- // aapt resource value: 0x7f0a0022
- public static int end = 2131361826;
-
- // aapt resource value: 0x7f0a0078
- public static int end_padder = 2131361912;
-
- // aapt resource value: 0x7f0a0039
- public static int expand_activities_button = 2131361849;
-
- // aapt resource value: 0x7f0a004d
- public static int expanded_menu = 2131361869;
-
- // aapt resource value: 0x7f0a0033
- public static int forever = 2131361843;
-
- // aapt resource value: 0x7f0a0004
- public static int home = 2131361796;
-
- // aapt resource value: 0x7f0a0013
- public static int homeAsUp = 2131361811;
-
- // aapt resource value: 0x7f0a003d
- public static int icon = 2131361853;
-
- // aapt resource value: 0x7f0a0077
- public static int icon_group = 2131361911;
-
- // aapt resource value: 0x7f0a002c
- public static int ifRoom = 2131361836;
-
- // aapt resource value: 0x7f0a003a
- public static int image = 2131361850;
-
- // aapt resource value: 0x7f0a0073
- public static int info = 2131361907;
-
- // aapt resource value: 0x7f0a0034
- public static int italic = 2131361844;
-
- // aapt resource value: 0x7f0a0009
- public static int line1 = 2131361801;
-
- // aapt resource value: 0x7f0a000a
- public static int line3 = 2131361802;
-
- // aapt resource value: 0x7f0a000f
- public static int listMode = 2131361807;
-
- // aapt resource value: 0x7f0a003c
- public static int list_item = 2131361852;
-
- // aapt resource value: 0x7f0a006c
- public static int media_actions = 2131361900;
-
- // aapt resource value: 0x7f0a0079
- public static int message = 2131361913;
-
- // aapt resource value: 0x7f0a0023
- public static int middle = 2131361827;
-
- // aapt resource value: 0x7f0a001a
- public static int multiply = 2131361818;
-
- // aapt resource value: 0x7f0a002d
- public static int never = 2131361837;
-
- // aapt resource value: 0x7f0a0014
- public static int none = 2131361812;
-
- // aapt resource value: 0x7f0a0010
- public static int normal = 2131361808;
-
- // aapt resource value: 0x7f0a0075
- public static int notification_background = 2131361909;
-
- // aapt resource value: 0x7f0a006f
- public static int notification_main_column = 2131361903;
-
- // aapt resource value: 0x7f0a006e
- public static int notification_main_column_container = 2131361902;
-
- // aapt resource value: 0x7f0a0040
- public static int parentPanel = 2131361856;
-
- // aapt resource value: 0x7f0a0005
- public static int progress_circular = 2131361797;
-
- // aapt resource value: 0x7f0a0006
- public static int progress_horizontal = 2131361798;
-
- // aapt resource value: 0x7f0a0050
- public static int radio = 2131361872;
-
- // aapt resource value: 0x7f0a0074
- public static int right_icon = 2131361908;
-
- // aapt resource value: 0x7f0a0070
- public static int right_side = 2131361904;
-
- // aapt resource value: 0x7f0a001b
- public static int screen = 2131361819;
-
- // aapt resource value: 0x7f0a0046
- public static int scrollIndicatorDown = 2131361862;
-
- // aapt resource value: 0x7f0a0042
- public static int scrollIndicatorUp = 2131361858;
-
- // aapt resource value: 0x7f0a0043
- public static int scrollView = 2131361859;
-
- // aapt resource value: 0x7f0a005b
- public static int search_badge = 2131361883;
-
- // aapt resource value: 0x7f0a005a
- public static int search_bar = 2131361882;
-
- // aapt resource value: 0x7f0a005c
- public static int search_button = 2131361884;
-
- // aapt resource value: 0x7f0a0061
- public static int search_close_btn = 2131361889;
-
- // aapt resource value: 0x7f0a005d
- public static int search_edit_frame = 2131361885;
-
- // aapt resource value: 0x7f0a0063
- public static int search_go_btn = 2131361891;
-
- // aapt resource value: 0x7f0a005e
- public static int search_mag_icon = 2131361886;
-
- // aapt resource value: 0x7f0a005f
- public static int search_plate = 2131361887;
-
- // aapt resource value: 0x7f0a0060
- public static int search_src_text = 2131361888;
-
- // aapt resource value: 0x7f0a0064
- public static int search_voice_btn = 2131361892;
-
- // aapt resource value: 0x7f0a0065
- public static int select_dialog_listview = 2131361893;
-
- // aapt resource value: 0x7f0a004f
- public static int shortcut = 2131361871;
-
- // aapt resource value: 0x7f0a0015
- public static int showCustom = 2131361813;
-
- // aapt resource value: 0x7f0a0016
- public static int showHome = 2131361814;
-
- // aapt resource value: 0x7f0a0017
- public static int showTitle = 2131361815;
-
- // aapt resource value: 0x7f0a003f
- public static int spacer = 2131361855;
-
- // aapt resource value: 0x7f0a0007
- public static int split_action_bar = 2131361799;
-
- // aapt resource value: 0x7f0a001c
- public static int src_atop = 2131361820;
-
- // aapt resource value: 0x7f0a001d
- public static int src_in = 2131361821;
-
- // aapt resource value: 0x7f0a001e
- public static int src_over = 2131361822;
-
- // aapt resource value: 0x7f0a006b
- public static int status_bar_latest_event_content = 2131361899;
-
- // aapt resource value: 0x7f0a0051
- public static int submenuarrow = 2131361873;
-
- // aapt resource value: 0x7f0a0062
- public static int submit_area = 2131361890;
-
- // aapt resource value: 0x7f0a0011
- public static int tabMode = 2131361809;
-
- // aapt resource value: 0x7f0a000b
- public static int tag_transition_group = 2131361803;
-
- // aapt resource value: 0x7f0a000c
- public static int text = 2131361804;
-
- // aapt resource value: 0x7f0a000d
- public static int text2 = 2131361805;
-
- // aapt resource value: 0x7f0a0045
- public static int textSpacerNoButtons = 2131361861;
-
- // aapt resource value: 0x7f0a0044
- public static int textSpacerNoTitle = 2131361860;
-
- // aapt resource value: 0x7f0a0071
- public static int time = 2131361905;
-
- // aapt resource value: 0x7f0a000e
- public static int title = 2131361806;
-
- // aapt resource value: 0x7f0a004c
- public static int titleDividerNoCustom = 2131361868;
-
- // aapt resource value: 0x7f0a004a
- public static int title_template = 2131361866;
-
- // aapt resource value: 0x7f0a0030
- public static int top = 2131361840;
-
- // aapt resource value: 0x7f0a0049
- public static int topPanel = 2131361865;
-
- // aapt resource value: 0x7f0a001f
- public static int uniform = 2131361823;
-
- // aapt resource value: 0x7f0a0008
- public static int up = 2131361800;
-
- // aapt resource value: 0x7f0a0018
- public static int useLogo = 2131361816;
-
- // aapt resource value: 0x7f0a002e
- public static int withText = 2131361838;
-
- // aapt resource value: 0x7f0a0020
- public static int wrap_content = 2131361824;
-
- static Id()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Id()
- {
- }
- }
-
- public partial class Integer
- {
-
- // aapt resource value: 0x7f0b0000
- public static int abc_config_activityDefaultDur = 2131427328;
-
- // aapt resource value: 0x7f0b0001
- public static int abc_config_activityShortDur = 2131427329;
-
- // aapt resource value: 0x7f0b0002
- public static int cancel_button_image_alpha = 2131427330;
-
- // aapt resource value: 0x7f0b0003
- public static int config_tooltipAnimTime = 2131427331;
-
- // aapt resource value: 0x7f0b0004
- public static int status_bar_notification_info_maxnum = 2131427332;
-
- static Integer()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Integer()
- {
- }
- }
-
- public partial class Layout
- {
-
- // aapt resource value: 0x7f030000
- public static int abc_action_bar_title_item = 2130903040;
-
- // aapt resource value: 0x7f030001
- public static int abc_action_bar_up_container = 2130903041;
-
- // aapt resource value: 0x7f030002
- public static int abc_action_menu_item_layout = 2130903042;
-
- // aapt resource value: 0x7f030003
- public static int abc_action_menu_layout = 2130903043;
-
- // aapt resource value: 0x7f030004
- public static int abc_action_mode_bar = 2130903044;
-
- // aapt resource value: 0x7f030005
- public static int abc_action_mode_close_item_material = 2130903045;
-
- // aapt resource value: 0x7f030006
- public static int abc_activity_chooser_view = 2130903046;
-
- // aapt resource value: 0x7f030007
- public static int abc_activity_chooser_view_list_item = 2130903047;
-
- // aapt resource value: 0x7f030008
- public static int abc_alert_dialog_button_bar_material = 2130903048;
-
- // aapt resource value: 0x7f030009
- public static int abc_alert_dialog_material = 2130903049;
-
- // aapt resource value: 0x7f03000a
- public static int abc_alert_dialog_title_material = 2130903050;
-
- // aapt resource value: 0x7f03000b
- public static int abc_dialog_title_material = 2130903051;
-
- // aapt resource value: 0x7f03000c
- public static int abc_expanded_menu_layout = 2130903052;
-
- // aapt resource value: 0x7f03000d
- public static int abc_list_menu_item_checkbox = 2130903053;
-
- // aapt resource value: 0x7f03000e
- public static int abc_list_menu_item_icon = 2130903054;
-
- // aapt resource value: 0x7f03000f
- public static int abc_list_menu_item_layout = 2130903055;
-
- // aapt resource value: 0x7f030010
- public static int abc_list_menu_item_radio = 2130903056;
-
- // aapt resource value: 0x7f030011
- public static int abc_popup_menu_header_item_layout = 2130903057;
-
- // aapt resource value: 0x7f030012
- public static int abc_popup_menu_item_layout = 2130903058;
-
- // aapt resource value: 0x7f030013
- public static int abc_screen_content_include = 2130903059;
-
- // aapt resource value: 0x7f030014
- public static int abc_screen_simple = 2130903060;
-
- // aapt resource value: 0x7f030015
- public static int abc_screen_simple_overlay_action_mode = 2130903061;
-
- // aapt resource value: 0x7f030016
- public static int abc_screen_toolbar = 2130903062;
-
- // aapt resource value: 0x7f030017
- public static int abc_search_dropdown_item_icons_2line = 2130903063;
-
- // aapt resource value: 0x7f030018
- public static int abc_search_view = 2130903064;
-
- // aapt resource value: 0x7f030019
- public static int abc_select_dialog_material = 2130903065;
-
- // aapt resource value: 0x7f03001a
- public static int notification_action = 2130903066;
-
- // aapt resource value: 0x7f03001b
- public static int notification_action_tombstone = 2130903067;
-
- // aapt resource value: 0x7f03001c
- public static int notification_media_action = 2130903068;
-
- // aapt resource value: 0x7f03001d
- public static int notification_media_cancel_action = 2130903069;
-
- // aapt resource value: 0x7f03001e
- public static int notification_template_big_media = 2130903070;
-
- // aapt resource value: 0x7f03001f
- public static int notification_template_big_media_custom = 2130903071;
-
- // aapt resource value: 0x7f030020
- public static int notification_template_big_media_narrow = 2130903072;
-
- // aapt resource value: 0x7f030021
- public static int notification_template_big_media_narrow_custom = 2130903073;
-
- // aapt resource value: 0x7f030022
- public static int notification_template_custom_big = 2130903074;
-
- // aapt resource value: 0x7f030023
- public static int notification_template_icon_group = 2130903075;
-
- // aapt resource value: 0x7f030024
- public static int notification_template_lines_media = 2130903076;
-
- // aapt resource value: 0x7f030025
- public static int notification_template_media = 2130903077;
-
- // aapt resource value: 0x7f030026
- public static int notification_template_media_custom = 2130903078;
-
- // aapt resource value: 0x7f030027
- public static int notification_template_part_chronometer = 2130903079;
-
- // aapt resource value: 0x7f030028
- public static int notification_template_part_time = 2130903080;
-
- // aapt resource value: 0x7f030029
- public static int select_dialog_item_material = 2130903081;
-
- // aapt resource value: 0x7f03002a
- public static int select_dialog_multichoice_material = 2130903082;
-
- // aapt resource value: 0x7f03002b
- public static int select_dialog_singlechoice_material = 2130903083;
-
- // aapt resource value: 0x7f03002c
- public static int support_simple_spinner_dropdown_item = 2130903084;
-
- // aapt resource value: 0x7f03002d
- public static int tooltip = 2130903085;
-
- static Layout()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Layout()
- {
- }
- }
-
- public partial class String
- {
-
- // aapt resource value: 0x7f050000
- public static int abc_action_bar_home_description = 2131034112;
-
- // aapt resource value: 0x7f050001
- public static int abc_action_bar_up_description = 2131034113;
-
- // aapt resource value: 0x7f050002
- public static int abc_action_menu_overflow_description = 2131034114;
-
- // aapt resource value: 0x7f050003
- public static int abc_action_mode_done = 2131034115;
-
- // aapt resource value: 0x7f050004
- public static int abc_activity_chooser_view_see_all = 2131034116;
-
- // aapt resource value: 0x7f050005
- public static int abc_activitychooserview_choose_application = 2131034117;
-
- // aapt resource value: 0x7f050006
- public static int abc_capital_off = 2131034118;
-
- // aapt resource value: 0x7f050007
- public static int abc_capital_on = 2131034119;
-
- // aapt resource value: 0x7f050012
- public static int abc_font_family_body_1_material = 2131034130;
-
- // aapt resource value: 0x7f050013
- public static int abc_font_family_body_2_material = 2131034131;
-
- // aapt resource value: 0x7f050014
- public static int abc_font_family_button_material = 2131034132;
-
- // aapt resource value: 0x7f050015
- public static int abc_font_family_caption_material = 2131034133;
-
- // aapt resource value: 0x7f050016
- public static int abc_font_family_display_1_material = 2131034134;
-
- // aapt resource value: 0x7f050017
- public static int abc_font_family_display_2_material = 2131034135;
-
- // aapt resource value: 0x7f050018
- public static int abc_font_family_display_3_material = 2131034136;
-
- // aapt resource value: 0x7f050019
- public static int abc_font_family_display_4_material = 2131034137;
-
- // aapt resource value: 0x7f05001a
- public static int abc_font_family_headline_material = 2131034138;
-
- // aapt resource value: 0x7f05001b
- public static int abc_font_family_menu_material = 2131034139;
-
- // aapt resource value: 0x7f05001c
- public static int abc_font_family_subhead_material = 2131034140;
-
- // aapt resource value: 0x7f05001d
- public static int abc_font_family_title_material = 2131034141;
-
- // aapt resource value: 0x7f050008
- public static int abc_search_hint = 2131034120;
-
- // aapt resource value: 0x7f050009
- public static int abc_searchview_description_clear = 2131034121;
-
- // aapt resource value: 0x7f05000a
- public static int abc_searchview_description_query = 2131034122;
-
- // aapt resource value: 0x7f05000b
- public static int abc_searchview_description_search = 2131034123;
-
- // aapt resource value: 0x7f05000c
- public static int abc_searchview_description_submit = 2131034124;
-
- // aapt resource value: 0x7f05000d
- public static int abc_searchview_description_voice = 2131034125;
-
- // aapt resource value: 0x7f05000e
- public static int abc_shareactionprovider_share_with = 2131034126;
-
- // aapt resource value: 0x7f05000f
- public static int abc_shareactionprovider_share_with_application = 2131034127;
-
- // aapt resource value: 0x7f050010
- public static int abc_toolbar_collapse_description = 2131034128;
-
- // aapt resource value: 0x7f050020
- public static int app_name = 2131034144;
-
- // aapt resource value: 0x7f05001f
- public static int hello = 2131034143;
-
- // aapt resource value: 0x7f050011
- public static int search_menu_title = 2131034129;
-
- // aapt resource value: 0x7f05001e
- public static int status_bar_notification_info_overflow = 2131034142;
-
- static String()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private String()
- {
- }
- }
-
- public partial class Style
- {
-
- // aapt resource value: 0x7f070095
- public static int AlertDialog_AppCompat = 2131165333;
-
- // aapt resource value: 0x7f070096
- public static int AlertDialog_AppCompat_Light = 2131165334;
-
- // aapt resource value: 0x7f070097
- public static int Animation_AppCompat_Dialog = 2131165335;
-
- // aapt resource value: 0x7f070098
- public static int Animation_AppCompat_DropDownUp = 2131165336;
-
- // aapt resource value: 0x7f070099
- public static int Animation_AppCompat_Tooltip = 2131165337;
-
- // aapt resource value: 0x7f07009a
- public static int Base_AlertDialog_AppCompat = 2131165338;
-
- // aapt resource value: 0x7f07009b
- public static int Base_AlertDialog_AppCompat_Light = 2131165339;
-
- // aapt resource value: 0x7f07009c
- public static int Base_Animation_AppCompat_Dialog = 2131165340;
-
- // aapt resource value: 0x7f07009d
- public static int Base_Animation_AppCompat_DropDownUp = 2131165341;
-
- // aapt resource value: 0x7f07009e
- public static int Base_Animation_AppCompat_Tooltip = 2131165342;
-
- // aapt resource value: 0x7f07009f
- public static int Base_DialogWindowTitle_AppCompat = 2131165343;
-
- // aapt resource value: 0x7f0700a0
- public static int Base_DialogWindowTitleBackground_AppCompat = 2131165344;
-
- // aapt resource value: 0x7f070039
- public static int Base_TextAppearance_AppCompat = 2131165241;
-
- // aapt resource value: 0x7f07003a
- public static int Base_TextAppearance_AppCompat_Body1 = 2131165242;
-
- // aapt resource value: 0x7f07003b
- public static int Base_TextAppearance_AppCompat_Body2 = 2131165243;
-
- // aapt resource value: 0x7f070027
- public static int Base_TextAppearance_AppCompat_Button = 2131165223;
-
- // aapt resource value: 0x7f07003c
- public static int Base_TextAppearance_AppCompat_Caption = 2131165244;
-
- // aapt resource value: 0x7f07003d
- public static int Base_TextAppearance_AppCompat_Display1 = 2131165245;
-
- // aapt resource value: 0x7f07003e
- public static int Base_TextAppearance_AppCompat_Display2 = 2131165246;
-
- // aapt resource value: 0x7f07003f
- public static int Base_TextAppearance_AppCompat_Display3 = 2131165247;
-
- // aapt resource value: 0x7f070040
- public static int Base_TextAppearance_AppCompat_Display4 = 2131165248;
-
- // aapt resource value: 0x7f070041
- public static int Base_TextAppearance_AppCompat_Headline = 2131165249;
-
- // aapt resource value: 0x7f07000b
- public static int Base_TextAppearance_AppCompat_Inverse = 2131165195;
-
- // aapt resource value: 0x7f070042
- public static int Base_TextAppearance_AppCompat_Large = 2131165250;
-
- // aapt resource value: 0x7f07000c
- public static int Base_TextAppearance_AppCompat_Large_Inverse = 2131165196;
-
- // aapt resource value: 0x7f070043
- public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131165251;
-
- // aapt resource value: 0x7f070044
- public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131165252;
-
- // aapt resource value: 0x7f070045
- public static int Base_TextAppearance_AppCompat_Medium = 2131165253;
-
- // aapt resource value: 0x7f07000d
- public static int Base_TextAppearance_AppCompat_Medium_Inverse = 2131165197;
-
- // aapt resource value: 0x7f070046
- public static int Base_TextAppearance_AppCompat_Menu = 2131165254;
-
- // aapt resource value: 0x7f0700a1
- public static int Base_TextAppearance_AppCompat_SearchResult = 2131165345;
-
- // aapt resource value: 0x7f070047
- public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131165255;
-
- // aapt resource value: 0x7f070048
- public static int Base_TextAppearance_AppCompat_SearchResult_Title = 2131165256;
-
- // aapt resource value: 0x7f070049
- public static int Base_TextAppearance_AppCompat_Small = 2131165257;
-
- // aapt resource value: 0x7f07000e
- public static int Base_TextAppearance_AppCompat_Small_Inverse = 2131165198;
-
- // aapt resource value: 0x7f07004a
- public static int Base_TextAppearance_AppCompat_Subhead = 2131165258;
-
- // aapt resource value: 0x7f07000f
- public static int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131165199;
-
- // aapt resource value: 0x7f07004b
- public static int Base_TextAppearance_AppCompat_Title = 2131165259;
-
- // aapt resource value: 0x7f070010
- public static int Base_TextAppearance_AppCompat_Title_Inverse = 2131165200;
-
- // aapt resource value: 0x7f0700a2
- public static int Base_TextAppearance_AppCompat_Tooltip = 2131165346;
-
- // aapt resource value: 0x7f070086
- public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131165318;
-
- // aapt resource value: 0x7f07004c
- public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131165260;
-
- // aapt resource value: 0x7f07004d
- public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131165261;
-
- // aapt resource value: 0x7f07004e
- public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131165262;
-
- // aapt resource value: 0x7f07004f
- public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131165263;
-
- // aapt resource value: 0x7f070050
- public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131165264;
-
- // aapt resource value: 0x7f070051
- public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131165265;
-
- // aapt resource value: 0x7f070052
- public static int Base_TextAppearance_AppCompat_Widget_Button = 2131165266;
-
- // aapt resource value: 0x7f07008d
- public static int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131165325;
-
- // aapt resource value: 0x7f07008e
- public static int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131165326;
-
- // aapt resource value: 0x7f070087
- public static int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131165319;
-
- // aapt resource value: 0x7f0700a3
- public static int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131165347;
-
- // aapt resource value: 0x7f070053
- public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131165267;
-
- // aapt resource value: 0x7f070054
- public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131165268;
-
- // aapt resource value: 0x7f070055
- public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131165269;
-
- // aapt resource value: 0x7f070056
- public static int Base_TextAppearance_AppCompat_Widget_Switch = 2131165270;
-
- // aapt resource value: 0x7f070057
- public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131165271;
-
- // aapt resource value: 0x7f0700a4
- public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131165348;
-
- // aapt resource value: 0x7f070058
- public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131165272;
-
- // aapt resource value: 0x7f070059
- public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131165273;
-
- // aapt resource value: 0x7f07005a
- public static int Base_Theme_AppCompat = 2131165274;
-
- // aapt resource value: 0x7f0700a5
- public static int Base_Theme_AppCompat_CompactMenu = 2131165349;
-
- // aapt resource value: 0x7f070011
- public static int Base_Theme_AppCompat_Dialog = 2131165201;
-
- // aapt resource value: 0x7f070012
- public static int Base_Theme_AppCompat_Dialog_Alert = 2131165202;
-
- // aapt resource value: 0x7f0700a6
- public static int Base_Theme_AppCompat_Dialog_FixedSize = 2131165350;
-
- // aapt resource value: 0x7f070013
- public static int Base_Theme_AppCompat_Dialog_MinWidth = 2131165203;
-
- // aapt resource value: 0x7f070001
- public static int Base_Theme_AppCompat_DialogWhenLarge = 2131165185;
-
- // aapt resource value: 0x7f07005b
- public static int Base_Theme_AppCompat_Light = 2131165275;
-
- // aapt resource value: 0x7f0700a7
- public static int Base_Theme_AppCompat_Light_DarkActionBar = 2131165351;
-
- // aapt resource value: 0x7f070014
- public static int Base_Theme_AppCompat_Light_Dialog = 2131165204;
-
- // aapt resource value: 0x7f070015
- public static int Base_Theme_AppCompat_Light_Dialog_Alert = 2131165205;
-
- // aapt resource value: 0x7f0700a8
- public static int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131165352;
-
- // aapt resource value: 0x7f070016
- public static int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131165206;
-
- // aapt resource value: 0x7f070002
- public static int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131165186;
-
- // aapt resource value: 0x7f0700a9
- public static int Base_ThemeOverlay_AppCompat = 2131165353;
-
- // aapt resource value: 0x7f0700aa
- public static int Base_ThemeOverlay_AppCompat_ActionBar = 2131165354;
-
- // aapt resource value: 0x7f0700ab
- public static int Base_ThemeOverlay_AppCompat_Dark = 2131165355;
-
- // aapt resource value: 0x7f0700ac
- public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131165356;
-
- // aapt resource value: 0x7f070017
- public static int Base_ThemeOverlay_AppCompat_Dialog = 2131165207;
-
- // aapt resource value: 0x7f070018
- public static int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131165208;
-
- // aapt resource value: 0x7f0700ad
- public static int Base_ThemeOverlay_AppCompat_Light = 2131165357;
-
- // aapt resource value: 0x7f070019
- public static int Base_V11_Theme_AppCompat_Dialog = 2131165209;
-
- // aapt resource value: 0x7f07001a
- public static int Base_V11_Theme_AppCompat_Light_Dialog = 2131165210;
-
- // aapt resource value: 0x7f07001b
- public static int Base_V11_ThemeOverlay_AppCompat_Dialog = 2131165211;
-
- // aapt resource value: 0x7f070023
- public static int Base_V12_Widget_AppCompat_AutoCompleteTextView = 2131165219;
-
- // aapt resource value: 0x7f070024
- public static int Base_V12_Widget_AppCompat_EditText = 2131165220;
-
- // aapt resource value: 0x7f07005c
- public static int Base_V21_Theme_AppCompat = 2131165276;
-
- // aapt resource value: 0x7f07005d
- public static int Base_V21_Theme_AppCompat_Dialog = 2131165277;
-
- // aapt resource value: 0x7f07005e
- public static int Base_V21_Theme_AppCompat_Light = 2131165278;
-
- // aapt resource value: 0x7f07005f
- public static int Base_V21_Theme_AppCompat_Light_Dialog = 2131165279;
-
- // aapt resource value: 0x7f070060
- public static int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131165280;
-
- // aapt resource value: 0x7f070084
- public static int Base_V22_Theme_AppCompat = 2131165316;
-
- // aapt resource value: 0x7f070085
- public static int Base_V22_Theme_AppCompat_Light = 2131165317;
-
- // aapt resource value: 0x7f070088
- public static int Base_V23_Theme_AppCompat = 2131165320;
-
- // aapt resource value: 0x7f070089
- public static int Base_V23_Theme_AppCompat_Light = 2131165321;
-
- // aapt resource value: 0x7f070091
- public static int Base_V26_Theme_AppCompat = 2131165329;
-
- // aapt resource value: 0x7f070092
- public static int Base_V26_Theme_AppCompat_Light = 2131165330;
-
- // aapt resource value: 0x7f070093
- public static int Base_V26_Widget_AppCompat_Toolbar = 2131165331;
-
- // aapt resource value: 0x7f0700ae
- public static int Base_V7_Theme_AppCompat = 2131165358;
-
- // aapt resource value: 0x7f0700af
- public static int Base_V7_Theme_AppCompat_Dialog = 2131165359;
-
- // aapt resource value: 0x7f0700b0
- public static int Base_V7_Theme_AppCompat_Light = 2131165360;
-
- // aapt resource value: 0x7f0700b1
- public static int Base_V7_Theme_AppCompat_Light_Dialog = 2131165361;
-
- // aapt resource value: 0x7f0700b2
- public static int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131165362;
-
- // aapt resource value: 0x7f0700b3
- public static int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131165363;
-
- // aapt resource value: 0x7f0700b4
- public static int Base_V7_Widget_AppCompat_EditText = 2131165364;
-
- // aapt resource value: 0x7f0700b5
- public static int Base_V7_Widget_AppCompat_Toolbar = 2131165365;
-
- // aapt resource value: 0x7f0700b6
- public static int Base_Widget_AppCompat_ActionBar = 2131165366;
-
- // aapt resource value: 0x7f0700b7
- public static int Base_Widget_AppCompat_ActionBar_Solid = 2131165367;
-
- // aapt resource value: 0x7f0700b8
- public static int Base_Widget_AppCompat_ActionBar_TabBar = 2131165368;
-
- // aapt resource value: 0x7f070061
- public static int Base_Widget_AppCompat_ActionBar_TabText = 2131165281;
-
- // aapt resource value: 0x7f070062
- public static int Base_Widget_AppCompat_ActionBar_TabView = 2131165282;
-
- // aapt resource value: 0x7f070063
- public static int Base_Widget_AppCompat_ActionButton = 2131165283;
-
- // aapt resource value: 0x7f070064
- public static int Base_Widget_AppCompat_ActionButton_CloseMode = 2131165284;
-
- // aapt resource value: 0x7f070065
- public static int Base_Widget_AppCompat_ActionButton_Overflow = 2131165285;
-
- // aapt resource value: 0x7f0700b9
- public static int Base_Widget_AppCompat_ActionMode = 2131165369;
-
- // aapt resource value: 0x7f0700ba
- public static int Base_Widget_AppCompat_ActivityChooserView = 2131165370;
-
- // aapt resource value: 0x7f070025
- public static int Base_Widget_AppCompat_AutoCompleteTextView = 2131165221;
-
- // aapt resource value: 0x7f070066
- public static int Base_Widget_AppCompat_Button = 2131165286;
-
- // aapt resource value: 0x7f070067
- public static int Base_Widget_AppCompat_Button_Borderless = 2131165287;
-
- // aapt resource value: 0x7f070068
- public static int Base_Widget_AppCompat_Button_Borderless_Colored = 2131165288;
-
- // aapt resource value: 0x7f0700bb
- public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131165371;
-
- // aapt resource value: 0x7f07008a
- public static int Base_Widget_AppCompat_Button_Colored = 2131165322;
-
- // aapt resource value: 0x7f070069
- public static int Base_Widget_AppCompat_Button_Small = 2131165289;
-
- // aapt resource value: 0x7f07006a
- public static int Base_Widget_AppCompat_ButtonBar = 2131165290;
-
- // aapt resource value: 0x7f0700bc
- public static int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131165372;
-
- // aapt resource value: 0x7f07006b
- public static int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131165291;
-
- // aapt resource value: 0x7f07006c
- public static int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131165292;
-
- // aapt resource value: 0x7f0700bd
- public static int Base_Widget_AppCompat_CompoundButton_Switch = 2131165373;
-
- // aapt resource value: 0x7f070000
- public static int Base_Widget_AppCompat_DrawerArrowToggle = 2131165184;
-
- // aapt resource value: 0x7f0700be
- public static int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131165374;
-
- // aapt resource value: 0x7f07006d
- public static int Base_Widget_AppCompat_DropDownItem_Spinner = 2131165293;
-
- // aapt resource value: 0x7f070026
- public static int Base_Widget_AppCompat_EditText = 2131165222;
-
- // aapt resource value: 0x7f07006e
- public static int Base_Widget_AppCompat_ImageButton = 2131165294;
-
- // aapt resource value: 0x7f0700bf
- public static int Base_Widget_AppCompat_Light_ActionBar = 2131165375;
-
- // aapt resource value: 0x7f0700c0
- public static int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131165376;
-
- // aapt resource value: 0x7f0700c1
- public static int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131165377;
-
- // aapt resource value: 0x7f07006f
- public static int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131165295;
-
- // aapt resource value: 0x7f070070
- public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131165296;
-
- // aapt resource value: 0x7f070071
- public static int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131165297;
-
- // aapt resource value: 0x7f070072
- public static int Base_Widget_AppCompat_Light_PopupMenu = 2131165298;
-
- // aapt resource value: 0x7f070073
- public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131165299;
-
- // aapt resource value: 0x7f0700c2
- public static int Base_Widget_AppCompat_ListMenuView = 2131165378;
-
- // aapt resource value: 0x7f070074
- public static int Base_Widget_AppCompat_ListPopupWindow = 2131165300;
-
- // aapt resource value: 0x7f070075
- public static int Base_Widget_AppCompat_ListView = 2131165301;
-
- // aapt resource value: 0x7f070076
- public static int Base_Widget_AppCompat_ListView_DropDown = 2131165302;
-
- // aapt resource value: 0x7f070077
- public static int Base_Widget_AppCompat_ListView_Menu = 2131165303;
-
- // aapt resource value: 0x7f070078
- public static int Base_Widget_AppCompat_PopupMenu = 2131165304;
-
- // aapt resource value: 0x7f070079
- public static int Base_Widget_AppCompat_PopupMenu_Overflow = 2131165305;
-
- // aapt resource value: 0x7f0700c3
- public static int Base_Widget_AppCompat_PopupWindow = 2131165379;
-
- // aapt resource value: 0x7f07001c
- public static int Base_Widget_AppCompat_ProgressBar = 2131165212;
-
- // aapt resource value: 0x7f07001d
- public static int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131165213;
-
- // aapt resource value: 0x7f07007a
- public static int Base_Widget_AppCompat_RatingBar = 2131165306;
-
- // aapt resource value: 0x7f07008b
- public static int Base_Widget_AppCompat_RatingBar_Indicator = 2131165323;
-
- // aapt resource value: 0x7f07008c
- public static int Base_Widget_AppCompat_RatingBar_Small = 2131165324;
-
- // aapt resource value: 0x7f0700c4
- public static int Base_Widget_AppCompat_SearchView = 2131165380;
-
- // aapt resource value: 0x7f0700c5
- public static int Base_Widget_AppCompat_SearchView_ActionBar = 2131165381;
-
- // aapt resource value: 0x7f07007b
- public static int Base_Widget_AppCompat_SeekBar = 2131165307;
-
- // aapt resource value: 0x7f0700c6
- public static int Base_Widget_AppCompat_SeekBar_Discrete = 2131165382;
-
- // aapt resource value: 0x7f07007c
- public static int Base_Widget_AppCompat_Spinner = 2131165308;
-
- // aapt resource value: 0x7f070003
- public static int Base_Widget_AppCompat_Spinner_Underlined = 2131165187;
-
- // aapt resource value: 0x7f07007d
- public static int Base_Widget_AppCompat_TextView_SpinnerItem = 2131165309;
-
- // aapt resource value: 0x7f070094
- public static int Base_Widget_AppCompat_Toolbar = 2131165332;
-
- // aapt resource value: 0x7f07007e
- public static int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131165310;
-
- // aapt resource value: 0x7f07001e
- public static int Platform_AppCompat = 2131165214;
-
- // aapt resource value: 0x7f07001f
- public static int Platform_AppCompat_Light = 2131165215;
-
- // aapt resource value: 0x7f07007f
- public static int Platform_ThemeOverlay_AppCompat = 2131165311;
-
- // aapt resource value: 0x7f070080
- public static int Platform_ThemeOverlay_AppCompat_Dark = 2131165312;
-
- // aapt resource value: 0x7f070081
- public static int Platform_ThemeOverlay_AppCompat_Light = 2131165313;
-
- // aapt resource value: 0x7f070020
- public static int Platform_V11_AppCompat = 2131165216;
-
- // aapt resource value: 0x7f070021
- public static int Platform_V11_AppCompat_Light = 2131165217;
-
- // aapt resource value: 0x7f070028
- public static int Platform_V14_AppCompat = 2131165224;
-
- // aapt resource value: 0x7f070029
- public static int Platform_V14_AppCompat_Light = 2131165225;
-
- // aapt resource value: 0x7f070082
- public static int Platform_V21_AppCompat = 2131165314;
-
- // aapt resource value: 0x7f070083
- public static int Platform_V21_AppCompat_Light = 2131165315;
-
- // aapt resource value: 0x7f07008f
- public static int Platform_V25_AppCompat = 2131165327;
-
- // aapt resource value: 0x7f070090
- public static int Platform_V25_AppCompat_Light = 2131165328;
-
- // aapt resource value: 0x7f070022
- public static int Platform_Widget_AppCompat_Spinner = 2131165218;
-
- // aapt resource value: 0x7f07002b
- public static int RtlOverlay_DialogWindowTitle_AppCompat = 2131165227;
-
- // aapt resource value: 0x7f07002c
- public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131165228;
-
- // aapt resource value: 0x7f07002d
- public static int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131165229;
-
- // aapt resource value: 0x7f07002e
- public static int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131165230;
-
- // aapt resource value: 0x7f07002f
- public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131165231;
-
- // aapt resource value: 0x7f070030
- public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131165232;
-
- // aapt resource value: 0x7f070031
- public static int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131165233;
-
- // aapt resource value: 0x7f070032
- public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131165234;
-
- // aapt resource value: 0x7f070033
- public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131165235;
-
- // aapt resource value: 0x7f070034
- public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131165236;
-
- // aapt resource value: 0x7f070035
- public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131165237;
-
- // aapt resource value: 0x7f070036
- public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131165238;
-
- // aapt resource value: 0x7f070037
- public static int RtlUnderlay_Widget_AppCompat_ActionButton = 2131165239;
-
- // aapt resource value: 0x7f070038
- public static int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131165240;
-
- // aapt resource value: 0x7f0700c7
- public static int TextAppearance_AppCompat = 2131165383;
-
- // aapt resource value: 0x7f0700c8
- public static int TextAppearance_AppCompat_Body1 = 2131165384;
-
- // aapt resource value: 0x7f0700c9
- public static int TextAppearance_AppCompat_Body2 = 2131165385;
-
- // aapt resource value: 0x7f0700ca
- public static int TextAppearance_AppCompat_Button = 2131165386;
-
- // aapt resource value: 0x7f0700cb
- public static int TextAppearance_AppCompat_Caption = 2131165387;
-
- // aapt resource value: 0x7f0700cc
- public static int TextAppearance_AppCompat_Display1 = 2131165388;
-
- // aapt resource value: 0x7f0700cd
- public static int TextAppearance_AppCompat_Display2 = 2131165389;
-
- // aapt resource value: 0x7f0700ce
- public static int TextAppearance_AppCompat_Display3 = 2131165390;
-
- // aapt resource value: 0x7f0700cf
- public static int TextAppearance_AppCompat_Display4 = 2131165391;
-
- // aapt resource value: 0x7f0700d0
- public static int TextAppearance_AppCompat_Headline = 2131165392;
-
- // aapt resource value: 0x7f0700d1
- public static int TextAppearance_AppCompat_Inverse = 2131165393;
-
- // aapt resource value: 0x7f0700d2
- public static int TextAppearance_AppCompat_Large = 2131165394;
-
- // aapt resource value: 0x7f0700d3
- public static int TextAppearance_AppCompat_Large_Inverse = 2131165395;
-
- // aapt resource value: 0x7f0700d4
- public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131165396;
-
- // aapt resource value: 0x7f0700d5
- public static int TextAppearance_AppCompat_Light_SearchResult_Title = 2131165397;
-
- // aapt resource value: 0x7f0700d6
- public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131165398;
-
- // aapt resource value: 0x7f0700d7
- public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131165399;
-
- // aapt resource value: 0x7f0700d8
- public static int TextAppearance_AppCompat_Medium = 2131165400;
-
- // aapt resource value: 0x7f0700d9
- public static int TextAppearance_AppCompat_Medium_Inverse = 2131165401;
-
- // aapt resource value: 0x7f0700da
- public static int TextAppearance_AppCompat_Menu = 2131165402;
-
- // aapt resource value: 0x7f0700db
- public static int TextAppearance_AppCompat_SearchResult_Subtitle = 2131165403;
-
- // aapt resource value: 0x7f0700dc
- public static int TextAppearance_AppCompat_SearchResult_Title = 2131165404;
-
- // aapt resource value: 0x7f0700dd
- public static int TextAppearance_AppCompat_Small = 2131165405;
-
- // aapt resource value: 0x7f0700de
- public static int TextAppearance_AppCompat_Small_Inverse = 2131165406;
-
- // aapt resource value: 0x7f0700df
- public static int TextAppearance_AppCompat_Subhead = 2131165407;
-
- // aapt resource value: 0x7f0700e0
- public static int TextAppearance_AppCompat_Subhead_Inverse = 2131165408;
-
- // aapt resource value: 0x7f0700e1
- public static int TextAppearance_AppCompat_Title = 2131165409;
-
- // aapt resource value: 0x7f0700e2
- public static int TextAppearance_AppCompat_Title_Inverse = 2131165410;
-
- // aapt resource value: 0x7f07002a
- public static int TextAppearance_AppCompat_Tooltip = 2131165226;
-
- // aapt resource value: 0x7f0700e3
- public static int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131165411;
-
- // aapt resource value: 0x7f0700e4
- public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131165412;
-
- // aapt resource value: 0x7f0700e5
- public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131165413;
-
- // aapt resource value: 0x7f0700e6
- public static int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131165414;
-
- // aapt resource value: 0x7f0700e7
- public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131165415;
-
- // aapt resource value: 0x7f0700e8
- public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131165416;
-
- // aapt resource value: 0x7f0700e9
- public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131165417;
-
- // aapt resource value: 0x7f0700ea
- public static int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131165418;
-
- // aapt resource value: 0x7f0700eb
- public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131165419;
-
- // aapt resource value: 0x7f0700ec
- public static int TextAppearance_AppCompat_Widget_Button = 2131165420;
-
- // aapt resource value: 0x7f0700ed
- public static int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131165421;
-
- // aapt resource value: 0x7f0700ee
- public static int TextAppearance_AppCompat_Widget_Button_Colored = 2131165422;
-
- // aapt resource value: 0x7f0700ef
- public static int TextAppearance_AppCompat_Widget_Button_Inverse = 2131165423;
-
- // aapt resource value: 0x7f0700f0
- public static int TextAppearance_AppCompat_Widget_DropDownItem = 2131165424;
-
- // aapt resource value: 0x7f0700f1
- public static int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131165425;
-
- // aapt resource value: 0x7f0700f2
- public static int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131165426;
-
- // aapt resource value: 0x7f0700f3
- public static int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131165427;
-
- // aapt resource value: 0x7f0700f4
- public static int TextAppearance_AppCompat_Widget_Switch = 2131165428;
-
- // aapt resource value: 0x7f0700f5
- public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131165429;
-
- // aapt resource value: 0x7f07015b
- public static int TextAppearance_Compat_Notification = 2131165531;
-
- // aapt resource value: 0x7f07015c
- public static int TextAppearance_Compat_Notification_Info = 2131165532;
-
- // aapt resource value: 0x7f070156
- public static int TextAppearance_Compat_Notification_Info_Media = 2131165526;
-
- // aapt resource value: 0x7f070161
- public static int TextAppearance_Compat_Notification_Line2 = 2131165537;
-
- // aapt resource value: 0x7f07015a
- public static int TextAppearance_Compat_Notification_Line2_Media = 2131165530;
-
- // aapt resource value: 0x7f070157
- public static int TextAppearance_Compat_Notification_Media = 2131165527;
-
- // aapt resource value: 0x7f07015d
- public static int TextAppearance_Compat_Notification_Time = 2131165533;
-
- // aapt resource value: 0x7f070158
- public static int TextAppearance_Compat_Notification_Time_Media = 2131165528;
-
- // aapt resource value: 0x7f07015e
- public static int TextAppearance_Compat_Notification_Title = 2131165534;
-
- // aapt resource value: 0x7f070159
- public static int TextAppearance_Compat_Notification_Title_Media = 2131165529;
-
- // aapt resource value: 0x7f0700f6
- public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131165430;
-
- // aapt resource value: 0x7f0700f7
- public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131165431;
-
- // aapt resource value: 0x7f0700f8
- public static int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131165432;
-
- // aapt resource value: 0x7f0700f9
- public static int Theme_AppCompat = 2131165433;
-
- // aapt resource value: 0x7f0700fa
- public static int Theme_AppCompat_CompactMenu = 2131165434;
-
- // aapt resource value: 0x7f070004
- public static int Theme_AppCompat_DayNight = 2131165188;
-
- // aapt resource value: 0x7f070005
- public static int Theme_AppCompat_DayNight_DarkActionBar = 2131165189;
-
- // aapt resource value: 0x7f070006
- public static int Theme_AppCompat_DayNight_Dialog = 2131165190;
-
- // aapt resource value: 0x7f070007
- public static int Theme_AppCompat_DayNight_Dialog_Alert = 2131165191;
-
- // aapt resource value: 0x7f070008
- public static int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131165192;
-
- // aapt resource value: 0x7f070009
- public static int Theme_AppCompat_DayNight_DialogWhenLarge = 2131165193;
-
- // aapt resource value: 0x7f07000a
- public static int Theme_AppCompat_DayNight_NoActionBar = 2131165194;
-
- // aapt resource value: 0x7f0700fb
- public static int Theme_AppCompat_Dialog = 2131165435;
-
- // aapt resource value: 0x7f0700fc
- public static int Theme_AppCompat_Dialog_Alert = 2131165436;
-
- // aapt resource value: 0x7f0700fd
- public static int Theme_AppCompat_Dialog_MinWidth = 2131165437;
-
- // aapt resource value: 0x7f0700fe
- public static int Theme_AppCompat_DialogWhenLarge = 2131165438;
-
- // aapt resource value: 0x7f0700ff
- public static int Theme_AppCompat_Light = 2131165439;
-
- // aapt resource value: 0x7f070100
- public static int Theme_AppCompat_Light_DarkActionBar = 2131165440;
-
- // aapt resource value: 0x7f070101
- public static int Theme_AppCompat_Light_Dialog = 2131165441;
-
- // aapt resource value: 0x7f070102
- public static int Theme_AppCompat_Light_Dialog_Alert = 2131165442;
-
- // aapt resource value: 0x7f070103
- public static int Theme_AppCompat_Light_Dialog_MinWidth = 2131165443;
-
- // aapt resource value: 0x7f070104
- public static int Theme_AppCompat_Light_DialogWhenLarge = 2131165444;
-
- // aapt resource value: 0x7f070105
- public static int Theme_AppCompat_Light_NoActionBar = 2131165445;
-
- // aapt resource value: 0x7f070106
- public static int Theme_AppCompat_NoActionBar = 2131165446;
-
- // aapt resource value: 0x7f070107
- public static int ThemeOverlay_AppCompat = 2131165447;
-
- // aapt resource value: 0x7f070108
- public static int ThemeOverlay_AppCompat_ActionBar = 2131165448;
-
- // aapt resource value: 0x7f070109
- public static int ThemeOverlay_AppCompat_Dark = 2131165449;
-
- // aapt resource value: 0x7f07010a
- public static int ThemeOverlay_AppCompat_Dark_ActionBar = 2131165450;
-
- // aapt resource value: 0x7f07010b
- public static int ThemeOverlay_AppCompat_Dialog = 2131165451;
-
- // aapt resource value: 0x7f07010c
- public static int ThemeOverlay_AppCompat_Dialog_Alert = 2131165452;
-
- // aapt resource value: 0x7f07010d
- public static int ThemeOverlay_AppCompat_Light = 2131165453;
-
- // aapt resource value: 0x7f07010e
- public static int Widget_AppCompat_ActionBar = 2131165454;
-
- // aapt resource value: 0x7f07010f
- public static int Widget_AppCompat_ActionBar_Solid = 2131165455;
-
- // aapt resource value: 0x7f070110
- public static int Widget_AppCompat_ActionBar_TabBar = 2131165456;
-
- // aapt resource value: 0x7f070111
- public static int Widget_AppCompat_ActionBar_TabText = 2131165457;
-
- // aapt resource value: 0x7f070112
- public static int Widget_AppCompat_ActionBar_TabView = 2131165458;
-
- // aapt resource value: 0x7f070113
- public static int Widget_AppCompat_ActionButton = 2131165459;
-
- // aapt resource value: 0x7f070114
- public static int Widget_AppCompat_ActionButton_CloseMode = 2131165460;
-
- // aapt resource value: 0x7f070115
- public static int Widget_AppCompat_ActionButton_Overflow = 2131165461;
-
- // aapt resource value: 0x7f070116
- public static int Widget_AppCompat_ActionMode = 2131165462;
-
- // aapt resource value: 0x7f070117
- public static int Widget_AppCompat_ActivityChooserView = 2131165463;
-
- // aapt resource value: 0x7f070118
- public static int Widget_AppCompat_AutoCompleteTextView = 2131165464;
-
- // aapt resource value: 0x7f070119
- public static int Widget_AppCompat_Button = 2131165465;
-
- // aapt resource value: 0x7f07011a
- public static int Widget_AppCompat_Button_Borderless = 2131165466;
-
- // aapt resource value: 0x7f07011b
- public static int Widget_AppCompat_Button_Borderless_Colored = 2131165467;
-
- // aapt resource value: 0x7f07011c
- public static int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131165468;
-
- // aapt resource value: 0x7f07011d
- public static int Widget_AppCompat_Button_Colored = 2131165469;
-
- // aapt resource value: 0x7f07011e
- public static int Widget_AppCompat_Button_Small = 2131165470;
-
- // aapt resource value: 0x7f07011f
- public static int Widget_AppCompat_ButtonBar = 2131165471;
-
- // aapt resource value: 0x7f070120
- public static int Widget_AppCompat_ButtonBar_AlertDialog = 2131165472;
-
- // aapt resource value: 0x7f070121
- public static int Widget_AppCompat_CompoundButton_CheckBox = 2131165473;
-
- // aapt resource value: 0x7f070122
- public static int Widget_AppCompat_CompoundButton_RadioButton = 2131165474;
-
- // aapt resource value: 0x7f070123
- public static int Widget_AppCompat_CompoundButton_Switch = 2131165475;
-
- // aapt resource value: 0x7f070124
- public static int Widget_AppCompat_DrawerArrowToggle = 2131165476;
-
- // aapt resource value: 0x7f070125
- public static int Widget_AppCompat_DropDownItem_Spinner = 2131165477;
-
- // aapt resource value: 0x7f070126
- public static int Widget_AppCompat_EditText = 2131165478;
-
- // aapt resource value: 0x7f070127
- public static int Widget_AppCompat_ImageButton = 2131165479;
-
- // aapt resource value: 0x7f070128
- public static int Widget_AppCompat_Light_ActionBar = 2131165480;
-
- // aapt resource value: 0x7f070129
- public static int Widget_AppCompat_Light_ActionBar_Solid = 2131165481;
-
- // aapt resource value: 0x7f07012a
- public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131165482;
-
- // aapt resource value: 0x7f07012b
- public static int Widget_AppCompat_Light_ActionBar_TabBar = 2131165483;
-
- // aapt resource value: 0x7f07012c
- public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131165484;
-
- // aapt resource value: 0x7f07012d
- public static int Widget_AppCompat_Light_ActionBar_TabText = 2131165485;
-
- // aapt resource value: 0x7f07012e
- public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131165486;
-
- // aapt resource value: 0x7f07012f
- public static int Widget_AppCompat_Light_ActionBar_TabView = 2131165487;
-
- // aapt resource value: 0x7f070130
- public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131165488;
-
- // aapt resource value: 0x7f070131
- public static int Widget_AppCompat_Light_ActionButton = 2131165489;
-
- // aapt resource value: 0x7f070132
- public static int Widget_AppCompat_Light_ActionButton_CloseMode = 2131165490;
-
- // aapt resource value: 0x7f070133
- public static int Widget_AppCompat_Light_ActionButton_Overflow = 2131165491;
-
- // aapt resource value: 0x7f070134
- public static int Widget_AppCompat_Light_ActionMode_Inverse = 2131165492;
-
- // aapt resource value: 0x7f070135
- public static int Widget_AppCompat_Light_ActivityChooserView = 2131165493;
-
- // aapt resource value: 0x7f070136
- public static int Widget_AppCompat_Light_AutoCompleteTextView = 2131165494;
-
- // aapt resource value: 0x7f070137
- public static int Widget_AppCompat_Light_DropDownItem_Spinner = 2131165495;
-
- // aapt resource value: 0x7f070138
- public static int Widget_AppCompat_Light_ListPopupWindow = 2131165496;
-
- // aapt resource value: 0x7f070139
- public static int Widget_AppCompat_Light_ListView_DropDown = 2131165497;
-
- // aapt resource value: 0x7f07013a
- public static int Widget_AppCompat_Light_PopupMenu = 2131165498;
-
- // aapt resource value: 0x7f07013b
- public static int Widget_AppCompat_Light_PopupMenu_Overflow = 2131165499;
-
- // aapt resource value: 0x7f07013c
- public static int Widget_AppCompat_Light_SearchView = 2131165500;
-
- // aapt resource value: 0x7f07013d
- public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131165501;
-
- // aapt resource value: 0x7f07013e
- public static int Widget_AppCompat_ListMenuView = 2131165502;
-
- // aapt resource value: 0x7f07013f
- public static int Widget_AppCompat_ListPopupWindow = 2131165503;
-
- // aapt resource value: 0x7f070140
- public static int Widget_AppCompat_ListView = 2131165504;
-
- // aapt resource value: 0x7f070141
- public static int Widget_AppCompat_ListView_DropDown = 2131165505;
-
- // aapt resource value: 0x7f070142
- public static int Widget_AppCompat_ListView_Menu = 2131165506;
-
- // aapt resource value: 0x7f070143
- public static int Widget_AppCompat_PopupMenu = 2131165507;
-
- // aapt resource value: 0x7f070144
- public static int Widget_AppCompat_PopupMenu_Overflow = 2131165508;
-
- // aapt resource value: 0x7f070145
- public static int Widget_AppCompat_PopupWindow = 2131165509;
-
- // aapt resource value: 0x7f070146
- public static int Widget_AppCompat_ProgressBar = 2131165510;
-
- // aapt resource value: 0x7f070147
- public static int Widget_AppCompat_ProgressBar_Horizontal = 2131165511;
-
- // aapt resource value: 0x7f070148
- public static int Widget_AppCompat_RatingBar = 2131165512;
-
- // aapt resource value: 0x7f070149
- public static int Widget_AppCompat_RatingBar_Indicator = 2131165513;
-
- // aapt resource value: 0x7f07014a
- public static int Widget_AppCompat_RatingBar_Small = 2131165514;
-
- // aapt resource value: 0x7f07014b
- public static int Widget_AppCompat_SearchView = 2131165515;
-
- // aapt resource value: 0x7f07014c
- public static int Widget_AppCompat_SearchView_ActionBar = 2131165516;
-
- // aapt resource value: 0x7f07014d
- public static int Widget_AppCompat_SeekBar = 2131165517;
-
- // aapt resource value: 0x7f07014e
- public static int Widget_AppCompat_SeekBar_Discrete = 2131165518;
-
- // aapt resource value: 0x7f07014f
- public static int Widget_AppCompat_Spinner = 2131165519;
-
- // aapt resource value: 0x7f070150
- public static int Widget_AppCompat_Spinner_DropDown = 2131165520;
-
- // aapt resource value: 0x7f070151
- public static int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131165521;
-
- // aapt resource value: 0x7f070152
- public static int Widget_AppCompat_Spinner_Underlined = 2131165522;
-
- // aapt resource value: 0x7f070153
- public static int Widget_AppCompat_TextView_SpinnerItem = 2131165523;
-
- // aapt resource value: 0x7f070154
- public static int Widget_AppCompat_Toolbar = 2131165524;
-
- // aapt resource value: 0x7f070155
- public static int Widget_AppCompat_Toolbar_Button_Navigation = 2131165525;
-
- // aapt resource value: 0x7f07015f
- public static int Widget_Compat_NotificationActionContainer = 2131165535;
-
- // aapt resource value: 0x7f070160
- public static int Widget_Compat_NotificationActionText = 2131165536;
-
- static Style()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Style()
- {
- }
- }
-
- public partial class Styleable
- {
-
- public static int[] ActionBar = new int[] {
- 2130771969,
- 2130771971,
- 2130771972,
- 2130771973,
- 2130771974,
- 2130771975,
- 2130771976,
- 2130771977,
- 2130771978,
- 2130771979,
- 2130771980,
- 2130771981,
- 2130771982,
- 2130771983,
- 2130771984,
- 2130771985,
- 2130771986,
- 2130771987,
- 2130771988,
- 2130771989,
- 2130771990,
- 2130771991,
- 2130771992,
- 2130771993,
- 2130771994,
- 2130771995,
- 2130771996,
- 2130771997,
- 2130772067};
-
- // aapt resource value: 10
- public static int ActionBar_background = 10;
-
- // aapt resource value: 12
- public static int ActionBar_backgroundSplit = 12;
-
- // aapt resource value: 11
- public static int ActionBar_backgroundStacked = 11;
-
- // aapt resource value: 21
- public static int ActionBar_contentInsetEnd = 21;
-
- // aapt resource value: 25
- public static int ActionBar_contentInsetEndWithActions = 25;
-
- // aapt resource value: 22
- public static int ActionBar_contentInsetLeft = 22;
-
- // aapt resource value: 23
- public static int ActionBar_contentInsetRight = 23;
-
- // aapt resource value: 20
- public static int ActionBar_contentInsetStart = 20;
-
- // aapt resource value: 24
- public static int ActionBar_contentInsetStartWithNavigation = 24;
-
- // aapt resource value: 13
- public static int ActionBar_customNavigationLayout = 13;
-
- // aapt resource value: 3
- public static int ActionBar_displayOptions = 3;
-
- // aapt resource value: 9
- public static int ActionBar_divider = 9;
-
- // aapt resource value: 26
- public static int ActionBar_elevation = 26;
-
- // aapt resource value: 0
- public static int ActionBar_height = 0;
-
- // aapt resource value: 19
- public static int ActionBar_hideOnContentScroll = 19;
-
- // aapt resource value: 28
- public static int ActionBar_homeAsUpIndicator = 28;
-
- // aapt resource value: 14
- public static int ActionBar_homeLayout = 14;
-
- // aapt resource value: 7
- public static int ActionBar_icon = 7;
-
- // aapt resource value: 16
- public static int ActionBar_indeterminateProgressStyle = 16;
-
- // aapt resource value: 18
- public static int ActionBar_itemPadding = 18;
-
- // aapt resource value: 8
- public static int ActionBar_logo = 8;
-
- // aapt resource value: 2
- public static int ActionBar_navigationMode = 2;
-
- // aapt resource value: 27
- public static int ActionBar_popupTheme = 27;
-
- // aapt resource value: 17
- public static int ActionBar_progressBarPadding = 17;
-
- // aapt resource value: 15
- public static int ActionBar_progressBarStyle = 15;
-
- // aapt resource value: 4
- public static int ActionBar_subtitle = 4;
-
- // aapt resource value: 6
- public static int ActionBar_subtitleTextStyle = 6;
-
- // aapt resource value: 1
- public static int ActionBar_title = 1;
-
- // aapt resource value: 5
- public static int ActionBar_titleTextStyle = 5;
-
- public static int[] ActionBarLayout = new int[] {
- 16842931};
-
- // aapt resource value: 0
- public static int ActionBarLayout_android_layout_gravity = 0;
-
- public static int[] ActionMenuItemView = new int[] {
- 16843071};
-
- // aapt resource value: 0
- public static int ActionMenuItemView_android_minWidth = 0;
-
- public static int[] ActionMenuView;
-
- public static int[] ActionMode = new int[] {
- 2130771969,
- 2130771975,
- 2130771976,
- 2130771980,
- 2130771982,
- 2130771998};
-
- // aapt resource value: 3
- public static int ActionMode_background = 3;
-
- // aapt resource value: 4
- public static int ActionMode_backgroundSplit = 4;
-
- // aapt resource value: 5
- public static int ActionMode_closeItemLayout = 5;
-
- // aapt resource value: 0
- public static int ActionMode_height = 0;
-
- // aapt resource value: 2
- public static int ActionMode_subtitleTextStyle = 2;
-
- // aapt resource value: 1
- public static int ActionMode_titleTextStyle = 1;
-
- public static int[] ActivityChooserView = new int[] {
- 2130771999,
- 2130772000};
-
- // aapt resource value: 1
- public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
-
- // aapt resource value: 0
- public static int ActivityChooserView_initialActivityCount = 0;
-
- public static int[] AlertDialog = new int[] {
- 16842994,
- 2130772001,
- 2130772002,
- 2130772003,
- 2130772004,
- 2130772005,
- 2130772006};
-
- // aapt resource value: 0
- public static int AlertDialog_android_layout = 0;
-
- // aapt resource value: 1
- public static int AlertDialog_buttonPanelSideLayout = 1;
-
- // aapt resource value: 5
- public static int AlertDialog_listItemLayout = 5;
-
- // aapt resource value: 2
- public static int AlertDialog_listLayout = 2;
-
- // aapt resource value: 3
- public static int AlertDialog_multiChoiceItemLayout = 3;
-
- // aapt resource value: 6
- public static int AlertDialog_showTitle = 6;
-
- // aapt resource value: 4
- public static int AlertDialog_singleChoiceItemLayout = 4;
-
- public static int[] AppCompatImageView = new int[] {
- 16843033,
- 2130772007,
- 2130772008,
- 2130772009};
-
- // aapt resource value: 0
- public static int AppCompatImageView_android_src = 0;
-
- // aapt resource value: 1
- public static int AppCompatImageView_srcCompat = 1;
-
- // aapt resource value: 2
- public static int AppCompatImageView_tint = 2;
-
- // aapt resource value: 3
- public static int AppCompatImageView_tintMode = 3;
-
- public static int[] AppCompatSeekBar = new int[] {
- 16843074,
- 2130772010,
- 2130772011,
- 2130772012};
-
- // aapt resource value: 0
- public static int AppCompatSeekBar_android_thumb = 0;
-
- // aapt resource value: 1
- public static int AppCompatSeekBar_tickMark = 1;
-
- // aapt resource value: 2
- public static int AppCompatSeekBar_tickMarkTint = 2;
-
- // aapt resource value: 3
- public static int AppCompatSeekBar_tickMarkTintMode = 3;
-
- public static int[] AppCompatTextHelper = new int[] {
- 16842804,
- 16843117,
- 16843118,
- 16843119,
- 16843120,
- 16843666,
- 16843667};
-
- // aapt resource value: 2
- public static int AppCompatTextHelper_android_drawableBottom = 2;
-
- // aapt resource value: 6
- public static int AppCompatTextHelper_android_drawableEnd = 6;
-
- // aapt resource value: 3
- public static int AppCompatTextHelper_android_drawableLeft = 3;
-
- // aapt resource value: 4
- public static int AppCompatTextHelper_android_drawableRight = 4;
-
- // aapt resource value: 5
- public static int AppCompatTextHelper_android_drawableStart = 5;
-
- // aapt resource value: 1
- public static int AppCompatTextHelper_android_drawableTop = 1;
-
- // aapt resource value: 0
- public static int AppCompatTextHelper_android_textAppearance = 0;
-
- public static int[] AppCompatTextView = new int[] {
- 16842804,
- 2130772013,
- 2130772014,
- 2130772015,
- 2130772016,
- 2130772017,
- 2130772018,
- 2130772019};
-
- // aapt resource value: 0
- public static int AppCompatTextView_android_textAppearance = 0;
-
- // aapt resource value: 6
- public static int AppCompatTextView_autoSizeMaxTextSize = 6;
-
- // aapt resource value: 5
- public static int AppCompatTextView_autoSizeMinTextSize = 5;
-
- // aapt resource value: 4
- public static int AppCompatTextView_autoSizePresetSizes = 4;
-
- // aapt resource value: 3
- public static int AppCompatTextView_autoSizeStepGranularity = 3;
-
- // aapt resource value: 2
- public static int AppCompatTextView_autoSizeTextType = 2;
-
- // aapt resource value: 7
- public static int AppCompatTextView_fontFamily = 7;
-
- // aapt resource value: 1
- public static int AppCompatTextView_textAllCaps = 1;
-
- public static int[] AppCompatTheme = new int[] {
- 16842839,
- 16842926,
- 2130772020,
- 2130772021,
- 2130772022,
- 2130772023,
- 2130772024,
- 2130772025,
- 2130772026,
- 2130772027,
- 2130772028,
- 2130772029,
- 2130772030,
- 2130772031,
- 2130772032,
- 2130772033,
- 2130772034,
- 2130772035,
- 2130772036,
- 2130772037,
- 2130772038,
- 2130772039,
- 2130772040,
- 2130772041,
- 2130772042,
- 2130772043,
- 2130772044,
- 2130772045,
- 2130772046,
- 2130772047,
- 2130772048,
- 2130772049,
- 2130772050,
- 2130772051,
- 2130772052,
- 2130772053,
- 2130772054,
- 2130772055,
- 2130772056,
- 2130772057,
- 2130772058,
- 2130772059,
- 2130772060,
- 2130772061,
- 2130772062,
- 2130772063,
- 2130772064,
- 2130772065,
- 2130772066,
- 2130772067,
- 2130772068,
- 2130772069,
- 2130772070,
- 2130772071,
- 2130772072,
- 2130772073,
- 2130772074,
- 2130772075,
- 2130772076,
- 2130772077,
- 2130772078,
- 2130772079,
- 2130772080,
- 2130772081,
- 2130772082,
- 2130772083,
- 2130772084,
- 2130772085,
- 2130772086,
- 2130772087,
- 2130772088,
- 2130772089,
- 2130772090,
- 2130772091,
- 2130772092,
- 2130772093,
- 2130772094,
- 2130772095,
- 2130772096,
- 2130772097,
- 2130772098,
- 2130772099,
- 2130772100,
- 2130772101,
- 2130772102,
- 2130772103,
- 2130772104,
- 2130772105,
- 2130772106,
- 2130772107,
- 2130772108,
- 2130772109,
- 2130772110,
- 2130772111,
- 2130772112,
- 2130772113,
- 2130772114,
- 2130772115,
- 2130772116,
- 2130772117,
- 2130772118,
- 2130772119,
- 2130772120,
- 2130772121,
- 2130772122,
- 2130772123,
- 2130772124,
- 2130772125,
- 2130772126,
- 2130772127,
- 2130772128,
- 2130772129,
- 2130772130,
- 2130772131,
- 2130772132,
- 2130772133,
- 2130772134,
- 2130772135,
- 2130772136};
-
- // aapt resource value: 23
- public static int AppCompatTheme_actionBarDivider = 23;
-
- // aapt resource value: 24
- public static int AppCompatTheme_actionBarItemBackground = 24;
-
- // aapt resource value: 17
- public static int AppCompatTheme_actionBarPopupTheme = 17;
-
- // aapt resource value: 22
- public static int AppCompatTheme_actionBarSize = 22;
-
- // aapt resource value: 19
- public static int AppCompatTheme_actionBarSplitStyle = 19;
-
- // aapt resource value: 18
- public static int AppCompatTheme_actionBarStyle = 18;
-
- // aapt resource value: 13
- public static int AppCompatTheme_actionBarTabBarStyle = 13;
-
- // aapt resource value: 12
- public static int AppCompatTheme_actionBarTabStyle = 12;
-
- // aapt resource value: 14
- public static int AppCompatTheme_actionBarTabTextStyle = 14;
-
- // aapt resource value: 20
- public static int AppCompatTheme_actionBarTheme = 20;
-
- // aapt resource value: 21
- public static int AppCompatTheme_actionBarWidgetTheme = 21;
-
- // aapt resource value: 50
- public static int AppCompatTheme_actionButtonStyle = 50;
-
- // aapt resource value: 46
- public static int AppCompatTheme_actionDropDownStyle = 46;
-
- // aapt resource value: 25
- public static int AppCompatTheme_actionMenuTextAppearance = 25;
-
- // aapt resource value: 26
- public static int AppCompatTheme_actionMenuTextColor = 26;
-
- // aapt resource value: 29
- public static int AppCompatTheme_actionModeBackground = 29;
-
- // aapt resource value: 28
- public static int AppCompatTheme_actionModeCloseButtonStyle = 28;
-
- // aapt resource value: 31
- public static int AppCompatTheme_actionModeCloseDrawable = 31;
-
- // aapt resource value: 33
- public static int AppCompatTheme_actionModeCopyDrawable = 33;
-
- // aapt resource value: 32
- public static int AppCompatTheme_actionModeCutDrawable = 32;
-
- // aapt resource value: 37
- public static int AppCompatTheme_actionModeFindDrawable = 37;
-
- // aapt resource value: 34
- public static int AppCompatTheme_actionModePasteDrawable = 34;
-
- // aapt resource value: 39
- public static int AppCompatTheme_actionModePopupWindowStyle = 39;
-
- // aapt resource value: 35
- public static int AppCompatTheme_actionModeSelectAllDrawable = 35;
-
- // aapt resource value: 36
- public static int AppCompatTheme_actionModeShareDrawable = 36;
-
- // aapt resource value: 30
- public static int AppCompatTheme_actionModeSplitBackground = 30;
-
- // aapt resource value: 27
- public static int AppCompatTheme_actionModeStyle = 27;
-
- // aapt resource value: 38
- public static int AppCompatTheme_actionModeWebSearchDrawable = 38;
-
- // aapt resource value: 15
- public static int AppCompatTheme_actionOverflowButtonStyle = 15;
-
- // aapt resource value: 16
- public static int AppCompatTheme_actionOverflowMenuStyle = 16;
-
- // aapt resource value: 58
- public static int AppCompatTheme_activityChooserViewStyle = 58;
-
- // aapt resource value: 95
- public static int AppCompatTheme_alertDialogButtonGroupStyle = 95;
-
- // aapt resource value: 96
- public static int AppCompatTheme_alertDialogCenterButtons = 96;
-
- // aapt resource value: 94
- public static int AppCompatTheme_alertDialogStyle = 94;
-
- // aapt resource value: 97
- public static int AppCompatTheme_alertDialogTheme = 97;
-
- // aapt resource value: 1
- public static int AppCompatTheme_android_windowAnimationStyle = 1;
-
- // aapt resource value: 0
- public static int AppCompatTheme_android_windowIsFloating = 0;
-
- // aapt resource value: 102
- public static int AppCompatTheme_autoCompleteTextViewStyle = 102;
-
- // aapt resource value: 55
- public static int AppCompatTheme_borderlessButtonStyle = 55;
-
- // aapt resource value: 52
- public static int AppCompatTheme_buttonBarButtonStyle = 52;
-
- // aapt resource value: 100
- public static int AppCompatTheme_buttonBarNegativeButtonStyle = 100;
-
- // aapt resource value: 101
- public static int AppCompatTheme_buttonBarNeutralButtonStyle = 101;
-
- // aapt resource value: 99
- public static int AppCompatTheme_buttonBarPositiveButtonStyle = 99;
-
- // aapt resource value: 51
- public static int AppCompatTheme_buttonBarStyle = 51;
-
- // aapt resource value: 103
- public static int AppCompatTheme_buttonStyle = 103;
-
- // aapt resource value: 104
- public static int AppCompatTheme_buttonStyleSmall = 104;
-
- // aapt resource value: 105
- public static int AppCompatTheme_checkboxStyle = 105;
-
- // aapt resource value: 106
- public static int AppCompatTheme_checkedTextViewStyle = 106;
-
- // aapt resource value: 86
- public static int AppCompatTheme_colorAccent = 86;
-
- // aapt resource value: 93
- public static int AppCompatTheme_colorBackgroundFloating = 93;
-
- // aapt resource value: 90
- public static int AppCompatTheme_colorButtonNormal = 90;
-
- // aapt resource value: 88
- public static int AppCompatTheme_colorControlActivated = 88;
-
- // aapt resource value: 89
- public static int AppCompatTheme_colorControlHighlight = 89;
-
- // aapt resource value: 87
- public static int AppCompatTheme_colorControlNormal = 87;
-
- // aapt resource value: 118
- public static int AppCompatTheme_colorError = 118;
-
- // aapt resource value: 84
- public static int AppCompatTheme_colorPrimary = 84;
-
- // aapt resource value: 85
- public static int AppCompatTheme_colorPrimaryDark = 85;
-
- // aapt resource value: 91
- public static int AppCompatTheme_colorSwitchThumbNormal = 91;
-
- // aapt resource value: 92
- public static int AppCompatTheme_controlBackground = 92;
-
- // aapt resource value: 44
- public static int AppCompatTheme_dialogPreferredPadding = 44;
-
- // aapt resource value: 43
- public static int AppCompatTheme_dialogTheme = 43;
-
- // aapt resource value: 57
- public static int AppCompatTheme_dividerHorizontal = 57;
-
- // aapt resource value: 56
- public static int AppCompatTheme_dividerVertical = 56;
-
- // aapt resource value: 75
- public static int AppCompatTheme_dropDownListViewStyle = 75;
-
- // aapt resource value: 47
- public static int AppCompatTheme_dropdownListPreferredItemHeight = 47;
-
- // aapt resource value: 64
- public static int AppCompatTheme_editTextBackground = 64;
-
- // aapt resource value: 63
- public static int AppCompatTheme_editTextColor = 63;
-
- // aapt resource value: 107
- public static int AppCompatTheme_editTextStyle = 107;
-
- // aapt resource value: 49
- public static int AppCompatTheme_homeAsUpIndicator = 49;
-
- // aapt resource value: 65
- public static int AppCompatTheme_imageButtonStyle = 65;
-
- // aapt resource value: 83
- public static int AppCompatTheme_listChoiceBackgroundIndicator = 83;
-
- // aapt resource value: 45
- public static int AppCompatTheme_listDividerAlertDialog = 45;
-
- // aapt resource value: 115
- public static int AppCompatTheme_listMenuViewStyle = 115;
-
- // aapt resource value: 76
- public static int AppCompatTheme_listPopupWindowStyle = 76;
-
- // aapt resource value: 70
- public static int AppCompatTheme_listPreferredItemHeight = 70;
-
- // aapt resource value: 72
- public static int AppCompatTheme_listPreferredItemHeightLarge = 72;
-
- // aapt resource value: 71
- public static int AppCompatTheme_listPreferredItemHeightSmall = 71;
-
- // aapt resource value: 73
- public static int AppCompatTheme_listPreferredItemPaddingLeft = 73;
-
- // aapt resource value: 74
- public static int AppCompatTheme_listPreferredItemPaddingRight = 74;
-
- // aapt resource value: 80
- public static int AppCompatTheme_panelBackground = 80;
-
- // aapt resource value: 82
- public static int AppCompatTheme_panelMenuListTheme = 82;
-
- // aapt resource value: 81
- public static int AppCompatTheme_panelMenuListWidth = 81;
-
- // aapt resource value: 61
- public static int AppCompatTheme_popupMenuStyle = 61;
-
- // aapt resource value: 62
- public static int AppCompatTheme_popupWindowStyle = 62;
-
- // aapt resource value: 108
- public static int AppCompatTheme_radioButtonStyle = 108;
-
- // aapt resource value: 109
- public static int AppCompatTheme_ratingBarStyle = 109;
-
- // aapt resource value: 110
- public static int AppCompatTheme_ratingBarStyleIndicator = 110;
-
- // aapt resource value: 111
- public static int AppCompatTheme_ratingBarStyleSmall = 111;
-
- // aapt resource value: 69
- public static int AppCompatTheme_searchViewStyle = 69;
-
- // aapt resource value: 112
- public static int AppCompatTheme_seekBarStyle = 112;
-
- // aapt resource value: 53
- public static int AppCompatTheme_selectableItemBackground = 53;
-
- // aapt resource value: 54
- public static int AppCompatTheme_selectableItemBackgroundBorderless = 54;
-
- // aapt resource value: 48
- public static int AppCompatTheme_spinnerDropDownItemStyle = 48;
-
- // aapt resource value: 113
- public static int AppCompatTheme_spinnerStyle = 113;
-
- // aapt resource value: 114
- public static int AppCompatTheme_switchStyle = 114;
-
- // aapt resource value: 40
- public static int AppCompatTheme_textAppearanceLargePopupMenu = 40;
-
- // aapt resource value: 77
- public static int AppCompatTheme_textAppearanceListItem = 77;
-
- // aapt resource value: 78
- public static int AppCompatTheme_textAppearanceListItemSecondary = 78;
-
- // aapt resource value: 79
- public static int AppCompatTheme_textAppearanceListItemSmall = 79;
-
- // aapt resource value: 42
- public static int AppCompatTheme_textAppearancePopupMenuHeader = 42;
-
- // aapt resource value: 67
- public static int AppCompatTheme_textAppearanceSearchResultSubtitle = 67;
-
- // aapt resource value: 66
- public static int AppCompatTheme_textAppearanceSearchResultTitle = 66;
-
- // aapt resource value: 41
- public static int AppCompatTheme_textAppearanceSmallPopupMenu = 41;
-
- // aapt resource value: 98
- public static int AppCompatTheme_textColorAlertDialogListItem = 98;
-
- // aapt resource value: 68
- public static int AppCompatTheme_textColorSearchUrl = 68;
-
- // aapt resource value: 60
- public static int AppCompatTheme_toolbarNavigationButtonStyle = 60;
-
- // aapt resource value: 59
- public static int AppCompatTheme_toolbarStyle = 59;
-
- // aapt resource value: 117
- public static int AppCompatTheme_tooltipForegroundColor = 117;
-
- // aapt resource value: 116
- public static int AppCompatTheme_tooltipFrameBackground = 116;
-
- // aapt resource value: 2
- public static int AppCompatTheme_windowActionBar = 2;
-
- // aapt resource value: 4
- public static int AppCompatTheme_windowActionBarOverlay = 4;
-
- // aapt resource value: 5
- public static int AppCompatTheme_windowActionModeOverlay = 5;
-
- // aapt resource value: 9
- public static int AppCompatTheme_windowFixedHeightMajor = 9;
-
- // aapt resource value: 7
- public static int AppCompatTheme_windowFixedHeightMinor = 7;
-
- // aapt resource value: 6
- public static int AppCompatTheme_windowFixedWidthMajor = 6;
-
- // aapt resource value: 8
- public static int AppCompatTheme_windowFixedWidthMinor = 8;
-
- // aapt resource value: 10
- public static int AppCompatTheme_windowMinWidthMajor = 10;
-
- // aapt resource value: 11
- public static int AppCompatTheme_windowMinWidthMinor = 11;
-
- // aapt resource value: 3
- public static int AppCompatTheme_windowNoTitle = 3;
-
- public static int[] ButtonBarLayout = new int[] {
- 2130772137};
-
- // aapt resource value: 0
- public static int ButtonBarLayout_allowStacking = 0;
-
- public static int[] ColorStateListItem = new int[] {
- 16843173,
- 16843551,
- 2130772138};
-
- // aapt resource value: 2
- public static int ColorStateListItem_alpha = 2;
-
- // aapt resource value: 1
- public static int ColorStateListItem_android_alpha = 1;
-
- // aapt resource value: 0
- public static int ColorStateListItem_android_color = 0;
-
- public static int[] CompoundButton = new int[] {
- 16843015,
- 2130772139,
- 2130772140};
-
- // aapt resource value: 0
- public static int CompoundButton_android_button = 0;
-
- // aapt resource value: 1
- public static int CompoundButton_buttonTint = 1;
-
- // aapt resource value: 2
- public static int CompoundButton_buttonTintMode = 2;
-
- public static int[] DrawerArrowToggle = new int[] {
- 2130772141,
- 2130772142,
- 2130772143,
- 2130772144,
- 2130772145,
- 2130772146,
- 2130772147,
- 2130772148};
-
- // aapt resource value: 4
- public static int DrawerArrowToggle_arrowHeadLength = 4;
-
- // aapt resource value: 5
- public static int DrawerArrowToggle_arrowShaftLength = 5;
-
- // aapt resource value: 6
- public static int DrawerArrowToggle_barLength = 6;
-
- // aapt resource value: 0
- public static int DrawerArrowToggle_color = 0;
-
- // aapt resource value: 2
- public static int DrawerArrowToggle_drawableSize = 2;
-
- // aapt resource value: 3
- public static int DrawerArrowToggle_gapBetweenBars = 3;
-
- // aapt resource value: 1
- public static int DrawerArrowToggle_spinBars = 1;
-
- // aapt resource value: 7
- public static int DrawerArrowToggle_thickness = 7;
-
- public static int[] FontFamily = new int[] {
- 2130772214,
- 2130772215,
- 2130772216,
- 2130772217,
- 2130772218,
- 2130772219};
-
- // aapt resource value: 0
- public static int FontFamily_fontProviderAuthority = 0;
-
- // aapt resource value: 3
- public static int FontFamily_fontProviderCerts = 3;
-
- // aapt resource value: 4
- public static int FontFamily_fontProviderFetchStrategy = 4;
-
- // aapt resource value: 5
- public static int FontFamily_fontProviderFetchTimeout = 5;
-
- // aapt resource value: 1
- public static int FontFamily_fontProviderPackage = 1;
-
- // aapt resource value: 2
- public static int FontFamily_fontProviderQuery = 2;
-
- public static int[] FontFamilyFont = new int[] {
- 16844082,
- 16844083,
- 16844095,
- 2130772220,
- 2130772221,
- 2130772222};
-
- // aapt resource value: 0
- public static int FontFamilyFont_android_font = 0;
-
- // aapt resource value: 2
- public static int FontFamilyFont_android_fontStyle = 2;
-
- // aapt resource value: 1
- public static int FontFamilyFont_android_fontWeight = 1;
-
- // aapt resource value: 4
- public static int FontFamilyFont_font = 4;
-
- // aapt resource value: 3
- public static int FontFamilyFont_fontStyle = 3;
-
- // aapt resource value: 5
- public static int FontFamilyFont_fontWeight = 5;
-
- public static int[] LinearLayoutCompat = new int[] {
- 16842927,
- 16842948,
- 16843046,
- 16843047,
- 16843048,
- 2130771979,
- 2130772149,
- 2130772150,
- 2130772151};
-
- // aapt resource value: 2
- public static int LinearLayoutCompat_android_baselineAligned = 2;
-
- // aapt resource value: 3
- public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
-
- // aapt resource value: 0
- public static int LinearLayoutCompat_android_gravity = 0;
-
- // aapt resource value: 1
- public static int LinearLayoutCompat_android_orientation = 1;
-
- // aapt resource value: 4
- public static int LinearLayoutCompat_android_weightSum = 4;
-
- // aapt resource value: 5
- public static int LinearLayoutCompat_divider = 5;
-
- // aapt resource value: 8
- public static int LinearLayoutCompat_dividerPadding = 8;
-
- // aapt resource value: 6
- public static int LinearLayoutCompat_measureWithLargestChild = 6;
-
- // aapt resource value: 7
- public static int LinearLayoutCompat_showDividers = 7;
-
- public static int[] LinearLayoutCompat_Layout = new int[] {
- 16842931,
- 16842996,
- 16842997,
- 16843137};
-
- // aapt resource value: 0
- public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
-
- // aapt resource value: 2
- public static int LinearLayoutCompat_Layout_android_layout_height = 2;
-
- // aapt resource value: 3
- public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
-
- // aapt resource value: 1
- public static int LinearLayoutCompat_Layout_android_layout_width = 1;
-
- public static int[] ListPopupWindow = new int[] {
- 16843436,
- 16843437};
-
- // aapt resource value: 0
- public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
-
- // aapt resource value: 1
- public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
-
- public static int[] MenuGroup = new int[] {
- 16842766,
- 16842960,
- 16843156,
- 16843230,
- 16843231,
- 16843232};
-
- // aapt resource value: 5
- public static int MenuGroup_android_checkableBehavior = 5;
-
- // aapt resource value: 0
- public static int MenuGroup_android_enabled = 0;
-
- // aapt resource value: 1
- public static int MenuGroup_android_id = 1;
-
- // aapt resource value: 3
- public static int MenuGroup_android_menuCategory = 3;
-
- // aapt resource value: 4
- public static int MenuGroup_android_orderInCategory = 4;
-
- // aapt resource value: 2
- public static int MenuGroup_android_visible = 2;
-
- public static int[] MenuItem = new int[] {
- 16842754,
- 16842766,
- 16842960,
- 16843014,
- 16843156,
- 16843230,
- 16843231,
- 16843233,
- 16843234,
- 16843235,
- 16843236,
- 16843237,
- 16843375,
- 2130772152,
- 2130772153,
- 2130772154,
- 2130772155,
- 2130772156,
- 2130772157,
- 2130772158,
- 2130772159,
- 2130772160,
- 2130772161};
-
- // aapt resource value: 16
- public static int MenuItem_actionLayout = 16;
-
- // aapt resource value: 18
- public static int MenuItem_actionProviderClass = 18;
-
- // aapt resource value: 17
- public static int MenuItem_actionViewClass = 17;
-
- // aapt resource value: 13
- public static int MenuItem_alphabeticModifiers = 13;
-
- // aapt resource value: 9
- public static int MenuItem_android_alphabeticShortcut = 9;
-
- // aapt resource value: 11
- public static int MenuItem_android_checkable = 11;
-
- // aapt resource value: 3
- public static int MenuItem_android_checked = 3;
-
- // aapt resource value: 1
- public static int MenuItem_android_enabled = 1;
-
- // aapt resource value: 0
- public static int MenuItem_android_icon = 0;
-
- // aapt resource value: 2
- public static int MenuItem_android_id = 2;
-
- // aapt resource value: 5
- public static int MenuItem_android_menuCategory = 5;
-
- // aapt resource value: 10
- public static int MenuItem_android_numericShortcut = 10;
-
- // aapt resource value: 12
- public static int MenuItem_android_onClick = 12;
-
- // aapt resource value: 6
- public static int MenuItem_android_orderInCategory = 6;
-
- // aapt resource value: 7
- public static int MenuItem_android_title = 7;
-
- // aapt resource value: 8
- public static int MenuItem_android_titleCondensed = 8;
-
- // aapt resource value: 4
- public static int MenuItem_android_visible = 4;
-
- // aapt resource value: 19
- public static int MenuItem_contentDescription = 19;
-
- // aapt resource value: 21
- public static int MenuItem_iconTint = 21;
-
- // aapt resource value: 22
- public static int MenuItem_iconTintMode = 22;
-
- // aapt resource value: 14
- public static int MenuItem_numericModifiers = 14;
-
- // aapt resource value: 15
- public static int MenuItem_showAsAction = 15;
-
- // aapt resource value: 20
- public static int MenuItem_tooltipText = 20;
-
- public static int[] MenuView = new int[] {
- 16842926,
- 16843052,
- 16843053,
- 16843054,
- 16843055,
- 16843056,
- 16843057,
- 2130772162,
- 2130772163};
-
- // aapt resource value: 4
- public static int MenuView_android_headerBackground = 4;
-
- // aapt resource value: 2
- public static int MenuView_android_horizontalDivider = 2;
-
- // aapt resource value: 5
- public static int MenuView_android_itemBackground = 5;
-
- // aapt resource value: 6
- public static int MenuView_android_itemIconDisabledAlpha = 6;
-
- // aapt resource value: 1
- public static int MenuView_android_itemTextAppearance = 1;
-
- // aapt resource value: 3
- public static int MenuView_android_verticalDivider = 3;
-
- // aapt resource value: 0
- public static int MenuView_android_windowAnimationStyle = 0;
-
- // aapt resource value: 7
- public static int MenuView_preserveIconSpacing = 7;
-
- // aapt resource value: 8
- public static int MenuView_subMenuArrow = 8;
-
- public static int[] PopupWindow = new int[] {
- 16843126,
- 16843465,
- 2130772164};
-
- // aapt resource value: 1
- public static int PopupWindow_android_popupAnimationStyle = 1;
-
- // aapt resource value: 0
- public static int PopupWindow_android_popupBackground = 0;
-
- // aapt resource value: 2
- public static int PopupWindow_overlapAnchor = 2;
-
- public static int[] PopupWindowBackgroundState = new int[] {
- 2130772165};
-
- // aapt resource value: 0
- public static int PopupWindowBackgroundState_state_above_anchor = 0;
-
- public static int[] RecycleListView = new int[] {
- 2130772166,
- 2130772167};
-
- // aapt resource value: 0
- public static int RecycleListView_paddingBottomNoButtons = 0;
-
- // aapt resource value: 1
- public static int RecycleListView_paddingTopNoTitle = 1;
-
- public static int[] SearchView = new int[] {
- 16842970,
- 16843039,
- 16843296,
- 16843364,
- 2130772168,
- 2130772169,
- 2130772170,
- 2130772171,
- 2130772172,
- 2130772173,
- 2130772174,
- 2130772175,
- 2130772176,
- 2130772177,
- 2130772178,
- 2130772179,
- 2130772180};
-
- // aapt resource value: 0
- public static int SearchView_android_focusable = 0;
-
- // aapt resource value: 3
- public static int SearchView_android_imeOptions = 3;
-
- // aapt resource value: 2
- public static int SearchView_android_inputType = 2;
-
- // aapt resource value: 1
- public static int SearchView_android_maxWidth = 1;
-
- // aapt resource value: 8
- public static int SearchView_closeIcon = 8;
-
- // aapt resource value: 13
- public static int SearchView_commitIcon = 13;
-
- // aapt resource value: 7
- public static int SearchView_defaultQueryHint = 7;
-
- // aapt resource value: 9
- public static int SearchView_goIcon = 9;
-
- // aapt resource value: 5
- public static int SearchView_iconifiedByDefault = 5;
-
- // aapt resource value: 4
- public static int SearchView_layout = 4;
-
- // aapt resource value: 15
- public static int SearchView_queryBackground = 15;
-
- // aapt resource value: 6
- public static int SearchView_queryHint = 6;
-
- // aapt resource value: 11
- public static int SearchView_searchHintIcon = 11;
-
- // aapt resource value: 10
- public static int SearchView_searchIcon = 10;
-
- // aapt resource value: 16
- public static int SearchView_submitBackground = 16;
-
- // aapt resource value: 14
- public static int SearchView_suggestionRowLayout = 14;
-
- // aapt resource value: 12
- public static int SearchView_voiceIcon = 12;
-
- public static int[] Spinner = new int[] {
- 16842930,
- 16843126,
- 16843131,
- 16843362,
- 2130771997};
-
- // aapt resource value: 3
- public static int Spinner_android_dropDownWidth = 3;
-
- // aapt resource value: 0
- public static int Spinner_android_entries = 0;
-
- // aapt resource value: 1
- public static int Spinner_android_popupBackground = 1;
-
- // aapt resource value: 2
- public static int Spinner_android_prompt = 2;
-
- // aapt resource value: 4
- public static int Spinner_popupTheme = 4;
-
- public static int[] SwitchCompat = new int[] {
- 16843044,
- 16843045,
- 16843074,
- 2130772181,
- 2130772182,
- 2130772183,
- 2130772184,
- 2130772185,
- 2130772186,
- 2130772187,
- 2130772188,
- 2130772189,
- 2130772190,
- 2130772191};
-
- // aapt resource value: 1
- public static int SwitchCompat_android_textOff = 1;
-
- // aapt resource value: 0
- public static int SwitchCompat_android_textOn = 0;
-
- // aapt resource value: 2
- public static int SwitchCompat_android_thumb = 2;
-
- // aapt resource value: 13
- public static int SwitchCompat_showText = 13;
-
- // aapt resource value: 12
- public static int SwitchCompat_splitTrack = 12;
-
- // aapt resource value: 10
- public static int SwitchCompat_switchMinWidth = 10;
-
- // aapt resource value: 11
- public static int SwitchCompat_switchPadding = 11;
-
- // aapt resource value: 9
- public static int SwitchCompat_switchTextAppearance = 9;
-
- // aapt resource value: 8
- public static int SwitchCompat_thumbTextPadding = 8;
-
- // aapt resource value: 3
- public static int SwitchCompat_thumbTint = 3;
-
- // aapt resource value: 4
- public static int SwitchCompat_thumbTintMode = 4;
-
- // aapt resource value: 5
- public static int SwitchCompat_track = 5;
-
- // aapt resource value: 6
- public static int SwitchCompat_trackTint = 6;
-
- // aapt resource value: 7
- public static int SwitchCompat_trackTintMode = 7;
-
- public static int[] TextAppearance = new int[] {
- 16842901,
- 16842902,
- 16842903,
- 16842904,
- 16842906,
- 16842907,
- 16843105,
- 16843106,
- 16843107,
- 16843108,
- 16843692,
- 2130772013,
- 2130772019};
-
- // aapt resource value: 10
- public static int TextAppearance_android_fontFamily = 10;
-
- // aapt resource value: 6
- public static int TextAppearance_android_shadowColor = 6;
-
- // aapt resource value: 7
- public static int TextAppearance_android_shadowDx = 7;
-
- // aapt resource value: 8
- public static int TextAppearance_android_shadowDy = 8;
-
- // aapt resource value: 9
- public static int TextAppearance_android_shadowRadius = 9;
-
- // aapt resource value: 3
- public static int TextAppearance_android_textColor = 3;
-
- // aapt resource value: 4
- public static int TextAppearance_android_textColorHint = 4;
-
- // aapt resource value: 5
- public static int TextAppearance_android_textColorLink = 5;
-
- // aapt resource value: 0
- public static int TextAppearance_android_textSize = 0;
-
- // aapt resource value: 2
- public static int TextAppearance_android_textStyle = 2;
-
- // aapt resource value: 1
- public static int TextAppearance_android_typeface = 1;
-
- // aapt resource value: 12
- public static int TextAppearance_fontFamily = 12;
-
- // aapt resource value: 11
- public static int TextAppearance_textAllCaps = 11;
-
- public static int[] Toolbar = new int[] {
- 16842927,
- 16843072,
- 2130771971,
- 2130771974,
- 2130771978,
- 2130771990,
- 2130771991,
- 2130771992,
- 2130771993,
- 2130771994,
- 2130771995,
- 2130771997,
- 2130772192,
- 2130772193,
- 2130772194,
- 2130772195,
- 2130772196,
- 2130772197,
- 2130772198,
- 2130772199,
- 2130772200,
- 2130772201,
- 2130772202,
- 2130772203,
- 2130772204,
- 2130772205,
- 2130772206,
- 2130772207,
- 2130772208};
-
- // aapt resource value: 0
- public static int Toolbar_android_gravity = 0;
-
- // aapt resource value: 1
- public static int Toolbar_android_minHeight = 1;
-
- // aapt resource value: 21
- public static int Toolbar_buttonGravity = 21;
-
- // aapt resource value: 23
- public static int Toolbar_collapseContentDescription = 23;
-
- // aapt resource value: 22
- public static int Toolbar_collapseIcon = 22;
-
- // aapt resource value: 6
- public static int Toolbar_contentInsetEnd = 6;
-
- // aapt resource value: 10
- public static int Toolbar_contentInsetEndWithActions = 10;
-
- // aapt resource value: 7
- public static int Toolbar_contentInsetLeft = 7;
-
- // aapt resource value: 8
- public static int Toolbar_contentInsetRight = 8;
-
- // aapt resource value: 5
- public static int Toolbar_contentInsetStart = 5;
-
- // aapt resource value: 9
- public static int Toolbar_contentInsetStartWithNavigation = 9;
-
- // aapt resource value: 4
- public static int Toolbar_logo = 4;
-
- // aapt resource value: 26
- public static int Toolbar_logoDescription = 26;
-
- // aapt resource value: 20
- public static int Toolbar_maxButtonHeight = 20;
-
- // aapt resource value: 25
- public static int Toolbar_navigationContentDescription = 25;
-
- // aapt resource value: 24
- public static int Toolbar_navigationIcon = 24;
-
- // aapt resource value: 11
- public static int Toolbar_popupTheme = 11;
-
- // aapt resource value: 3
- public static int Toolbar_subtitle = 3;
-
- // aapt resource value: 13
- public static int Toolbar_subtitleTextAppearance = 13;
-
- // aapt resource value: 28
- public static int Toolbar_subtitleTextColor = 28;
-
- // aapt resource value: 2
- public static int Toolbar_title = 2;
-
- // aapt resource value: 14
- public static int Toolbar_titleMargin = 14;
-
- // aapt resource value: 18
- public static int Toolbar_titleMarginBottom = 18;
-
- // aapt resource value: 16
- public static int Toolbar_titleMarginEnd = 16;
-
- // aapt resource value: 15
- public static int Toolbar_titleMarginStart = 15;
-
- // aapt resource value: 17
- public static int Toolbar_titleMarginTop = 17;
-
- // aapt resource value: 19
- public static int Toolbar_titleMargins = 19;
-
- // aapt resource value: 12
- public static int Toolbar_titleTextAppearance = 12;
-
- // aapt resource value: 27
- public static int Toolbar_titleTextColor = 27;
-
- public static int[] View = new int[] {
- 16842752,
- 16842970,
- 2130772209,
- 2130772210,
- 2130772211};
-
- // aapt resource value: 1
- public static int View_android_focusable = 1;
-
- // aapt resource value: 0
- public static int View_android_theme = 0;
-
- // aapt resource value: 3
- public static int View_paddingEnd = 3;
-
- // aapt resource value: 2
- public static int View_paddingStart = 2;
-
- // aapt resource value: 4
- public static int View_theme = 4;
-
- public static int[] ViewBackgroundHelper = new int[] {
- 16842964,
- 2130772212,
- 2130772213};
-
- // aapt resource value: 0
- public static int ViewBackgroundHelper_android_background = 0;
-
- // aapt resource value: 1
- public static int ViewBackgroundHelper_backgroundTint = 1;
-
- // aapt resource value: 2
- public static int ViewBackgroundHelper_backgroundTintMode = 2;
-
- public static int[] ViewStubCompat = new int[] {
- 16842960,
- 16842994,
- 16842995};
-
- // aapt resource value: 0
- public static int ViewStubCompat_android_id = 0;
-
- // aapt resource value: 2
- public static int ViewStubCompat_android_inflatedId = 2;
-
- // aapt resource value: 1
- public static int ViewStubCompat_android_layout = 1;
-
- static Styleable()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Styleable()
- {
- }
- }
- }
-}
-#pragma warning restore 1591
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/values/Strings.xml b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/values/Strings.xml
deleted file mode 100644
index cc0130f..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Android/Resources/values/Strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
- Hello World, Click Me!
- ChaiFoxes.FMODAudio.Android
-
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/App.config b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/App.config
index 33809bd..4316910 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/App.config
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/App.config
@@ -1,5 +1,7 @@
-
-
+
+
+
+
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.csproj b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.csproj
index b71f313..3c2efa0 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.csproj
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.csproj
@@ -1,64 +1,30 @@
-
-
-
+
- Debug
- AnyCPU
- {F712BF21-58F9-448C-BEF5-286CEC991EBB}
- Library
- Properties
- ChaiFoxes.FMODAudio
- ChaiFoxes.FMODAudio.Desktop
- v4.5
- 512
- true
-
+ netstandard2.0;net452
+ 1591;1573
+ Monogame, FMOD, Audio, Music, Windows, Linux
+ UNITY_2017_4_OR_NEWER
+ ..\bin\$(Configuration)\$(AssemblyName)\
+ $(OutputPath)$(AssemblyName).xml
+ false
+ icon.png
+ ..\..\Release\
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- bin\Debug\ChaiFoxes.FMODAudio.Desktop.xml
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\ChaiFoxes.FMODAudio.Desktop.xml
-
-
-
- False
- ..\..\..\..\..\Program Files (x86)\MonoGame\v3.0\Assemblies\DesktopGL\MonoGame.Framework.dll
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
- Designer
+
+ True
+
+
+
+ True
+
-
+
+ All
+
-
-
-
\ No newline at end of file
+
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.nuspec b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.nuspec
deleted file mode 100644
index 2264aa0..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/ChaiFoxes.FMODAudio.Desktop.nuspec
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- ChaiFoxes.FMODAudio.Desktop
- 1.0.3
- ChaiFoxes.FMODAudio.Desktop
- gn Fur
- Chai Foxes
- MPL-2.0
- https://github.com/gnFur/ChaiFoxes.FMODAudio
- https://raw.githubusercontent.com/gnFur/ChaiFoxes.FMODAudio/master/Icon/icon.png
- false
- FMOD library wrapper for Windows and Linux Monogame projects.
- Fixed streamed sounds crashing everything after GC.
- Copyright 2019
- fmod audio monogame windows linux
-
-
-
-
-
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/AudioMgr.Desktop.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/NativeLibraryLoader.cs
similarity index 56%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/AudioMgr.Desktop.cs
rename to ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/NativeLibraryLoader.cs
index 10bac1d..c13da69 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/AudioMgr.Desktop.cs
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Desktop/NativeLibraryLoader.cs
@@ -1,50 +1,46 @@
-using System;
+using System;
using System.IO;
using System.Runtime.InteropServices;
namespace ChaiFoxes.FMODAudio
{
- ///
/// Windows and Linux-specific part of an audio manager.
- ///
- public static partial class AudioMgr
+ public static class NativeLibraryLoader
{
-
[DllImport("kernel32.dll")]
- public static extern IntPtr LoadLibrary(string dllToLoad);
-
+ private static extern IntPtr LoadLibrary(string dllToLoad);
// NOTE: To make native libraries work on Linux, we also need entries in App.config.
[DllImport("libdl.so.2")]
- static extern IntPtr dlopen(string filename, int flags);
+ private static extern IntPtr dlopen(string filename, int flags);
private const int RTLD_LAZY = 0x0001;
-
+
///
/// Loads Windows or Linux native library.
///
- public static void LoadNativeLibrary()
+ public static void LoadNativeLibrary(string libName)
{
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
if (Environment.Is64BitProcess)
{
- LoadLibrary(Path.GetFullPath("x64/fmod.dll"));
+ LoadLibrary(Path.GetFullPath("x64/" + libName + ".dll"));
}
else
{
- LoadLibrary(Path.GetFullPath("x86/fmod.dll"));
+ LoadLibrary(Path.GetFullPath("x86/" + libName + ".dll"));
}
}
else
{
if (Environment.Is64BitProcess)
{
- dlopen(Path.GetFullPath("/x64/libfmod.so"), RTLD_LAZY);
+ dlopen(Path.GetFullPath("/x64/lib" + libName + ".so"), RTLD_LAZY);
}
else
{
- dlopen(Path.GetFullPath("/x86/libfmod.so"), RTLD_LAZY);
+ dlopen(Path.GetFullPath("/x86/lib" + libName + ".so"), RTLD_LAZY);
}
}
}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.projitems b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.projitems
new file mode 100644
index 0000000..82c16af
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.projitems
@@ -0,0 +1,47 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ true
+ b5933bd7-e07e-4eb2-99be-2814508425a1
+
+
+ ChaiFoxes.FMODAudio
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ \
+
+
+
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.shproj b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.shproj
similarity index 86%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.shproj
rename to ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.shproj
index 723a9d4..22e38e4 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.shproj
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChaiFoxes.FMODAudio.Shared.shproj
@@ -1,13 +1,13 @@
- 8d82e21d-b9ee-438b-a2ce-7b801bf712ea
+ b5933bd7-e07e-4eb2-99be-2814508425a1
14.0
-
+
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Channel.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Channel.cs
new file mode 100644
index 0000000..eeda96e
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Channel.cs
@@ -0,0 +1,427 @@
+using Microsoft.Xna.Framework;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio
+{
+ ///
+ /// FMOD sound channel wrapper. Takes horrible FMOD wrapper and makes it look pretty.
+ /// Basically, a playing sound instance.
+ ///
+ public struct Channel : IChannelControl
+ {
+ ///
+ /// FMOD channel object. Use it if you need full FMOD functionality.
+ ///
+ public readonly FMOD.Channel Native;
+
+ ///
+ /// Sound, from which this channel has been created.
+ ///
+ public Sound Sound
+ {
+ get
+ {
+ Native.getCurrentSound(out var sound);
+ sound.getUserData(out var ptr);
+ return Sound._linker.Get(ptr);
+ }
+ }
+
+
+ ///
+ /// Tells if channel is looping.
+ ///
+ public bool Looping
+ {
+ get
+ {
+ Native.getLoopCount(out var loops);
+ return (loops == -1);
+ }
+ set
+ {
+ if (value)
+ {
+ Loops = -1;
+ }
+ else
+ {
+ Loops = 0;
+ }
+ }
+ }
+
+ ///
+ /// Amount of loops.
+ /// > 0 - Specific count.
+ /// 0 - No loops.
+ /// -1 - Infinite loops.
+ ///
+ public int Loops
+ {
+ get
+ {
+ // Do you have some lööps, bröther?
+ Native.getLoopCount(out var loops);
+ return loops;
+ }
+ set
+ {
+ if (value == 0)
+ {
+ Mode = FMOD.MODE.LOOP_OFF;
+ }
+ else
+ {
+ Mode = FMOD.MODE.LOOP_NORMAL;
+ }
+
+ Native.setLoopCount(value);
+ }
+ }
+
+ ///
+ /// Sound pitch. Affects speed too.
+ /// 1 - Normal pitch.
+ /// More than 1 - Higher pitch.
+ /// Less than 1 - Lower pitch.
+ ///
+ public float Pitch
+ {
+ get
+ {
+ Native.getPitch(out var pitch);
+ return pitch;
+ }
+ set =>
+ Native.setPitch(value);
+ }
+
+ ///
+ /// Sound volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var volume);
+ return volume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ ///
+ /// Low pass filter. Makes sound muffled.
+ /// 1 - No filtering.
+ /// 0 - Full filtering.
+ ///
+ public float LowPass
+ {
+ get
+ {
+ Native.getLowPassGain(out var lowPassGain);
+ return lowPassGain;
+ }
+ set =>
+ Native.setLowPassGain(value);
+ }
+
+ ///
+ /// Sound mode. Mainly used for 3D sound.
+ ///
+ public FMOD.MODE Mode
+ {
+ get
+ {
+ Native.getMode(out FMOD.MODE mode);
+ return mode;
+ }
+ set =>
+ Native.setMode(value);
+ }
+
+
+ ///
+ /// If true, allows sound to be positioned in 3D space.
+ ///
+ public bool Is3D
+ {
+ get =>
+ (Mode & FMOD.MODE._3D) != 0;
+ set
+ {
+ if (value)
+ {
+ Mode = FMOD.MODE._3D;
+ }
+ else
+ {
+ Mode = FMOD.MODE._2D;
+ }
+ }
+ }
+
+ ///
+ /// Sound's position in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Position3D
+ {
+ get
+ {
+ Native.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
+ return pos.ToVector3();
+ }
+ set
+ {
+ var fmodPos = value.ToFmodVector();
+ var fmodVel = Velocity3D.ToFmodVector();
+ Native.set3DAttributes(ref fmodPos, ref fmodVel);
+ }
+ }
+
+ ///
+ /// Sound's velocity in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Velocity3D
+ {
+ get
+ {
+ Native.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
+ return vel.ToVector3();
+ }
+ set
+ {
+ var fmodPos = Position3D.ToFmodVector();
+ var fmodVel = value.ToFmodVector();
+ Native.set3DAttributes(ref fmodPos, ref fmodVel);
+ }
+ }
+
+ ///
+ /// Distance from the source where attenuation begins.
+ ///
+ public float MinDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return minDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(value, MaxDistance3D);
+ }
+
+ ///
+ /// Distance from the source where attenuation ends.
+ ///
+ public float MaxDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return maxDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(MinDistance3D, value);
+ }
+
+ ///
+ /// Tells if sound is playing.
+ ///
+ public bool IsPlaying
+ {
+ get
+ {
+ Native.isPlaying(out var isPlaying);
+ return isPlaying;
+ }
+ }
+
+ public bool Paused
+ {
+ get
+ {
+ Native.getPaused(out var paused);
+ return paused;
+ }
+ set =>
+ Native.setPaused(value);
+ }
+
+ public bool VolumeRamp
+ {
+ get
+ {
+ Native.getVolumeRamp(out var volumeRamp);
+ return volumeRamp;
+ }
+ set =>
+ Native.setVolumeRamp(value);
+ }
+
+ public float Audibility
+ {
+ get
+ {
+ Native.getAudibility(out var audibility);
+ return audibility;
+ }
+ }
+
+ public bool Mute
+ {
+ get
+ {
+ Native.getMute(out var mute);
+ return mute;
+ }
+ set =>
+ Native.setMute(value);
+ }
+
+ public float LowpassGain
+ {
+ get
+ {
+ Native.getLowPassGain(out var lowpassGain);
+ return lowpassGain;
+ }
+ set =>
+ Native.setLowPassGain(value);
+ }
+
+ public Vector3 ConeOrientation3D
+ {
+ get
+ {
+ Native.get3DConeOrientation(out var orientation);
+ return orientation.ToVector3();
+ }
+ set
+ {
+ var v = value.ToFmodVector();
+ Native.set3DConeOrientation(ref v);
+ }
+ }
+
+ public Occlusion3D Occlusion3D
+ {
+ get
+ {
+ var occlusion = new Occlusion3D();
+ Native.get3DOcclusion(out occlusion.DirectOcclusion, out occlusion.ReverbOcclusion);
+ return occlusion;
+ }
+ set =>
+ Native.set3DOcclusion(value.DirectOcclusion, value.ReverbOcclusion);
+ }
+
+ public float Spread3D
+ {
+ get
+ {
+ Native.get3DSpread(out var spread);
+ return spread;
+ }
+ set =>
+ Native.set3DSpread(value);
+ }
+
+ public float Level3D
+ {
+ get
+ {
+ Native.get3DLevel(out var level);
+ return level;
+ }
+ set =>
+ Native.set3DLevel(value);
+ }
+
+ public float DopplerLevel3D
+ {
+ get
+ {
+ Native.get3DDopplerLevel(out var doppler);
+ return doppler;
+ }
+ set =>
+ Native.set3DDopplerLevel(value);
+ }
+
+ public ConeSettings3D ConeSettings3D
+ {
+ get
+ {
+ var cone = new ConeSettings3D();
+ Native.get3DConeSettings(out cone.InsideConeAngle, out cone.OutsideVolume, out cone.OutsideVolume);
+ return cone;
+ }
+ set =>
+ Native.set3DConeSettings(value.InsideConeAngle, value.OutsideConeAngle, value.OutsideVolume);
+ }
+
+ public DistanceFilter3D DistanceFilter3D
+ {
+ get
+ {
+ var filter = new DistanceFilter3D();
+ Native.get3DDistanceFilter(out filter.Custom, out filter.CustomLevel, out filter.CenterFreqency);
+ return filter;
+ }
+ set =>
+ Native.set3DDistanceFilter(value.Custom, value.CustomLevel, value.CenterFreqency);
+ }
+
+
+ ///
+ /// Track position in milliseconds.
+ ///
+ public uint TrackPosition
+ {
+ get
+ {
+ Native.getPosition(out uint position, TrackPositionTimeunit);
+ return position;
+ }
+ set =>
+ Native.setPosition(value, TrackPositionTimeunit);
+ }
+
+ public FMOD.TIMEUNIT TrackPositionTimeunit;
+
+ internal Channel(Sound sound, FMOD.Channel channel)
+ : this(channel)
+ {
+ Loops = Sound.Loops;
+ Volume = Sound.Volume;
+ Pitch = Sound.Pitch;
+ LowPass = sound.LowPass;
+ Is3D = sound.Is3D;
+ Mode = sound.Mode;
+ Position3D = sound.Position3D;
+ Velocity3D = sound.Velocity3D;
+ }
+
+ internal Channel(FMOD.Channel channel)
+ {
+ Native = channel;
+ TrackPositionTimeunit = FMOD.TIMEUNIT.MS;
+ }
+
+ public void Pause() =>
+ Native.setPaused(true);
+
+ public void Resume() =>
+ Native.setPaused(false);
+
+ public void Stop() =>
+ Native.stop();
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChannelGroup.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChannelGroup.cs
new file mode 100644
index 0000000..0f908d6
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ChannelGroup.cs
@@ -0,0 +1,379 @@
+using Microsoft.Xna.Framework;
+using System;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public class ChannelGroup : IDisposable, IChannelControl
+ {
+ public readonly FMOD.ChannelGroup Native;
+
+ internal readonly PointerLinker _linker = new PointerLinker();
+
+ ///
+ /// Sound pitch. Affects speed too.
+ /// 1 - Normal pitch.
+ /// More than 1 - Higher pitch.
+ /// Less than 1 - Lower pitch.
+ ///
+ public float Pitch
+ {
+ get
+ {
+ Native.getPitch(out var pitch);
+ return pitch;
+ }
+ set =>
+ Native.setPitch(value);
+ }
+
+ ///
+ /// Sound volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var volume);
+ return volume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ ///
+ /// Low pass filter. Makes sound muffled.
+ /// 1 - No filtering.
+ /// 0 - Full filtering.
+ ///
+ public float LowPass
+ {
+ get
+ {
+ Native.getLowPassGain(out var lowPassGain);
+ return lowPassGain;
+ }
+ set =>
+ Native.setLowPassGain(value);
+ }
+
+ ///
+ /// Sound mode. Mainly used for 3D sound.
+ ///
+ public FMOD.MODE Mode
+ {
+ get
+ {
+ Native.getMode(out FMOD.MODE mode);
+ return mode;
+ }
+ set =>
+ Native.setMode(value);
+ }
+
+
+ ///
+ /// If true, allows sound to be positioned in 3D space.
+ ///
+ public bool Is3D
+ {
+ get =>
+ (Mode & FMOD.MODE._3D) != 0;
+ set
+ {
+ if (value)
+ {
+ Mode = FMOD.MODE._3D;
+ }
+ else
+ {
+ Mode = FMOD.MODE._2D;
+ }
+ }
+ }
+
+ ///
+ /// Sound's position in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Position3D
+ {
+ get
+ {
+ Native.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
+ return pos.ToVector3();
+ }
+ set
+ {
+ var fmodPos = value.ToFmodVector();
+ var fmodVel = Velocity3D.ToFmodVector();
+ Native.set3DAttributes(ref fmodPos, ref fmodVel);
+ }
+ }
+
+ ///
+ /// Sound's velocity in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Velocity3D
+ {
+ get
+ {
+ Native.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
+ return vel.ToVector3();
+ }
+ set
+ {
+ var fmodPos = Position3D.ToFmodVector();
+ var fmodVel = value.ToFmodVector();
+ Native.set3DAttributes(ref fmodPos, ref fmodVel);
+ }
+ }
+
+ ///
+ /// Distance from the source where attenuation begins.
+ ///
+ public float MinDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return minDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(value, MaxDistance3D);
+ }
+
+ ///
+ /// Distance from the source where attenuation ends.
+ ///
+ public float MaxDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return maxDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(MinDistance3D, value);
+ }
+
+ ///
+ /// Tells if sound is playing.
+ ///
+ public bool IsPlaying
+ {
+ get
+ {
+ Native.isPlaying(out var isPlaying);
+ return isPlaying;
+ }
+ }
+
+ public bool Paused
+ {
+ get
+ {
+ Native.getPaused(out var paused);
+ return paused;
+ }
+ set =>
+ Native.setPaused(value);
+ }
+
+ public bool VolumeRamp
+ {
+ get
+ {
+ Native.getVolumeRamp(out var volumeRamp);
+ return volumeRamp;
+ }
+ set =>
+ Native.setVolumeRamp(value);
+ }
+
+ public float Audibility
+ {
+ get
+ {
+ Native.getAudibility(out var audibility);
+ return audibility;
+ }
+ }
+
+ public bool Mute
+ {
+ get
+ {
+ Native.getMute(out var mute);
+ return mute;
+ }
+ set =>
+ Native.setMute(value);
+ }
+
+ public float LowpassGain
+ {
+ get
+ {
+ Native.getLowPassGain(out var lowpassGain);
+ return lowpassGain;
+ }
+ set =>
+ Native.setLowPassGain(value);
+ }
+
+ public Vector3 ConeOrientation3D
+ {
+ get
+ {
+ Native.get3DConeOrientation(out var orientation);
+ return orientation.ToVector3();
+ }
+ set
+ {
+ var v = value.ToFmodVector();
+ Native.set3DConeOrientation(ref v);
+ }
+ }
+
+ public Occlusion3D Occlusion3D
+ {
+ get
+ {
+ var occlusion = new Occlusion3D();
+ Native.get3DOcclusion(out occlusion.DirectOcclusion, out occlusion.ReverbOcclusion);
+ return occlusion;
+ }
+ set =>
+ Native.set3DOcclusion(value.DirectOcclusion, value.ReverbOcclusion);
+ }
+
+ public float Spread3D
+ {
+ get
+ {
+ Native.get3DSpread(out var spread);
+ return spread;
+ }
+ set =>
+ Native.set3DSpread(value);
+ }
+
+ public float Level3D
+ {
+ get
+ {
+ Native.get3DLevel(out var level);
+ return level;
+ }
+ set =>
+ Native.set3DLevel(value);
+ }
+
+ public float DopplerLevel3D
+ {
+ get
+ {
+ Native.get3DDopplerLevel(out var doppler);
+ return doppler;
+ }
+ set =>
+ Native.set3DDopplerLevel(value);
+ }
+
+ public ConeSettings3D ConeSettings3D
+ {
+ get
+ {
+ var cone = new ConeSettings3D();
+ Native.get3DConeSettings(out cone.InsideConeAngle, out cone.OutsideVolume, out cone.OutsideVolume);
+ return cone;
+ }
+ set =>
+ Native.set3DConeSettings(value.InsideConeAngle, value.OutsideConeAngle, value.OutsideVolume);
+ }
+
+ public DistanceFilter3D DistanceFilter3D
+ {
+ get
+ {
+ var filter = new DistanceFilter3D();
+ Native.get3DDistanceFilter(out filter.Custom, out filter.CustomLevel, out filter.CenterFreqency);
+ return filter;
+ }
+ set =>
+ Native.set3DDistanceFilter(value.Custom, value.CustomLevel, value.CenterFreqency);
+ }
+
+
+
+ // Nested channel groups.
+
+ public FMOD.DSPConnection AddNestedGroup(
+ ChannelGroup group,
+ bool propagateDspclock
+ )
+ {
+ Native.addGroup(group.Native, propagateDspclock, out var connection);
+ return connection;
+ }
+
+ public int NestedGroupsCount
+ {
+ get
+ {
+ Native.getNumGroups(out var count);
+ return count;
+ }
+ }
+
+ public ChannelGroup GetNestedGroup(int index)
+ {
+ Native.getGroup(index, out var group);
+ group.getUserData(out var ptr);
+ return _linker.Get(ptr);
+ }
+
+ public ChannelGroup getParentGroup()
+ {
+ Native.getParentGroup(out var sound);
+ sound.getUserData(out var ptr);
+ return _linker.Get(ptr);
+ }
+
+
+ public int ChannelsCount
+ {
+ get
+ {
+ Native.getNumChannels(out var count);
+ return count;
+ }
+ }
+
+ public Channel GetChannel(int index)
+ {
+ Native.getChannel(index, out var nativeChannel);
+ return new Channel(nativeChannel);
+ }
+
+ public ChannelGroup(string name)
+ {
+ CoreSystem.Native.createChannelGroup(name, out Native);
+
+ Native.setUserData(_linker.Add(this));
+ }
+
+ public void Stop() =>
+ Native.stop();
+
+ public void Dispose()
+ {
+ Native.getUserData(out var ptr);
+ _linker.Remove(ptr);
+
+ Native.release();
+ }
+ }
+
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ConeSettings3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ConeSettings3D.cs
new file mode 100644
index 0000000..3e6e514
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/ConeSettings3D.cs
@@ -0,0 +1,21 @@
+
+namespace ChaiFoxes.FMODAudio
+{
+ public struct ConeSettings3D
+ {
+ public float InsideConeAngle;
+ public float OutsideConeAngle;
+ public float OutsideVolume;
+
+ public ConeSettings3D(
+ float insideConeAngle,
+ float outsideConeAngle,
+ float outsideVolume
+ )
+ {
+ InsideConeAngle = insideConeAngle;
+ OutsideConeAngle = outsideConeAngle;
+ OutsideVolume = outsideVolume;
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/CoreSystem.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/CoreSystem.cs
new file mode 100644
index 0000000..c562936
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/CoreSystem.cs
@@ -0,0 +1,66 @@
+using System.Runtime.InteropServices;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio
+{
+ ///
+ /// Audio manager. Contains main audiosystem parameters.
+ ///
+ public static class CoreSystem
+ {
+ ///
+ /// Low level FMOD sound system.
+ ///
+ public static FMOD.System Native;
+
+ ///
+ /// Loads sound from file.
+ /// Use this function to load short sound effects.
+ ///
+ public static Sound LoadSound(string path)
+ {
+ var buffer = FileLoader.LoadFileAsBuffer(path);
+
+ var info = new FMOD.CREATESOUNDEXINFO();
+ info.length = (uint)buffer.Length;
+ info.cbsize = Marshal.SizeOf(info);
+
+ Native.createSound(
+ buffer,
+ FMOD.MODE.OPENMEMORY | FMOD.MODE.CREATESAMPLE,
+ ref info,
+ out FMOD.Sound newSound
+ );
+
+ return new Sound(newSound);
+ }
+
+ ///
+ /// Loads streamed sound stream from file.
+ /// Use this function to load music and long ambience tracks.
+ ///
+ public static Sound LoadStreamedSound(string path)
+ {
+ var buffer = FileLoader.LoadFileAsBuffer(path);
+
+ // Internal FMOD pointer points to this memory, so we don't want it to go anywhere.
+ var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+
+ var info = new FMOD.CREATESOUNDEXINFO();
+ info.length = (uint)buffer.Length;
+ info.cbsize = Marshal.SizeOf(info);
+
+ Native.createStream(
+ buffer,
+ FMOD.MODE.OPENMEMORY | FMOD.MODE.CREATESTREAM,
+ ref info,
+ out FMOD.Sound newSound
+ );
+
+ return new Sound(newSound, buffer, handle);
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/DistanceFilter3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/DistanceFilter3D.cs
new file mode 100644
index 0000000..ec89df4
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/DistanceFilter3D.cs
@@ -0,0 +1,10 @@
+
+namespace ChaiFoxes.FMODAudio
+{
+ public struct DistanceFilter3D
+ {
+ public bool Custom;
+ public float CustomLevel;
+ public float CenterFreqency;
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/Studio/fmod_studio.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/Studio/fmod_studio.cs
new file mode 100644
index 0000000..9a37b8e
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/Studio/fmod_studio.cs
@@ -0,0 +1,1986 @@
+/* ======================================================================================== */
+/* FMOD Studio API - C# wrapper. */
+/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2019. */
+/* */
+/* For more detail visit: */
+/* https://fmod.com/resources/documentation-api?version=2.0&page=page=studio-api.html */
+/* ======================================================================================== */
+
+using System;
+using System.Text;
+using System.Runtime.InteropServices;
+using System.Collections;
+
+namespace FMOD.Studio
+{
+ public class STUDIO_VERSION
+ {
+
+ // NOTE: This is the only modified part of the wrapper. Don't forget to copy it over when updating.
+
+#if ANDROID
+ public const string dll = "libfmodstudio";
+#else
+ public const string dll = "fmodstudio.dll";
+#endif
+
+ // NOTE: This is the only modified part of the wrapper. Don't forget to copy it over when updating.
+ }
+
+ public enum STOP_MODE : int
+ {
+ ALLOWFADEOUT, /* Allows AHDSR modulators to complete their release, and DSP effect tails to play out. */
+ IMMEDIATE, /* Stops the event instance immediately. */
+ }
+
+ public enum LOADING_STATE : int
+ {
+ UNLOADING, /* Currently unloading. */
+ UNLOADED, /* Not loaded. */
+ LOADING, /* Loading in progress. */
+ LOADED, /* Loaded and ready to play. */
+ ERROR, /* Failed to load and is now in error state. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PROGRAMMER_SOUND_PROPERTIES
+ {
+ public StringWrapper name;
+ public IntPtr sound;
+ public int subsoundIndex;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct TIMELINE_MARKER_PROPERTIES
+ {
+ public StringWrapper name;
+ public int position;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct TIMELINE_BEAT_PROPERTIES
+ {
+ public int bar;
+ public int beat;
+ public int position;
+ public float tempo;
+ public int timesignatureupper;
+ public int timesignaturelower;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ADVANCEDSETTINGS
+ {
+ public int cbsize; /* [w] Size of this structure. NOTE: For C# wrapper, users can leave this at 0. ! */
+ public int commandqueuesize; /* [r/w] Optional. Specify 0 to ignore. Specify the command queue size for studio async processing. Default 4096 (4kb) */
+ public int handleinitialsize; /* [r/w] Optional. Specify 0 to ignore. Specify the initial size to allocate for handles. Memory for handles will grow as needed in pages. */
+ public int studioupdateperiod; /* [r/w] Optional. Specify 0 to ignore. Specify the update period of Studio when in async mode, in milliseconds. Will be quantised to the nearest multiple of mixer duration. Default is 20ms. */
+ public int idlesampledatapoolsize; /* [r/w] Optional. Specify 0 to ignore. Specify the amount of sample data to keep in memory when no longer used, to avoid repeated disk IO. Use -1 to disable. Default is 256kB. */
+ public int streamingscheduledelay; /* [r/w] Optional. Specify 0 to ignore. Specify the schedule delay for streams, in samples. Lower values can reduce latency when scheduling events containing streams but may cause scheduling issues if too small. Default is 8192 samples. */
+ public IntPtr encryptionkey; /* [w] Optional. Specify 0 to ignore. Specify the key for loading sounds from encrypted banks. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct CPU_USAGE
+ {
+ public float dspusage; /* Returns the % CPU time taken by DSP processing on the low level mixer thread. */
+ public float streamusage; /* Returns the % CPU time taken by stream processing on the low level stream thread. */
+ public float geometryusage; /* Returns the % CPU time taken by geometry processing on the low level geometry thread. */
+ public float updateusage; /* Returns the % CPU time taken by low level update, called as part of the studio update. */
+ public float studiousage; /* Returns the % CPU time taken by studio update, called from the studio thread. Does not include low level update time. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct BUFFER_INFO
+ {
+ public int currentusage; /* Current buffer usage in bytes. */
+ public int peakusage; /* Peak buffer usage in bytes. */
+ public int capacity; /* Buffer capacity in bytes. */
+ public int stallcount; /* Number of stalls due to buffer overflow. */
+ public float stalltime; /* Amount of time stalled due to buffer overflow, in seconds. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct BUFFER_USAGE
+ {
+ public BUFFER_INFO studiocommandqueue; /* Information for the Studio Async Command buffer, controlled by FMOD_STUDIO_ADVANCEDSETTINGS commandqueuesize. */
+ public BUFFER_INFO studiohandle; /* Information for the Studio handle table, controlled by FMOD_STUDIO_ADVANCEDSETTINGS handleinitialsize. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct BANK_INFO
+ {
+ public int size; /* The size of this struct (for binary compatibility) */
+ public IntPtr userdata; /* User data to be passed to the file callbacks */
+ public int userdatalength; /* If this is non-zero, userdata will be copied internally */
+ public FILE_OPEN_CALLBACK opencallback; /* Callback for opening this file. */
+ public FILE_CLOSE_CALLBACK closecallback; /* Callback for closing this file. */
+ public FILE_READ_CALLBACK readcallback; /* Callback for reading from this file. */
+ public FILE_SEEK_CALLBACK seekcallback; /* Callback for seeking within this file. */
+ }
+
+ [Flags]
+ public enum SYSTEM_CALLBACK_TYPE : uint
+ {
+ PREUPDATE = 0x00000001, /* Called at the start of the main Studio update. For async mode this will be on its own thread. */
+ POSTUPDATE = 0x00000002, /* Called at the end of the main Studio update. For async mode this will be on its own thread. */
+ BANK_UNLOAD = 0x00000004, /* Called when bank has just been unloaded, after all resources are freed. CommandData will be the bank handle.*/
+ ALL = 0xFFFFFFFF, /* Pass this mask to Studio::System::setCallback to receive all callback types. */
+ }
+
+ public delegate RESULT SYSTEM_CALLBACK(IntPtr system, SYSTEM_CALLBACK_TYPE type, IntPtr commanddata, IntPtr userdata);
+
+ public enum PARAMETER_TYPE : int
+ {
+ GAME_CONTROLLED, /* Controlled via the API using Studio::ParameterInstance::setValue. */
+ AUTOMATIC_DISTANCE, /* Distance between the event and the listener. */
+ AUTOMATIC_EVENT_CONE_ANGLE, /* Angle between the event's forward vector and the vector pointing from the event to the listener (0 to 180 degrees). */
+ AUTOMATIC_EVENT_ORIENTATION, /* Horizontal angle between the event's forward vector and listener's forward vector (-180 to 180 degrees). */
+ AUTOMATIC_DIRECTION, /* Horizontal angle between the listener's forward vector and the vector pointing from the listener to the event (-180 to 180 degrees). */
+ AUTOMATIC_ELEVATION, /* Angle between the listener's XZ plane and the vector pointing from the listener to the event (-90 to 90 degrees). */
+ AUTOMATIC_LISTENER_ORIENTATION, /* Horizontal angle between the listener's forward vector and the global positive Z axis (-180 to 180 degrees). */
+ AUTOMATIC_SPEED, /* Magnitude of the relative velocity of the event and the listener */
+ MAX
+ }
+
+ [Flags]
+ public enum PARAMETER_FLAGS : uint
+ {
+ READONLY = 0x00000001, /* The parameter is read-only. Its value cannot be set from the API. */
+ AUTOMATIC = 0x00000002, /* The parameter is automatic. See FMOD_STUDIO_PARAMETER_TYPE. */
+ GLOBAL = 0x00000004, /* The parameter is global. All instances share the same value. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PARAMETER_ID
+ {
+ public uint data1; /* The first half of the ID. */
+ public uint data2; /* The second half of the ID. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PARAMETER_DESCRIPTION
+ {
+ public StringWrapper name; /* Name of the parameter. */
+ public PARAMETER_ID id; /* ID of the parameter. */
+ public float minimum; /* Minimum parameter value. */
+ public float maximum; /* Maximum parameter value. */
+ public float defaultvalue; /* Default parameter value. */
+ public PARAMETER_TYPE type; /* Type of the parameter. */
+ public PARAMETER_FLAGS flags; /* Flags describing the behavior of the parameter. */
+ }
+
+ // This is only need for loading memory and given our C# wrapper LOAD_MEMORY_POINT isn't feasible anyway
+ enum LOAD_MEMORY_MODE : int
+ {
+ LOAD_MEMORY,
+ LOAD_MEMORY_POINT,
+ }
+
+ enum LOAD_MEMORY_ALIGNMENT : int
+ {
+ VALUE = 32
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SOUND_INFO
+ {
+ public IntPtr name_or_data; /* The filename or memory buffer that contains the sound. */
+ public MODE mode; /* Mode flags required for loading the sound. */
+ public CREATESOUNDEXINFO exinfo; /* Extra information required for loading the sound. */
+ public int subsoundindex; /* Subsound index for loading the sound. */
+
+ public string name
+ {
+ get
+ {
+ using (StringHelper.ThreadSafeEncoding encoding = StringHelper.GetFreeHelper())
+ {
+ return ((mode & (MODE.OPENMEMORY | MODE.OPENMEMORY_POINT)) == 0) ? encoding.stringFromNative(name_or_data) : String.Empty;
+ }
+ }
+ }
+ }
+
+ public enum USER_PROPERTY_TYPE : int
+ {
+ INTEGER, /* Integer property */
+ BOOLEAN, /* Boolean property */
+ FLOAT, /* Float property */
+ STRING, /* String property */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct USER_PROPERTY
+ {
+ public StringWrapper name; /* Name of the user property. */
+ public USER_PROPERTY_TYPE type; /* Type of the user property. Use this to select one of the following values. */
+ private Union_IntBoolFloatString value;
+
+ public int intValue() { return (type == USER_PROPERTY_TYPE.INTEGER) ? value.intvalue : -1; }
+ public bool boolValue() { return (type == USER_PROPERTY_TYPE.BOOLEAN) ? value.boolvalue : false; }
+ public float floatValue() { return (type == USER_PROPERTY_TYPE.FLOAT) ? value.floatvalue : -1; }
+ public string stringValue() { return (type == USER_PROPERTY_TYPE.STRING) ? value.stringvalue : ""; }
+ };
+
+ [StructLayout(LayoutKind.Explicit)]
+ struct Union_IntBoolFloatString
+ {
+ [FieldOffset(0)]
+ public int intvalue;
+ [FieldOffset(0)]
+ public bool boolvalue;
+ [FieldOffset(0)]
+ public float floatvalue;
+ [FieldOffset(0)]
+ public StringWrapper stringvalue;
+ }
+
+ [Flags]
+ public enum INITFLAGS : uint
+ {
+ NORMAL = 0x00000000, /* Initialize normally. */
+ LIVEUPDATE = 0x00000001, /* Enable live update. */
+ ALLOW_MISSING_PLUGINS = 0x00000002, /* Load banks even if they reference plugins that have not been loaded. */
+ SYNCHRONOUS_UPDATE = 0x00000004, /* Disable asynchronous processing and perform all processing on the calling thread instead. */
+ DEFERRED_CALLBACKS = 0x00000008, /* Defer timeline callbacks until the main update. See Studio::EventInstance::setCallback for more information. */
+ LOAD_FROM_UPDATE = 0x00000010, /* No additional threads are created for bank and resource loading. Loading is driven from Studio::System::update. Mainly used in non-realtime situations. */
+ }
+
+ [Flags]
+ public enum LOAD_BANK_FLAGS : uint
+ {
+ NORMAL = 0x00000000, /* Standard behaviour. */
+ NONBLOCKING = 0x00000001, /* Bank loading occurs asynchronously rather than occurring immediately. */
+ DECOMPRESS_SAMPLES = 0x00000002, /* Force samples to decompress into memory when they are loaded, rather than staying compressed. */
+ UNENCRYPTED = 0x00000004, /* Ignore the encryption key specified by Studio::System::setAdvancedSettings when loading sounds from this bank. */
+ }
+
+ [Flags]
+ public enum COMMANDCAPTURE_FLAGS : uint
+ {
+ NORMAL = 0x00000000, /* Standard behaviour. */
+ FILEFLUSH = 0x00000001, /* Call file flush on every command. */
+ SKIP_INITIAL_STATE = 0x00000002, /* Normally the initial state of banks and instances is captured, unless this flag is set. */
+ }
+
+ [Flags]
+ public enum COMMANDREPLAY_FLAGS : uint
+ {
+ NORMAL = 0x00000000, /* Standard behaviour. */
+ SKIP_CLEANUP = 0x00000001, /* Normally the playback will release any created resources when it stops, unless this flag is set. */
+ FAST_FORWARD = 0x00000002, /* Play back at maximum speed, ignoring the timing of the original replay. */
+ SKIP_BANK_LOAD = 0x00000004, /* Skip commands related to bank loading. */
+ }
+
+ public enum PLAYBACK_STATE : int
+ {
+ PLAYING, /* Currently playing. */
+ SUSTAINING, /* The timeline cursor is paused on a sustain point. */
+ STOPPED, /* Not playing. */
+ STARTING, /* Start has been called but the instance is not fully started yet. */
+ STOPPING, /* Stop has been called but the instance is not fully stopped yet. */
+ }
+
+ public enum EVENT_PROPERTY : int
+ {
+ CHANNELPRIORITY, /* Priority to set on low-level channels created by this event instance (-1 to 256). */
+ SCHEDULE_DELAY, /* Schedule delay to synchronized playback for multiple tracks in DS clocks, or -1 for default. */
+ SCHEDULE_LOOKAHEAD, /* Schedule look-ahead on the timeline in DSP clocks, or -1 for default. */
+ MINIMUM_DISTANCE, /* Override the event's 3D minimum distance, or -1 for default. */
+ MAXIMUM_DISTANCE, /* Override the event's 3D maximum distance, or -1 for default. */
+ MAX
+ };
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PLUGIN_INSTANCE_PROPERTIES
+ {
+ public IntPtr name; /* The name of the plugin effect or sound (set in FMOD Studio). */
+ public IntPtr dsp; /* The DSP plugin instance. This can be cast to/from FMOD::DSP* type. */
+ }
+
+ [Flags]
+ public enum EVENT_CALLBACK_TYPE : uint
+ {
+ CREATED = 0x00000001, /* Called when an instance is fully created. Parameters = unused. */
+ DESTROYED = 0x00000002, /* Called when an instance is just about to be destroyed. Parameters = unused. */
+ STARTING = 0x00000004, /* Called when an instance is preparing to start. Parameters = unused. */
+ STARTED = 0x00000008, /* Called when an instance starts playing. Parameters = unused. */
+ RESTARTED = 0x00000010, /* Called when an instance is restarted. Parameters = unused. */
+ STOPPED = 0x00000020, /* Called when an instance stops. Parameters = unused. */
+ START_FAILED = 0x00000040, /* Called when an instance did not start, e.g. due to polyphony. Parameters = unused. */
+ CREATE_PROGRAMMER_SOUND = 0x00000080, /* Called when a programmer sound needs to be created in order to play a programmer instrument. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES. */
+ DESTROY_PROGRAMMER_SOUND = 0x00000100, /* Called when a programmer sound needs to be destroyed. Parameters = FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES. */
+ PLUGIN_CREATED = 0x00000200, /* Called when a DSP plugin instance has just been created. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES. */
+ PLUGIN_DESTROYED = 0x00000400, /* Called when a DSP plugin instance is about to be destroyed. Parameters = FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES. */
+ TIMELINE_MARKER = 0x00000800, /* Called when the timeline passes a named marker. Parameters = FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES. */
+ TIMELINE_BEAT = 0x00001000, /* Called when the timeline hits a beat in a tempo section. Parameters = FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES. */
+ SOUND_PLAYED = 0x00002000, /* Called when the event plays a sound. Parameters = FMOD::Sound. */
+ SOUND_STOPPED = 0x00004000, /* Called when the event finishes playing a sound. Parameters = FMOD::Sound. */
+ REAL_TO_VIRTUAL = 0x00008000, /* Called when the event becomes virtual. Parameters = unused. */
+ VIRTUAL_TO_REAL = 0x00010000, /* Called when the event becomes real. Parameters = unused. */
+
+ ALL = 0xFFFFFFFF, /* Pass this mask to Studio::EventDescription::setCallback or Studio::EventInstance::setCallback to receive all callback types. */
+ }
+
+ public delegate RESULT EVENT_CALLBACK(EVENT_CALLBACK_TYPE type, EventInstance _event, IntPtr parameters);
+
+ public delegate RESULT COMMANDREPLAY_FRAME_CALLBACK(CommandReplay replay, int commandindex, float currenttime, IntPtr userdata);
+ public delegate RESULT COMMANDREPLAY_LOAD_BANK_CALLBACK(CommandReplay replay, int commandindex, Guid bankguid, StringWrapper bankfilename, LOAD_BANK_FLAGS flags, out Bank bank, IntPtr userdata);
+ public delegate RESULT COMMANDREPLAY_CREATE_INSTANCE_CALLBACK(CommandReplay replay, int commandindex, EventDescription eventdescription, out EventInstance instance, IntPtr userdata);
+
+ public enum INSTANCETYPE : int
+ {
+ NONE,
+ SYSTEM,
+ EVENTDESCRIPTION,
+ EVENTINSTANCE,
+ PARAMETERINSTANCE,
+ BUS,
+ VCA,
+ BANK,
+ COMMANDREPLAY,
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct COMMAND_INFO
+ {
+ public StringWrapper commandname; /* The full name of the API function for this command. */
+ public int parentcommandindex; /* For commands that operate on an instance, this is the command that created the instance */
+ public int framenumber; /* The frame the command belongs to */
+ public float frametime; /* The playback time at which this command will be executed */
+ public INSTANCETYPE instancetype; /* The type of object that this command uses as an instance */
+ public INSTANCETYPE outputtype; /* The type of object that this command outputs, if any */
+ public UInt32 instancehandle; /* The original handle value of the instance. This will no longer correspond to any actual object in playback. */
+ public UInt32 outputhandle; /* The original handle value of the command output. This will no longer correspond to any actual object in playback. */
+ }
+
+ public struct Util
+ {
+ public static RESULT parseID(string idString, out Guid id)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_ParseID(encoder.byteFromStringUTF8(idString), out id);
+ }
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_ParseID(byte[] idString, out Guid id);
+ #endregion
+ }
+
+ public struct System
+ {
+ // Initialization / system functions.
+ public static RESULT create(out System system)
+ {
+ return FMOD_Studio_System_Create(out system.handle, VERSION.number);
+ }
+ public RESULT setAdvancedSettings(ADVANCEDSETTINGS settings)
+ {
+ settings.cbsize = Marshal.SizeOf(typeof(ADVANCEDSETTINGS));
+ return FMOD_Studio_System_SetAdvancedSettings(this.handle, ref settings);
+ }
+ public RESULT setAdvancedSettings(ADVANCEDSETTINGS settings, string encryptionKey)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr userKey = settings.encryptionkey;
+ settings.encryptionkey = encoder.intptrFromStringUTF8(encryptionKey);
+ FMOD.RESULT result = setAdvancedSettings(settings);
+ settings.encryptionkey = userKey;
+ return result;
+ }
+ }
+ public RESULT getAdvancedSettings(out ADVANCEDSETTINGS settings)
+ {
+ settings.cbsize = Marshal.SizeOf(typeof(ADVANCEDSETTINGS));
+ return FMOD_Studio_System_GetAdvancedSettings(this.handle, out settings);
+ }
+ public RESULT initialize(int maxchannels, INITFLAGS studioflags, FMOD.INITFLAGS flags, IntPtr extradriverdata)
+ {
+ return FMOD_Studio_System_Initialize(this.handle, maxchannels, studioflags, flags, extradriverdata);
+ }
+ public RESULT release()
+ {
+ return FMOD_Studio_System_Release(this.handle);
+ }
+ public RESULT update()
+ {
+ return FMOD_Studio_System_Update(this.handle);
+ }
+ public RESULT getCoreSystem(out FMOD.System coresystem)
+ {
+ return FMOD_Studio_System_GetCoreSystem(this.handle, out coresystem.handle);
+ }
+ public RESULT getEvent(string path, out EventDescription _event)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetEvent(this.handle, encoder.byteFromStringUTF8(path), out _event.handle);
+ }
+ }
+ public RESULT getBus(string path, out Bus bus)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetBus(this.handle, encoder.byteFromStringUTF8(path), out bus.handle);
+ }
+ }
+ public RESULT getVCA(string path, out VCA vca)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetVCA(this.handle, encoder.byteFromStringUTF8(path), out vca.handle);
+ }
+ }
+ public RESULT getBank(string path, out Bank bank)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetBank(this.handle, encoder.byteFromStringUTF8(path), out bank.handle);
+ }
+ }
+
+ public RESULT getEventByID(Guid id, out EventDescription _event)
+ {
+ return FMOD_Studio_System_GetEventByID(this.handle, ref id, out _event.handle);
+ }
+ public RESULT getBusByID(Guid id, out Bus bus)
+ {
+ return FMOD_Studio_System_GetBusByID(this.handle, ref id, out bus.handle);
+ }
+ public RESULT getVCAByID(Guid id, out VCA vca)
+ {
+ return FMOD_Studio_System_GetVCAByID(this.handle, ref id, out vca.handle);
+ }
+ public RESULT getBankByID(Guid id, out Bank bank)
+ {
+ return FMOD_Studio_System_GetBankByID(this.handle, ref id, out bank.handle);
+ }
+ public RESULT getSoundInfo(string key, out SOUND_INFO info)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetSoundInfo(this.handle, encoder.byteFromStringUTF8(key), out info);
+ }
+ }
+ public RESULT getParameterDescriptionByName(string name, out PARAMETER_DESCRIPTION parameter)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetParameterDescriptionByName(this.handle, encoder.byteFromStringUTF8(name), out parameter);
+ }
+ }
+ public RESULT getParameterDescriptionByID(PARAMETER_ID id, out PARAMETER_DESCRIPTION parameter)
+ {
+ return FMOD_Studio_System_GetParameterDescriptionByID(this.handle, id, out parameter);
+ }
+ public RESULT getParameterByID(PARAMETER_ID id, out float value)
+ {
+ float finalValue;
+ return getParameterByID(id, out value, out finalValue);
+ }
+ public RESULT getParameterByID(PARAMETER_ID id, out float value, out float finalvalue)
+ {
+ return FMOD_Studio_System_GetParameterByID(this.handle, id, out value, out finalvalue);
+ }
+ public RESULT setParameterByID(PARAMETER_ID id, float value, bool ignoreseekspeed = false)
+ {
+ return FMOD_Studio_System_SetParameterByID(this.handle, id, value, ignoreseekspeed);
+ }
+ public RESULT setParametersByIDs(PARAMETER_ID[] ids, float[] values, int count, bool ignoreseekspeed = false)
+ {
+ return FMOD_Studio_System_SetParametersByIDs(this.handle, ids, values, count, ignoreseekspeed);
+ }
+ public RESULT getParameterByName(string name, out float value)
+ {
+ float finalValue;
+ return getParameterByName(name, out value, out finalValue);
+ }
+ public RESULT getParameterByName(string name, out float value, out float finalvalue)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_GetParameterByName(this.handle, encoder.byteFromStringUTF8(name), out value, out finalvalue);
+ }
+ }
+ public RESULT setParameterByName(string name, float value, bool ignoreseekspeed = false)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_SetParameterByName(this.handle, encoder.byteFromStringUTF8(name), value, ignoreseekspeed);
+ }
+ }
+ public RESULT lookupID(string path, out Guid id)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_LookupID(this.handle, encoder.byteFromStringUTF8(path), out id);
+ }
+ }
+ public RESULT lookupPath(Guid id, out string path)
+ {
+ path = null;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_System_LookupPath(this.handle, ref id, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_System_LookupPath(this.handle, ref id, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+ public RESULT getNumListeners(out int numlisteners)
+ {
+ return FMOD_Studio_System_GetNumListeners(this.handle, out numlisteners);
+ }
+ public RESULT setNumListeners(int numlisteners)
+ {
+ return FMOD_Studio_System_SetNumListeners(this.handle, numlisteners);
+ }
+ public RESULT getListenerAttributes(int listener, out ATTRIBUTES_3D attributes)
+ {
+ return FMOD_Studio_System_GetListenerAttributes(this.handle, listener, out attributes);
+ }
+ public RESULT setListenerAttributes(int listener, ATTRIBUTES_3D attributes)
+ {
+ return FMOD_Studio_System_SetListenerAttributes(this.handle, listener, ref attributes);
+ }
+ public RESULT getListenerWeight(int listener, out float weight)
+ {
+ return FMOD_Studio_System_GetListenerWeight(this.handle, listener, out weight);
+ }
+ public RESULT setListenerWeight(int listener, float weight)
+ {
+ return FMOD_Studio_System_SetListenerWeight(this.handle, listener, weight);
+ }
+ public RESULT loadBankFile(string filename, LOAD_BANK_FLAGS flags, out Bank bank)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_LoadBankFile(this.handle, encoder.byteFromStringUTF8(filename), flags, out bank.handle);
+ }
+ }
+ public RESULT loadBankMemory(byte[] buffer, LOAD_BANK_FLAGS flags, out Bank bank)
+ {
+ // Manually pin the byte array. It's what the marshaller should do anyway but don't leave it to chance.
+ GCHandle pinnedArray = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+ IntPtr pointer = pinnedArray.AddrOfPinnedObject();
+ RESULT result = FMOD_Studio_System_LoadBankMemory(this.handle, pointer, buffer.Length, LOAD_MEMORY_MODE.LOAD_MEMORY, flags, out bank.handle);
+ pinnedArray.Free();
+ return result;
+ }
+ public RESULT loadBankCustom(BANK_INFO info, LOAD_BANK_FLAGS flags, out Bank bank)
+ {
+ info.size = Marshal.SizeOf(info);
+ return FMOD_Studio_System_LoadBankCustom(this.handle, ref info, flags, out bank.handle);
+ }
+ public RESULT unloadAll()
+ {
+ return FMOD_Studio_System_UnloadAll(this.handle);
+ }
+ public RESULT flushCommands()
+ {
+ return FMOD_Studio_System_FlushCommands(this.handle);
+ }
+ public RESULT flushSampleLoading()
+ {
+ return FMOD_Studio_System_FlushSampleLoading(this.handle);
+ }
+ public RESULT startCommandCapture(string filename, COMMANDCAPTURE_FLAGS flags)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_StartCommandCapture(this.handle, encoder.byteFromStringUTF8(filename), flags);
+ }
+ }
+ public RESULT stopCommandCapture()
+ {
+ return FMOD_Studio_System_StopCommandCapture(this.handle);
+ }
+ public RESULT loadCommandReplay(string filename, COMMANDREPLAY_FLAGS flags, out CommandReplay replay)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_System_LoadCommandReplay(this.handle, encoder.byteFromStringUTF8(filename), flags, out replay.handle);
+ }
+ }
+ public RESULT getBankCount(out int count)
+ {
+ return FMOD_Studio_System_GetBankCount(this.handle, out count);
+ }
+ public RESULT getBankList(out Bank[] array)
+ {
+ array = null;
+
+ RESULT result;
+ int capacity;
+ result = FMOD_Studio_System_GetBankCount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new Bank[0];
+ return result;
+ }
+
+ IntPtr[] rawArray = new IntPtr[capacity];
+ int actualCount;
+ result = FMOD_Studio_System_GetBankList(this.handle, rawArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (actualCount > capacity) // More items added since we queried just now?
+ {
+ actualCount = capacity;
+ }
+ array = new Bank[actualCount];
+ for (int i = 0; i < actualCount; ++i)
+ {
+ array[i].handle = rawArray[i];
+ }
+ return RESULT.OK;
+ }
+ public RESULT getParameterDescriptionCount(out int count)
+ {
+ return FMOD_Studio_System_GetParameterDescriptionCount(this.handle, out count);
+ }
+ public RESULT getParameterDescriptionList(out PARAMETER_DESCRIPTION[] array)
+ {
+ array = null;
+
+ int capacity;
+ RESULT result = FMOD_Studio_System_GetParameterDescriptionCount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new PARAMETER_DESCRIPTION[0];
+ return RESULT.OK;
+ }
+
+ PARAMETER_DESCRIPTION[] tempArray = new PARAMETER_DESCRIPTION[capacity];
+ int actualCount;
+ result = FMOD_Studio_System_GetParameterDescriptionList(this.handle, tempArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+
+ if (actualCount != capacity)
+ {
+ Array.Resize(ref tempArray, actualCount);
+ }
+
+ array = tempArray;
+
+ return RESULT.OK;
+ }
+ public RESULT getCPUUsage(out CPU_USAGE usage)
+ {
+ return FMOD_Studio_System_GetCPUUsage(this.handle, out usage);
+ }
+ public RESULT getBufferUsage(out BUFFER_USAGE usage)
+ {
+ return FMOD_Studio_System_GetBufferUsage(this.handle, out usage);
+ }
+ public RESULT resetBufferUsage()
+ {
+ return FMOD_Studio_System_ResetBufferUsage(this.handle);
+ }
+
+ public RESULT setCallback(SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL)
+ {
+ return FMOD_Studio_System_SetCallback(this.handle, callback, callbackmask);
+ }
+
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD_Studio_System_GetUserData(this.handle, out userdata);
+ }
+
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD_Studio_System_SetUserData(this.handle, userdata);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_Create (out IntPtr system, uint headerversion);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_System_IsValid (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetAdvancedSettings (IntPtr system, ref ADVANCEDSETTINGS settings);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetAdvancedSettings (IntPtr system, out ADVANCEDSETTINGS settings);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_Initialize (IntPtr system, int maxchannels, INITFLAGS studioflags, FMOD.INITFLAGS flags, IntPtr extradriverdata);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_Release (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_Update (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetCoreSystem (IntPtr system, out IntPtr coresystem);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetEvent (IntPtr system, byte[] path, out IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBus (IntPtr system, byte[] path, out IntPtr bus);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetVCA (IntPtr system, byte[] path, out IntPtr vca);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBank (IntPtr system, byte[] path, out IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetEventByID (IntPtr system, ref Guid id, out IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBusByID (IntPtr system, ref Guid id, out IntPtr bus);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetVCAByID (IntPtr system, ref Guid id, out IntPtr vca);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBankByID (IntPtr system, ref Guid id, out IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetSoundInfo (IntPtr system, byte[] key, out SOUND_INFO info);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterDescriptionByName(IntPtr system, byte[] name, out PARAMETER_DESCRIPTION parameter);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterDescriptionByID(IntPtr system, PARAMETER_ID id, out PARAMETER_DESCRIPTION parameter);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterByID (IntPtr system, PARAMETER_ID id, out float value, out float finalvalue);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetParameterByID (IntPtr system, PARAMETER_ID id, float value, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetParametersByIDs (IntPtr system, PARAMETER_ID[] ids, float[] values, int count, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterByName (IntPtr system, byte[] name, out float value, out float finalvalue);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetParameterByName (IntPtr system, byte[] name, float value, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LookupID (IntPtr system, byte[] path, out Guid id);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LookupPath (IntPtr system, ref Guid id, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetNumListeners (IntPtr system, out int numlisteners);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetNumListeners (IntPtr system, int numlisteners);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetListenerAttributes (IntPtr system, int listener, out ATTRIBUTES_3D attributes);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetListenerAttributes (IntPtr system, int listener, ref ATTRIBUTES_3D attributes);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetListenerWeight (IntPtr system, int listener, out float weight);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetListenerWeight (IntPtr system, int listener, float weight);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LoadBankFile (IntPtr system, byte[] filename, LOAD_BANK_FLAGS flags, out IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LoadBankMemory (IntPtr system, IntPtr buffer, int length, LOAD_MEMORY_MODE mode, LOAD_BANK_FLAGS flags, out IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LoadBankCustom (IntPtr system, ref BANK_INFO info, LOAD_BANK_FLAGS flags, out IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_UnloadAll (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_FlushCommands (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_FlushSampleLoading (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_StartCommandCapture (IntPtr system, byte[] filename, COMMANDCAPTURE_FLAGS flags);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_StopCommandCapture (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_LoadCommandReplay (IntPtr system, byte[] filename, COMMANDREPLAY_FLAGS flags, out IntPtr replay);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBankCount (IntPtr system, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBankList (IntPtr system, IntPtr[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterDescriptionCount(IntPtr system, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetParameterDescriptionList(IntPtr system, [Out] PARAMETER_DESCRIPTION[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetCPUUsage (IntPtr system, out CPU_USAGE usage);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetBufferUsage (IntPtr system, out BUFFER_USAGE usage);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_ResetBufferUsage (IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetCallback (IntPtr system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_GetUserData (IntPtr system, out IntPtr userdata);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_System_SetUserData (IntPtr system, IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_System_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct EventDescription
+ {
+ public RESULT getID(out Guid id)
+ {
+ return FMOD_Studio_EventDescription_GetID(this.handle, out id);
+ }
+ public RESULT getPath(out string path)
+ {
+ path = null;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_EventDescription_GetPath(this.handle, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_EventDescription_GetPath(this.handle, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+ public RESULT getParameterDescriptionCount(out int count)
+ {
+ return FMOD_Studio_EventDescription_GetParameterDescriptionCount(this.handle, out count);
+ }
+ public RESULT getParameterDescriptionByIndex(int index, out PARAMETER_DESCRIPTION parameter)
+ {
+ return FMOD_Studio_EventDescription_GetParameterDescriptionByIndex(this.handle, index, out parameter);
+ }
+ public RESULT getParameterDescriptionByName(string name, out PARAMETER_DESCRIPTION parameter)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_EventDescription_GetParameterDescriptionByName(this.handle, encoder.byteFromStringUTF8(name), out parameter);
+ }
+ }
+ public RESULT getParameterDescriptionByID(PARAMETER_ID id, out PARAMETER_DESCRIPTION parameter)
+ {
+ return FMOD_Studio_EventDescription_GetParameterDescriptionByID(this.handle, id, out parameter);
+ }
+ public RESULT getUserPropertyCount(out int count)
+ {
+ return FMOD_Studio_EventDescription_GetUserPropertyCount(this.handle, out count);
+ }
+ public RESULT getUserPropertyByIndex(int index, out USER_PROPERTY property)
+ {
+ return FMOD_Studio_EventDescription_GetUserPropertyByIndex(this.handle, index, out property);
+ }
+ public RESULT getUserProperty(string name, out USER_PROPERTY property)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_EventDescription_GetUserProperty(this.handle, encoder.byteFromStringUTF8(name), out property);
+ }
+ }
+ public RESULT getLength(out int length)
+ {
+ return FMOD_Studio_EventDescription_GetLength(this.handle, out length);
+ }
+ public RESULT getMinimumDistance(out float distance)
+ {
+ return FMOD_Studio_EventDescription_GetMinimumDistance(this.handle, out distance);
+ }
+ public RESULT getMaximumDistance(out float distance)
+ {
+ return FMOD_Studio_EventDescription_GetMaximumDistance(this.handle, out distance);
+ }
+ public RESULT getSoundSize(out float size)
+ {
+ return FMOD_Studio_EventDescription_GetSoundSize(this.handle, out size);
+ }
+ public RESULT isSnapshot(out bool snapshot)
+ {
+ return FMOD_Studio_EventDescription_IsSnapshot(this.handle, out snapshot);
+ }
+ public RESULT isOneshot(out bool oneshot)
+ {
+ return FMOD_Studio_EventDescription_IsOneshot(this.handle, out oneshot);
+ }
+ public RESULT isStream(out bool isStream)
+ {
+ return FMOD_Studio_EventDescription_IsStream(this.handle, out isStream);
+ }
+ public RESULT is3D(out bool is3D)
+ {
+ return FMOD_Studio_EventDescription_Is3D(this.handle, out is3D);
+ }
+ public RESULT hasCue(out bool cue)
+ {
+ return FMOD_Studio_EventDescription_HasCue(this.handle, out cue);
+ }
+
+ public RESULT createInstance(out EventInstance instance)
+ {
+ return FMOD_Studio_EventDescription_CreateInstance(this.handle, out instance.handle);
+ }
+
+ public RESULT getInstanceCount(out int count)
+ {
+ return FMOD_Studio_EventDescription_GetInstanceCount(this.handle, out count);
+ }
+ public RESULT getInstanceList(out EventInstance[] array)
+ {
+ array = null;
+
+ RESULT result;
+ int capacity;
+ result = FMOD_Studio_EventDescription_GetInstanceCount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new EventInstance[0];
+ return result;
+ }
+
+ IntPtr[] rawArray = new IntPtr[capacity];
+ int actualCount;
+ result = FMOD_Studio_EventDescription_GetInstanceList(this.handle, rawArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (actualCount > capacity) // More items added since we queried just now?
+ {
+ actualCount = capacity;
+ }
+ array = new EventInstance[actualCount];
+ for (int i = 0; i < actualCount; ++i)
+ {
+ array[i].handle = rawArray[i];
+ }
+ return RESULT.OK;
+ }
+
+ public RESULT loadSampleData()
+ {
+ return FMOD_Studio_EventDescription_LoadSampleData(this.handle);
+ }
+
+ public RESULT unloadSampleData()
+ {
+ return FMOD_Studio_EventDescription_UnloadSampleData(this.handle);
+ }
+
+ public RESULT getSampleLoadingState(out LOADING_STATE state)
+ {
+ return FMOD_Studio_EventDescription_GetSampleLoadingState(this.handle, out state);
+ }
+
+ public RESULT releaseAllInstances()
+ {
+ return FMOD_Studio_EventDescription_ReleaseAllInstances(this.handle);
+ }
+ public RESULT setCallback(EVENT_CALLBACK callback, EVENT_CALLBACK_TYPE callbackmask = EVENT_CALLBACK_TYPE.ALL)
+ {
+ return FMOD_Studio_EventDescription_SetCallback(this.handle, callback, callbackmask);
+ }
+
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD_Studio_EventDescription_GetUserData(this.handle, out userdata);
+ }
+
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD_Studio_EventDescription_SetUserData(this.handle, userdata);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_EventDescription_IsValid (IntPtr eventdescription);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetID (IntPtr eventdescription, out Guid id);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetPath (IntPtr eventdescription, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetParameterDescriptionCount(IntPtr eventdescription, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetParameterDescriptionByIndex(IntPtr eventdescription, int index, out PARAMETER_DESCRIPTION parameter);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetParameterDescriptionByName(IntPtr eventdescription, byte[] name, out PARAMETER_DESCRIPTION parameter);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetParameterDescriptionByID(IntPtr eventdescription, PARAMETER_ID id, out PARAMETER_DESCRIPTION parameter);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetUserPropertyCount (IntPtr eventdescription, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetUserPropertyByIndex(IntPtr eventdescription, int index, out USER_PROPERTY property);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetUserProperty (IntPtr eventdescription, byte[] name, out USER_PROPERTY property);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetLength (IntPtr eventdescription, out int length);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetMinimumDistance (IntPtr eventdescription, out float distance);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetMaximumDistance (IntPtr eventdescription, out float distance);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetSoundSize (IntPtr eventdescription, out float size);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_IsSnapshot (IntPtr eventdescription, out bool snapshot);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_IsOneshot (IntPtr eventdescription, out bool oneshot);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_IsStream (IntPtr eventdescription, out bool isStream);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_Is3D (IntPtr eventdescription, out bool is3D);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_HasCue (IntPtr eventdescription, out bool cue);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_CreateInstance (IntPtr eventdescription, out IntPtr instance);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetInstanceCount (IntPtr eventdescription, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetInstanceList (IntPtr eventdescription, IntPtr[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_LoadSampleData (IntPtr eventdescription);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_UnloadSampleData (IntPtr eventdescription);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetSampleLoadingState (IntPtr eventdescription, out LOADING_STATE state);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_ReleaseAllInstances (IntPtr eventdescription);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_SetCallback (IntPtr eventdescription, EVENT_CALLBACK callback, EVENT_CALLBACK_TYPE callbackmask);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_GetUserData (IntPtr eventdescription, out IntPtr userdata);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventDescription_SetUserData (IntPtr eventdescription, IntPtr userdata);
+ #endregion
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_EventDescription_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct EventInstance
+ {
+ public RESULT getDescription(out EventDescription description)
+ {
+ return FMOD_Studio_EventInstance_GetDescription(this.handle, out description.handle);
+ }
+ public RESULT getVolume(out float volume)
+ {
+ float finalVolume;
+ return getVolume(out volume, out finalVolume);
+ }
+ public RESULT getVolume(out float volume, out float finalvolume)
+ {
+ return FMOD_Studio_EventInstance_GetVolume(this.handle, out volume, out finalvolume);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD_Studio_EventInstance_SetVolume(this.handle, volume);
+ }
+ public RESULT getPitch(out float pitch)
+ {
+ float finalPitch;
+ return getPitch(out pitch, out finalPitch);
+ }
+ public RESULT getPitch(out float pitch, out float finalpitch)
+ {
+ return FMOD_Studio_EventInstance_GetPitch(this.handle, out pitch, out finalpitch);
+ }
+ public RESULT setPitch(float pitch)
+ {
+ return FMOD_Studio_EventInstance_SetPitch(this.handle, pitch);
+ }
+ public RESULT get3DAttributes(out ATTRIBUTES_3D attributes)
+ {
+ return FMOD_Studio_EventInstance_Get3DAttributes(this.handle, out attributes);
+ }
+ public RESULT set3DAttributes(ATTRIBUTES_3D attributes)
+ {
+ return FMOD_Studio_EventInstance_Set3DAttributes(this.handle, ref attributes);
+ }
+ public RESULT getListenerMask(out uint mask)
+ {
+ return FMOD_Studio_EventInstance_GetListenerMask(this.handle, out mask);
+ }
+ public RESULT setListenerMask(uint mask)
+ {
+ return FMOD_Studio_EventInstance_SetListenerMask(this.handle, mask);
+ }
+ public RESULT getProperty(EVENT_PROPERTY index, out float value)
+ {
+ return FMOD_Studio_EventInstance_GetProperty(this.handle, index, out value);
+ }
+ public RESULT setProperty(EVENT_PROPERTY index, float value)
+ {
+ return FMOD_Studio_EventInstance_SetProperty(this.handle, index, value);
+ }
+ public RESULT getReverbLevel(int index, out float level)
+ {
+ return FMOD_Studio_EventInstance_GetReverbLevel(this.handle, index, out level);
+ }
+ public RESULT setReverbLevel(int index, float level)
+ {
+ return FMOD_Studio_EventInstance_SetReverbLevel(this.handle, index, level);
+ }
+ public RESULT getPaused(out bool paused)
+ {
+ return FMOD_Studio_EventInstance_GetPaused(this.handle, out paused);
+ }
+ public RESULT setPaused(bool paused)
+ {
+ return FMOD_Studio_EventInstance_SetPaused(this.handle, paused);
+ }
+ public RESULT start()
+ {
+ return FMOD_Studio_EventInstance_Start(this.handle);
+ }
+ public RESULT stop(STOP_MODE mode)
+ {
+ return FMOD_Studio_EventInstance_Stop(this.handle, mode);
+ }
+ public RESULT getTimelinePosition(out int position)
+ {
+ return FMOD_Studio_EventInstance_GetTimelinePosition(this.handle, out position);
+ }
+ public RESULT setTimelinePosition(int position)
+ {
+ return FMOD_Studio_EventInstance_SetTimelinePosition(this.handle, position);
+ }
+ public RESULT getPlaybackState(out PLAYBACK_STATE state)
+ {
+ return FMOD_Studio_EventInstance_GetPlaybackState(this.handle, out state);
+ }
+ public RESULT getChannelGroup(out FMOD.ChannelGroup group)
+ {
+ return FMOD_Studio_EventInstance_GetChannelGroup(this.handle, out group.handle);
+ }
+ public RESULT release()
+ {
+ return FMOD_Studio_EventInstance_Release(this.handle);
+ }
+ public RESULT isVirtual(out bool virtualstate)
+ {
+ return FMOD_Studio_EventInstance_IsVirtual(this.handle, out virtualstate);
+ }
+ public RESULT getParameterByID(PARAMETER_ID id, out float value)
+ {
+ float finalvalue;
+ return getParameterByID(id, out value, out finalvalue);
+ }
+ public RESULT getParameterByID(PARAMETER_ID id, out float value, out float finalvalue)
+ {
+ return FMOD_Studio_EventInstance_GetParameterByID(this.handle, id, out value, out finalvalue);
+ }
+ public RESULT setParameterByID(PARAMETER_ID id, float value, bool ignoreseekspeed = false)
+ {
+ return FMOD_Studio_EventInstance_SetParameterByID(this.handle, id, value, ignoreseekspeed);
+ }
+ public RESULT setParametersByIDs(PARAMETER_ID[] ids, float[] values, int count, bool ignoreseekspeed = false)
+ {
+ return FMOD_Studio_EventInstance_SetParametersByIDs(this.handle, ids, values, count, ignoreseekspeed);
+ }
+ public RESULT getParameterByName(string name, out float value)
+ {
+ float finalValue;
+ return getParameterByName(name, out value, out finalValue);
+ }
+ public RESULT getParameterByName(string name, out float value, out float finalvalue)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_EventInstance_GetParameterByName(this.handle, encoder.byteFromStringUTF8(name), out value, out finalvalue);
+ }
+ }
+ public RESULT setParameterByName(string name, float value, bool ignoreseekspeed = false)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_EventInstance_SetParameterByName(this.handle, encoder.byteFromStringUTF8(name), value, ignoreseekspeed);
+ }
+ }
+ public RESULT triggerCue()
+ {
+ return FMOD_Studio_EventInstance_TriggerCue(this.handle);
+ }
+ public RESULT setCallback(EVENT_CALLBACK callback, EVENT_CALLBACK_TYPE callbackmask = EVENT_CALLBACK_TYPE.ALL)
+ {
+ return FMOD_Studio_EventInstance_SetCallback(this.handle, callback, callbackmask);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD_Studio_EventInstance_GetUserData(this.handle, out userdata);
+ }
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD_Studio_EventInstance_SetUserData(this.handle, userdata);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_EventInstance_IsValid (IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetDescription (IntPtr _event, out IntPtr description);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetVolume (IntPtr _event, out float volume, out float finalvolume);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetVolume (IntPtr _event, float volume);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetPitch (IntPtr _event, out float pitch, out float finalpitch);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetPitch (IntPtr _event, float pitch);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_Get3DAttributes (IntPtr _event, out ATTRIBUTES_3D attributes);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_Set3DAttributes (IntPtr _event, ref ATTRIBUTES_3D attributes);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetListenerMask (IntPtr _event, out uint mask);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetListenerMask (IntPtr _event, uint mask);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetProperty (IntPtr _event, EVENT_PROPERTY index, out float value);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetProperty (IntPtr _event, EVENT_PROPERTY index, float value);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetReverbLevel (IntPtr _event, int index, out float level);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetReverbLevel (IntPtr _event, int index, float level);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetPaused (IntPtr _event, out bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetPaused (IntPtr _event, bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_Start (IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_Stop (IntPtr _event, STOP_MODE mode);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetTimelinePosition (IntPtr _event, out int position);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetTimelinePosition (IntPtr _event, int position);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetPlaybackState (IntPtr _event, out PLAYBACK_STATE state);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetChannelGroup (IntPtr _event, out IntPtr group);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_Release (IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_IsVirtual (IntPtr _event, out bool virtualstate);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetParameterByName (IntPtr _event, byte[] name, out float value, out float finalvalue);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetParameterByName (IntPtr _event, byte[] name, float value, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetParameterByID (IntPtr _event, PARAMETER_ID id, out float value, out float finalvalue);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetParameterByID (IntPtr _event, PARAMETER_ID id, float value, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetParametersByIDs (IntPtr _event, PARAMETER_ID[] ids, float[] values, int count, bool ignoreseekspeed);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_TriggerCue (IntPtr _event);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetCallback (IntPtr _event, EVENT_CALLBACK callback, EVENT_CALLBACK_TYPE callbackmask);
+ [DllImport (STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_GetUserData (IntPtr _event, out IntPtr userdata);
+ [DllImport (STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_EventInstance_SetUserData (IntPtr _event, IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_EventInstance_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct Bus
+ {
+ public RESULT getID(out Guid id)
+ {
+ return FMOD_Studio_Bus_GetID(this.handle, out id);
+ }
+ public RESULT getPath(out string path)
+ {
+ path = null;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_Bus_GetPath(this.handle, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_Bus_GetPath(this.handle, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+
+ }
+ public RESULT getVolume(out float volume)
+ {
+ float finalVolume;
+ return getVolume(out volume, out finalVolume);
+ }
+ public RESULT getVolume(out float volume, out float finalvolume)
+ {
+ return FMOD_Studio_Bus_GetVolume(this.handle, out volume, out finalvolume);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD_Studio_Bus_SetVolume(this.handle, volume);
+ }
+ public RESULT getPaused(out bool paused)
+ {
+ return FMOD_Studio_Bus_GetPaused(this.handle, out paused);
+ }
+ public RESULT setPaused(bool paused)
+ {
+ return FMOD_Studio_Bus_SetPaused(this.handle, paused);
+ }
+ public RESULT getMute(out bool mute)
+ {
+ return FMOD_Studio_Bus_GetMute(this.handle, out mute);
+ }
+ public RESULT setMute(bool mute)
+ {
+ return FMOD_Studio_Bus_SetMute(this.handle, mute);
+ }
+ public RESULT stopAllEvents(STOP_MODE mode)
+ {
+ return FMOD_Studio_Bus_StopAllEvents(this.handle, mode);
+ }
+ public RESULT lockChannelGroup()
+ {
+ return FMOD_Studio_Bus_LockChannelGroup(this.handle);
+ }
+ public RESULT unlockChannelGroup()
+ {
+ return FMOD_Studio_Bus_UnlockChannelGroup(this.handle);
+ }
+ public RESULT getChannelGroup(out FMOD.ChannelGroup group)
+ {
+ return FMOD_Studio_Bus_GetChannelGroup(this.handle, out group.handle);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_Bus_IsValid (IntPtr bus);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetID (IntPtr bus, out Guid id);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetPath (IntPtr bus, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetVolume (IntPtr bus, out float volume, out float finalvolume);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_SetVolume (IntPtr bus, float volume);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetPaused (IntPtr bus, out bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_SetPaused (IntPtr bus, bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetMute (IntPtr bus, out bool mute);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_SetMute (IntPtr bus, bool mute);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_StopAllEvents (IntPtr bus, STOP_MODE mode);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_LockChannelGroup (IntPtr bus);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_UnlockChannelGroup (IntPtr bus);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bus_GetChannelGroup (IntPtr bus, out IntPtr group);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_Bus_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct VCA
+ {
+ public RESULT getID(out Guid id)
+ {
+ return FMOD_Studio_VCA_GetID(this.handle, out id);
+ }
+ public RESULT getPath(out string path)
+ {
+ path = null;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_VCA_GetPath(this.handle, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_VCA_GetPath(this.handle, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+ public RESULT getVolume(out float volume)
+ {
+ float finalVolume;
+ return getVolume(out volume, out finalVolume);
+ }
+ public RESULT getVolume(out float volume, out float finalvolume)
+ {
+ return FMOD_Studio_VCA_GetVolume(this.handle, out volume, out finalvolume);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD_Studio_VCA_SetVolume(this.handle, volume);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_VCA_IsValid (IntPtr vca);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_VCA_GetID (IntPtr vca, out Guid id);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_VCA_GetPath (IntPtr vca, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_VCA_GetVolume (IntPtr vca, out float volume, out float finalvolume);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_VCA_SetVolume (IntPtr vca, float volume);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_VCA_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct Bank
+ {
+ // Property access
+
+ public RESULT getID(out Guid id)
+ {
+ return FMOD_Studio_Bank_GetID(this.handle, out id);
+ }
+ public RESULT getPath(out string path)
+ {
+ path = null;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_Bank_GetPath(this.handle, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_Bank_GetPath(this.handle, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+ public RESULT unload()
+ {
+ return FMOD_Studio_Bank_Unload(this.handle);
+ }
+ public RESULT loadSampleData()
+ {
+ return FMOD_Studio_Bank_LoadSampleData(this.handle);
+ }
+ public RESULT unloadSampleData()
+ {
+ return FMOD_Studio_Bank_UnloadSampleData(this.handle);
+ }
+ public RESULT getLoadingState(out LOADING_STATE state)
+ {
+ return FMOD_Studio_Bank_GetLoadingState(this.handle, out state);
+ }
+ public RESULT getSampleLoadingState(out LOADING_STATE state)
+ {
+ return FMOD_Studio_Bank_GetSampleLoadingState(this.handle, out state);
+ }
+
+ // Enumeration
+ public RESULT getStringCount(out int count)
+ {
+ return FMOD_Studio_Bank_GetStringCount(this.handle, out count);
+ }
+ public RESULT getStringInfo(int index, out Guid id, out string path)
+ {
+ path = null;
+ id = Guid.Empty;
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ int retrieved = 0;
+ RESULT result = FMOD_Studio_Bank_GetStringInfo(this.handle, index, out id, stringMem, 256, out retrieved);
+
+ if (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringMem = Marshal.AllocHGlobal(retrieved);
+ result = FMOD_Studio_Bank_GetStringInfo(this.handle, index, out id, stringMem, retrieved, out retrieved);
+ }
+
+ if (result == RESULT.OK)
+ {
+ path = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+
+ public RESULT getEventCount(out int count)
+ {
+ return FMOD_Studio_Bank_GetEventCount(this.handle, out count);
+ }
+ public RESULT getEventList(out EventDescription[] array)
+ {
+ array = null;
+
+ RESULT result;
+ int capacity;
+ result = FMOD_Studio_Bank_GetEventCount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new EventDescription[0];
+ return result;
+ }
+
+ IntPtr[] rawArray = new IntPtr[capacity];
+ int actualCount;
+ result = FMOD_Studio_Bank_GetEventList(this.handle, rawArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (actualCount > capacity) // More items added since we queried just now?
+ {
+ actualCount = capacity;
+ }
+ array = new EventDescription[actualCount];
+ for (int i = 0; i < actualCount; ++i)
+ {
+ array[i].handle = rawArray[i];
+ }
+ return RESULT.OK;
+ }
+ public RESULT getBusCount(out int count)
+ {
+ return FMOD_Studio_Bank_GetBusCount(this.handle, out count);
+ }
+ public RESULT getBusList(out Bus[] array)
+ {
+ array = null;
+
+ RESULT result;
+ int capacity;
+ result = FMOD_Studio_Bank_GetBusCount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new Bus[0];
+ return result;
+ }
+
+ IntPtr[] rawArray = new IntPtr[capacity];
+ int actualCount;
+ result = FMOD_Studio_Bank_GetBusList(this.handle, rawArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (actualCount > capacity) // More items added since we queried just now?
+ {
+ actualCount = capacity;
+ }
+ array = new Bus[actualCount];
+ for (int i = 0; i < actualCount; ++i)
+ {
+ array[i].handle = rawArray[i];
+ }
+ return RESULT.OK;
+ }
+ public RESULT getVCACount(out int count)
+ {
+ return FMOD_Studio_Bank_GetVCACount(this.handle, out count);
+ }
+ public RESULT getVCAList(out VCA[] array)
+ {
+ array = null;
+
+ RESULT result;
+ int capacity;
+ result = FMOD_Studio_Bank_GetVCACount(this.handle, out capacity);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (capacity == 0)
+ {
+ array = new VCA[0];
+ return result;
+ }
+
+ IntPtr[] rawArray = new IntPtr[capacity];
+ int actualCount;
+ result = FMOD_Studio_Bank_GetVCAList(this.handle, rawArray, capacity, out actualCount);
+ if (result != RESULT.OK)
+ {
+ return result;
+ }
+ if (actualCount > capacity) // More items added since we queried just now?
+ {
+ actualCount = capacity;
+ }
+ array = new VCA[actualCount];
+ for (int i = 0; i < actualCount; ++i)
+ {
+ array[i].handle = rawArray[i];
+ }
+ return RESULT.OK;
+ }
+
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD_Studio_Bank_GetUserData(this.handle, out userdata);
+ }
+
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD_Studio_Bank_SetUserData(this.handle, userdata);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_Bank_IsValid (IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetID (IntPtr bank, out Guid id);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetPath (IntPtr bank, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_Unload (IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_LoadSampleData (IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_UnloadSampleData (IntPtr bank);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetLoadingState (IntPtr bank, out LOADING_STATE state);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetSampleLoadingState (IntPtr bank, out LOADING_STATE state);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetStringCount (IntPtr bank, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetStringInfo (IntPtr bank, int index, out Guid id, IntPtr path, int size, out int retrieved);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetEventCount (IntPtr bank, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetEventList (IntPtr bank, IntPtr[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetBusCount (IntPtr bank, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetBusList (IntPtr bank, IntPtr[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetVCACount (IntPtr bank, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetVCAList (IntPtr bank, IntPtr[] array, int capacity, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_GetUserData (IntPtr bank, out IntPtr userdata);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_Bank_SetUserData (IntPtr bank, IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_Bank_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+
+ public struct CommandReplay
+ {
+ // Information query
+ public RESULT getSystem(out System system)
+ {
+ return FMOD_Studio_CommandReplay_GetSystem(this.handle, out system.handle);
+ }
+
+ public RESULT getLength(out float length)
+ {
+ return FMOD_Studio_CommandReplay_GetLength(this.handle, out length);
+ }
+ public RESULT getCommandCount(out int count)
+ {
+ return FMOD_Studio_CommandReplay_GetCommandCount(this.handle, out count);
+ }
+ public RESULT getCommandInfo(int commandIndex, out COMMAND_INFO info)
+ {
+ return FMOD_Studio_CommandReplay_GetCommandInfo(this.handle, commandIndex, out info);
+ }
+
+ public RESULT getCommandString(int commandIndex, out string buffer)
+ {
+ buffer = null;
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ int stringLength = 256;
+ IntPtr stringMem = Marshal.AllocHGlobal(256);
+ RESULT result = FMOD_Studio_CommandReplay_GetCommandString(this.handle, commandIndex, stringMem, stringLength);
+
+ while (result == RESULT.ERR_TRUNCATED)
+ {
+ Marshal.FreeHGlobal(stringMem);
+ stringLength *= 2;
+ stringMem = Marshal.AllocHGlobal(stringLength);
+ result = FMOD_Studio_CommandReplay_GetCommandString(this.handle, commandIndex, stringMem, stringLength);
+ }
+
+ if (result == RESULT.OK)
+ {
+ buffer = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+ return result;
+ }
+ }
+ public RESULT getCommandAtTime(float time, out int commandIndex)
+ {
+ return FMOD_Studio_CommandReplay_GetCommandAtTime(this.handle, time, out commandIndex);
+ }
+ // Playback
+ public RESULT setBankPath(string bankPath)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD_Studio_CommandReplay_SetBankPath(this.handle, encoder.byteFromStringUTF8(bankPath));
+ }
+ }
+ public RESULT start()
+ {
+ return FMOD_Studio_CommandReplay_Start(this.handle);
+ }
+ public RESULT stop()
+ {
+ return FMOD_Studio_CommandReplay_Stop(this.handle);
+ }
+ public RESULT seekToTime(float time)
+ {
+ return FMOD_Studio_CommandReplay_SeekToTime(this.handle, time);
+ }
+ public RESULT seekToCommand(int commandIndex)
+ {
+ return FMOD_Studio_CommandReplay_SeekToCommand(this.handle, commandIndex);
+ }
+ public RESULT getPaused(out bool paused)
+ {
+ return FMOD_Studio_CommandReplay_GetPaused(this.handle, out paused);
+ }
+ public RESULT setPaused(bool paused)
+ {
+ return FMOD_Studio_CommandReplay_SetPaused(this.handle, paused);
+ }
+ public RESULT getPlaybackState(out PLAYBACK_STATE state)
+ {
+ return FMOD_Studio_CommandReplay_GetPlaybackState(this.handle, out state);
+ }
+ public RESULT getCurrentCommand(out int commandIndex, out float currentTime)
+ {
+ return FMOD_Studio_CommandReplay_GetCurrentCommand(this.handle, out commandIndex, out currentTime);
+ }
+ // Release
+ public RESULT release()
+ {
+ return FMOD_Studio_CommandReplay_Release(this.handle);
+ }
+ // Callbacks
+ public RESULT setFrameCallback(COMMANDREPLAY_FRAME_CALLBACK callback)
+ {
+ return FMOD_Studio_CommandReplay_SetFrameCallback(this.handle, callback);
+ }
+ public RESULT setLoadBankCallback(COMMANDREPLAY_LOAD_BANK_CALLBACK callback)
+ {
+ return FMOD_Studio_CommandReplay_SetLoadBankCallback(this.handle, callback);
+ }
+ public RESULT setCreateInstanceCallback(COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback)
+ {
+ return FMOD_Studio_CommandReplay_SetCreateInstanceCallback(this.handle, callback);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD_Studio_CommandReplay_GetUserData(this.handle, out userdata);
+ }
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD_Studio_CommandReplay_SetUserData(this.handle, userdata);
+ }
+
+ #region importfunctions
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern bool FMOD_Studio_CommandReplay_IsValid (IntPtr replay);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetSystem (IntPtr replay, out IntPtr system);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetLength (IntPtr replay, out float length);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetCommandCount (IntPtr replay, out int count);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetCommandInfo (IntPtr replay, int commandindex, out COMMAND_INFO info);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetCommandString (IntPtr replay, int commandIndex, IntPtr buffer, int length);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetCommandAtTime (IntPtr replay, float time, out int commandIndex);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetBankPath (IntPtr replay, byte[] bankPath);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_Start (IntPtr replay);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_Stop (IntPtr replay);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SeekToTime (IntPtr replay, float time);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SeekToCommand (IntPtr replay, int commandIndex);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetPaused (IntPtr replay, out bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetPaused (IntPtr replay, bool paused);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetPlaybackState (IntPtr replay, out PLAYBACK_STATE state);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetCurrentCommand (IntPtr replay, out int commandIndex, out float currentTime);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_Release (IntPtr replay);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetFrameCallback (IntPtr replay, COMMANDREPLAY_FRAME_CALLBACK callback);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetLoadBankCallback (IntPtr replay, COMMANDREPLAY_LOAD_BANK_CALLBACK callback);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetCreateInstanceCallback(IntPtr replay, COMMANDREPLAY_CREATE_INSTANCE_CALLBACK callback);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_GetUserData (IntPtr replay, out IntPtr userdata);
+ [DllImport(STUDIO_VERSION.dll)]
+ private static extern RESULT FMOD_Studio_CommandReplay_SetUserData (IntPtr replay, IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ public bool isValid()
+ {
+ return hasHandle() && FMOD_Studio_CommandReplay_IsValid(this.handle);
+ }
+
+ #endregion
+ }
+} // FMOD
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod.cs
new file mode 100644
index 0000000..26e274a
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod.cs
@@ -0,0 +1,3791 @@
+/* ======================================================================================== */
+/* FMOD Core API - C# wrapper. */
+/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2020. */
+/* */
+/* For more detail visit: */
+/* https://fmod.com/resources/documentation-api?version=2.0&page=core-api.html */
+/* ======================================================================================== */
+
+using System;
+using System.Text;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+
+namespace FMOD
+{
+ /*
+ FMOD version number. Check this against FMOD::System::getVersion / System_GetVersion
+ 0xaaaabbcc -> aaaa = major version number. bb = minor version number. cc = development version number.
+ */
+ public class VERSION
+ {
+ public const int number = 0x00020008;
+#if (UNITY_IPHONE || UNITY_TVOS || UNITY_SWITCH || UNITY_WEBGL) && !UNITY_EDITOR
+ public const string dll = "__Internal";
+#elif (UNITY_PS4) && DEVELOPMENT_BUILD
+ public const string dll = "libfmodL";
+#elif (UNITY_PS4) && !UNITY_EDITOR
+ public const string dll = "libfmod";
+#elif (UNITY_PSP2) && !UNITY_EDITOR
+ public const string dll = "libfmodstudio";
+/* Linux defines moved before the Windows define, otherwise Linux Editor tries to use Win lib when selected as build target.*/
+#elif (UNITY_EDITOR_LINUX) || ((UNITY_STANDALONE_LINUX || UNITY_ANDROID || UNITY_XBOXONE || UNITY_STADIA) && DEVELOPMENT_BUILD)
+ public const string dll = "fmodL";
+#elif (UNITY_EDITOR_OSX || UNITY_EDITOR_WIN) || ((UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN) && DEVELOPMENT_BUILD)
+ public const string dll = "fmodstudioL";
+#elif (UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN)
+ public const string dll = "fmodstudio";
+#else
+ public const string dll = "fmod";
+#endif
+ }
+
+ public class CONSTANTS
+ {
+ public const int MAX_CHANNEL_WIDTH = 32;
+ public const int MAX_LISTENERS = 8;
+ public const int REVERB_MAXINSTANCES = 4;
+ public const int MAX_SYSTEMS = 8;
+ }
+
+ /*
+ FMOD types
+ */
+ public enum RESULT : int
+ {
+ OK, /* No errors. */
+ ERR_BADCOMMAND, /* Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). */
+ ERR_CHANNEL_ALLOC, /* Error trying to allocate a channel. */
+ ERR_CHANNEL_STOLEN, /* The specified channel has been reused to play another sound. */
+ ERR_DMA, /* DMA Failure. See debug output for more information. */
+ ERR_DSP_CONNECTION, /* DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts. */
+ ERR_DSP_DONTPROCESS, /* DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph. */
+ ERR_DSP_FORMAT, /* DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map. */
+ ERR_DSP_INUSE, /* DSP is already in the mixer's DSP network. It must be removed before being reinserted or released. */
+ ERR_DSP_NOTFOUND, /* DSP connection error. Couldn't find the DSP unit specified. */
+ ERR_DSP_RESERVED, /* DSP operation error. Cannot perform operation on this DSP as it is reserved by the system. */
+ ERR_DSP_SILENCE, /* DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph. */
+ ERR_DSP_TYPE, /* DSP operation cannot be performed on a DSP of this type. */
+ ERR_FILE_BAD, /* Error loading file. */
+ ERR_FILE_COULDNOTSEEK, /* Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. */
+ ERR_FILE_DISKEJECTED, /* Media was ejected while reading. */
+ ERR_FILE_EOF, /* End of file unexpectedly reached while trying to read essential data (truncated?). */
+ ERR_FILE_ENDOFDATA, /* End of current chunk reached while trying to read data. */
+ ERR_FILE_NOTFOUND, /* File not found. */
+ ERR_FORMAT, /* Unsupported file or audio format. */
+ ERR_HEADER_MISMATCH, /* There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library. */
+ ERR_HTTP, /* A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. */
+ ERR_HTTP_ACCESS, /* The specified resource requires authentication or is forbidden. */
+ ERR_HTTP_PROXY_AUTH, /* Proxy authentication is required to access the specified resource. */
+ ERR_HTTP_SERVER_ERROR, /* A HTTP server error occurred. */
+ ERR_HTTP_TIMEOUT, /* The HTTP request timed out. */
+ ERR_INITIALIZATION, /* FMOD was not initialized correctly to support this function. */
+ ERR_INITIALIZED, /* Cannot call this command after System::init. */
+ ERR_INTERNAL, /* An error occurred that wasn't supposed to. Contact support. */
+ ERR_INVALID_FLOAT, /* Value passed in was a NaN, Inf or denormalized float. */
+ ERR_INVALID_HANDLE, /* An invalid object handle was used. */
+ ERR_INVALID_PARAM, /* An invalid parameter was passed to this function. */
+ ERR_INVALID_POSITION, /* An invalid seek position was passed to this function. */
+ ERR_INVALID_SPEAKER, /* An invalid speaker was passed to this function based on the current speaker mode. */
+ ERR_INVALID_SYNCPOINT, /* The syncpoint did not come from this sound handle. */
+ ERR_INVALID_THREAD, /* Tried to call a function on a thread that is not supported. */
+ ERR_INVALID_VECTOR, /* The vectors passed in are not unit length, or perpendicular. */
+ ERR_MAXAUDIBLE, /* Reached maximum audible playback count for this sound's soundgroup. */
+ ERR_MEMORY, /* Not enough memory or resources. */
+ ERR_MEMORY_CANTPOINT, /* Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. */
+ ERR_NEEDS3D, /* Tried to call a command on a 2d sound when the command was meant for 3d sound. */
+ ERR_NEEDSHARDWARE, /* Tried to use a feature that requires hardware support. */
+ ERR_NET_CONNECT, /* Couldn't connect to the specified host. */
+ ERR_NET_SOCKET_ERROR, /* A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere. */
+ ERR_NET_URL, /* The specified URL couldn't be resolved. */
+ ERR_NET_WOULD_BLOCK, /* Operation on a non-blocking socket could not complete immediately. */
+ ERR_NOTREADY, /* Operation could not be performed because specified sound/DSP connection is not ready. */
+ ERR_OUTPUT_ALLOCATED, /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
+ ERR_OUTPUT_CREATEBUFFER, /* Error creating hardware sound buffer. */
+ ERR_OUTPUT_DRIVERCALL, /* A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. */
+ ERR_OUTPUT_FORMAT, /* Soundcard does not support the specified format. */
+ ERR_OUTPUT_INIT, /* Error initializing output device. */
+ ERR_OUTPUT_NODRIVERS, /* The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails. */
+ ERR_PLUGIN, /* An unspecified error has been returned from a plugin. */
+ ERR_PLUGIN_MISSING, /* A requested output, dsp unit type or codec was not available. */
+ ERR_PLUGIN_RESOURCE, /* A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) */
+ ERR_PLUGIN_VERSION, /* A plugin was built with an unsupported SDK version. */
+ ERR_RECORD, /* An error occurred trying to initialize the recording device. */
+ ERR_REVERB_CHANNELGROUP, /* Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection. */
+ ERR_REVERB_INSTANCE, /* Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist. */
+ ERR_SUBSOUNDS, /* The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound. */
+ ERR_SUBSOUND_ALLOCATED, /* This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first. */
+ ERR_SUBSOUND_CANTMOVE, /* Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. */
+ ERR_TAGNOTFOUND, /* The specified tag could not be found or there are no tags. */
+ ERR_TOOMANYCHANNELS, /* The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat. */
+ ERR_TRUNCATED, /* The retrieved string is too long to fit in the supplied buffer and has been truncated. */
+ ERR_UNIMPLEMENTED, /* Something in FMOD hasn't been implemented when it should be! contact support! */
+ ERR_UNINITIALIZED, /* This command failed because System::init or System::setDriver was not called. */
+ ERR_UNSUPPORTED, /* A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. */
+ ERR_VERSION, /* The version number of this file format is not supported. */
+ ERR_EVENT_ALREADY_LOADED, /* The specified bank has already been loaded. */
+ ERR_EVENT_LIVEUPDATE_BUSY, /* The live update connection failed due to the game already being connected. */
+ ERR_EVENT_LIVEUPDATE_MISMATCH, /* The live update connection failed due to the game data being out of sync with the tool. */
+ ERR_EVENT_LIVEUPDATE_TIMEOUT, /* The live update connection timed out. */
+ ERR_EVENT_NOTFOUND, /* The requested event, bus or vca could not be found. */
+ ERR_STUDIO_UNINITIALIZED, /* The Studio::System object is not yet initialized. */
+ ERR_STUDIO_NOT_LOADED, /* The specified resource is not loaded, so it can't be unloaded. */
+ ERR_INVALID_STRING, /* An invalid string was passed to this function. */
+ ERR_ALREADY_LOCKED, /* The specified resource is already locked. */
+ ERR_NOT_LOCKED, /* The specified resource is not locked, so it can't be unlocked. */
+ ERR_RECORD_DISCONNECTED, /* The specified recording driver has been disconnected. */
+ ERR_TOOMANYSAMPLES, /* The length provided exceed the allowable limit. */
+ }
+
+ public enum CHANNELCONTROL_TYPE : int
+ {
+ CHANNEL,
+ CHANNELGROUP,
+ MAX
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct VECTOR
+ {
+ public float x; /* X co-ordinate in 3D space. */
+ public float y; /* Y co-ordinate in 3D space. */
+ public float z; /* Z co-ordinate in 3D space. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ATTRIBUTES_3D
+ {
+ public VECTOR position;
+ public VECTOR velocity;
+ public VECTOR forward;
+ public VECTOR up;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ASYNCREADINFO
+ {
+ public IntPtr handle; /* [r] The file handle that was filled out in the open callback. */
+ public uint offset; /* [r] Seek position, make sure you read from this file offset. */
+ public uint sizebytes; /* [r] how many bytes requested for read. */
+ public int priority; /* [r] 0 = low importance. 100 = extremely important (ie 'must read now or stuttering may occur') */
+
+ public IntPtr userdata; /* [r] User data pointer. */
+ public IntPtr buffer; /* [w] Buffer to read file data into. */
+ public uint bytesread; /* [w] Fill this in before setting result code to tell FMOD how many bytes were read. */
+ public FILE_ASYNCDONE_FUNC done; /* [r] FMOD file system wake up function. Call this when user file read is finished. Pass result of file read as a parameter. */
+ }
+
+ public enum OUTPUTTYPE : int
+ {
+ AUTODETECT, /* Picks the best output mode for the platform. This is the default. */
+
+ UNKNOWN, /* All - 3rd party plugin, unknown. This is for use with System::getOutput only. */
+ NOSOUND, /* All - Perform all mixing but discard the final output. */
+ WAVWRITER, /* All - Writes output to a .wav file. */
+ NOSOUND_NRT, /* All - Non-realtime version of FMOD_OUTPUTTYPE_NOSOUND. User can drive mixer with System::update at whatever rate they want. */
+ WAVWRITER_NRT, /* All - Non-realtime version of FMOD_OUTPUTTYPE_WAVWRITER. User can drive mixer with System::update at whatever rate they want. */
+
+ WASAPI, /* Win / Xbox One - Windows Audio Session API. (Default on Windows and Xbox One) */
+ ASIO, /* Win - Low latency ASIO 2.0. */
+ PULSEAUDIO, /* Linux - Pulse Audio. (Default on Linux if available) */
+ ALSA, /* Linux - Advanced Linux Sound Architecture. (Default on Linux if PulseAudio isn't available) */
+ COREAUDIO, /* Mac / iOS - Core Audio. (Default on Mac and iOS) */
+ AUDIOTRACK, /* Android - Java Audio Track. (Default on Android 2.2 and below) */
+ OPENSL, /* Android - OpenSL ES. (Default on Android 2.3 up to 7.1) */
+ AUDIOOUT, /* PS4 - Audio Out. (Default on PS4) */
+ AUDIO3D, /* PS4 - Audio3D. */
+ WEBAUDIO, /* Web Browser - JavaScript webaudio output. (Default on JavaScript) */
+ NNAUDIO, /* Switch - nn::audio. (Default on Switch) */
+ WINSONIC, /* Win10 / Xbox One - Windows Sonic. */
+ AAUDIO, /* Android - AAudio (Default on Android 8.0 and above) */
+
+ MAX, /* Maximum number of output types supported. */
+ }
+
+ public enum DEBUG_MODE : int
+ {
+ TTY, /* Default log location per platform, i.e. Visual Studio output window, stderr, LogCat, etc */
+ FILE, /* Write log to specified file path */
+ CALLBACK, /* Call specified callback with log information */
+ }
+
+ [Flags]
+ public enum DEBUG_FLAGS : uint
+ {
+ NONE = 0x00000000, /* Disable all messages */
+ ERROR = 0x00000001, /* Enable only error messages. */
+ WARNING = 0x00000002, /* Enable warning and error messages. */
+ LOG = 0x00000004, /* Enable informational, warning and error messages (default). */
+
+ TYPE_MEMORY = 0x00000100, /* Verbose logging for memory operations, only use this if you are debugging a memory related issue. */
+ TYPE_FILE = 0x00000200, /* Verbose logging for file access, only use this if you are debugging a file related issue. */
+ TYPE_CODEC = 0x00000400, /* Verbose logging for codec initialization, only use this if you are debugging a codec related issue. */
+ TYPE_TRACE = 0x00000800, /* Verbose logging for internal errors, use this for tracking the origin of error codes. */
+
+ DISPLAY_TIMESTAMPS = 0x00010000, /* Display the time stamp of the log message in milliseconds. */
+ DISPLAY_LINENUMBERS = 0x00020000, /* Display the source code file and line number for where the message originated. */
+ DISPLAY_THREAD = 0x00040000, /* Display the thread ID of the calling function that generated the message. */
+ }
+
+ [Flags]
+ public enum MEMORY_TYPE : uint
+ {
+ NORMAL = 0x00000000, /* Standard memory. */
+ STREAM_FILE = 0x00000001, /* Stream file buffer, size controllable with System::setStreamBufferSize. */
+ STREAM_DECODE = 0x00000002, /* Stream decode buffer, size controllable with FMOD_CREATESOUNDEXINFO::decodebuffersize. */
+ SAMPLEDATA = 0x00000004, /* Sample data buffer. Raw audio data, usually PCM/MPEG/ADPCM/XMA data. */
+ DSP_BUFFER = 0x00000008, /* DSP memory block allocated when more than 1 output exists on a DSP node. */
+ PLUGIN = 0x00000010, /* Memory allocated by a third party plugin. */
+ PERSISTENT = 0x00200000, /* Persistent memory. Memory will be freed when System::release is called. */
+ ALL = 0xFFFFFFFF
+ }
+
+ public enum SPEAKERMODE : int
+ {
+ DEFAULT, /* Default speaker mode for the chosen output mode which will resolve after System::init. */
+ RAW, /* Assume there is no special mapping from a given channel to a speaker, channels map 1:1 in order. Use System::setSoftwareFormat to specify the speaker count. */
+ MONO, /* 1 speaker setup (monaural). */
+ STEREO, /* 2 speaker setup (stereo) front left, front right. */
+ QUAD, /* 4 speaker setup (4.0) front left, front right, surround left, surround right. */
+ SURROUND, /* 5 speaker setup (5.0) front left, front right, center, surround left, surround right. */
+ _5POINT1, /* 6 speaker setup (5.1) front left, front right, center, low frequency, surround left, surround right. */
+ _7POINT1, /* 8 speaker setup (7.1) front left, front right, center, low frequency, surround left, surround right, back left, back right. */
+ _7POINT1POINT4, /* 12 speaker setup (7.1.4) front left, front right, center, low frequency, surround left, surround right, back left, back right, top front left, top front right, top back left, top back right. */
+
+ MAX, /* Maximum number of speaker modes supported. */
+ }
+
+ public enum SPEAKER : int
+ {
+ NONE = -1, /* No speaker */
+ FRONT_LEFT, /* The front left speaker */
+ FRONT_RIGHT, /* The front right speaker */
+ FRONT_CENTER, /* The front center speaker */
+ LOW_FREQUENCY, /* The LFE or 'subwoofer' speaker */
+ SURROUND_LEFT, /* The surround left (usually to the side) speaker */
+ SURROUND_RIGHT, /* The surround right (usually to the side) speaker */
+ BACK_LEFT, /* The back left speaker */
+ BACK_RIGHT, /* The back right speaker */
+ TOP_FRONT_LEFT, /* The top front left speaker */
+ TOP_FRONT_RIGHT, /* The top front right speaker */
+ TOP_BACK_LEFT, /* The top back left speaker */
+ TOP_BACK_RIGHT, /* The top back right speaker */
+
+ MAX, /* Maximum number of speaker types supported. */
+ }
+
+ [Flags]
+ public enum CHANNELMASK : uint
+ {
+ FRONT_LEFT = 0x00000001,
+ FRONT_RIGHT = 0x00000002,
+ FRONT_CENTER = 0x00000004,
+ LOW_FREQUENCY = 0x00000008,
+ SURROUND_LEFT = 0x00000010,
+ SURROUND_RIGHT = 0x00000020,
+ BACK_LEFT = 0x00000040,
+ BACK_RIGHT = 0x00000080,
+ BACK_CENTER = 0x00000100,
+
+ MONO = (FRONT_LEFT),
+ STEREO = (FRONT_LEFT | FRONT_RIGHT),
+ LRC = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER),
+ QUAD = (FRONT_LEFT | FRONT_RIGHT | SURROUND_LEFT | SURROUND_RIGHT),
+ SURROUND = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT),
+ _5POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT),
+ _5POINT1_REARS = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT),
+ _7POINT0 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT),
+ _7POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT)
+ }
+
+ public enum CHANNELORDER : int
+ {
+ DEFAULT, /* Left, Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right (see FMOD_SPEAKER enumeration) */
+ WAVEFORMAT, /* Left, Right, Center, LFE, Back Left, Back Right, Surround Left, Surround Right (as per Microsoft .wav WAVEFORMAT structure master order) */
+ PROTOOLS, /* Left, Center, Right, Surround Left, Surround Right, LFE */
+ ALLMONO, /* Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel all the way up to 32 channels are treated as if they were mono) */
+ ALLSTEREO, /* Left, Right, Left, Right, Left, Right, ... (each pair of channels is treated as stereo all the way up to 32 channels) */
+ ALSA, /* Left, Right, Surround Left, Surround Right, Center, LFE (as per Linux ALSA channel order) */
+
+ MAX, /* Maximum number of channel orderings supported. */
+ }
+
+ public enum PLUGINTYPE : int
+ {
+ OUTPUT, /* The plugin type is an output module. FMOD mixed audio will play through one of these devices */
+ CODEC, /* The plugin type is a file format codec. FMOD will use these codecs to load file formats for playback. */
+ DSP, /* The plugin type is a DSP unit. FMOD will use these plugins as part of its DSP network to apply effects to output or generate sound in realtime. */
+
+ MAX, /* Maximum number of plugin types supported. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PLUGINLIST
+ {
+ PLUGINTYPE type;
+ IntPtr description;
+ }
+
+ [Flags]
+ public enum INITFLAGS : uint
+ {
+ NORMAL = 0x00000000, /* Initialize normally */
+ STREAM_FROM_UPDATE = 0x00000001, /* No stream thread is created internally. Streams are driven from System::update. Mainly used with non-realtime outputs. */
+ MIX_FROM_UPDATE = 0x00000002, /* FMOD Mixer thread is woken up to do a mix when System::update is called rather than waking periodically on its own timer. */
+ _3D_RIGHTHANDED = 0x00000004, /* FMOD will treat +X as right, +Y as up and +Z as backwards (towards you). */
+ CHANNEL_LOWPASS = 0x00000100, /* All FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which is automatically used when Channel::set3DOcclusion is used or the geometry API. This also causes sounds to sound duller when the sound goes behind the listener, as a fake HRTF style effect. Use System::setAdvancedSettings to disable or adjust cutoff frequency for this feature. */
+ CHANNEL_DISTANCEFILTER = 0x00000200, /* All FMOD_3D based voices will add a software lowpass and highpass filter effect into the DSP chain which will act as a distance-automated bandpass filter. Use System::setAdvancedSettings to adjust the center frequency. */
+ PROFILE_ENABLE = 0x00010000, /* Enable TCP/IP based host which allows FMOD Designer or FMOD Profiler to connect to it, and view memory, CPU and the DSP network graph in real-time. */
+ VOL0_BECOMES_VIRTUAL = 0x00020000, /* Any sounds that are 0 volume will go virtual and not be processed except for having their positions updated virtually. Use System::setAdvancedSettings to adjust what volume besides zero to switch to virtual at. */
+ GEOMETRY_USECLOSEST = 0x00040000, /* With the geometry engine, only process the closest polygon rather than accumulating all polygons the sound to listener line intersects. */
+ PREFER_DOLBY_DOWNMIX = 0x00080000, /* When using FMOD_SPEAKERMODE_5POINT1 with a stereo output device, use the Dolby Pro Logic II downmix algorithm instead of the default stereo downmix algorithm. */
+ THREAD_UNSAFE = 0x00100000, /* Disables thread safety for API calls. Only use this if FMOD low level is being called from a single thread, and if Studio API is not being used! */
+ PROFILE_METER_ALL = 0x00200000, /* Slower, but adds level metering for every single DSP unit in the graph. Use DSP::setMeteringEnabled to turn meters off individually. */
+ MEMORY_TRACKING = 0x00400000, /* Enable detailed memory allocation tracking. Only useful when using the Studio API. */
+ }
+
+ public enum SOUND_TYPE : int
+ {
+ UNKNOWN, /* 3rd party / unknown plugin format. */
+ AIFF, /* AIFF. */
+ ASF, /* Microsoft Advanced Systems Format (ie WMA/ASF/WMV). */
+ DLS, /* Sound font / downloadable sound bank. */
+ FLAC, /* FLAC lossless codec. */
+ FSB, /* FMOD Sample Bank. */
+ IT, /* Impulse Tracker. */
+ MIDI, /* MIDI. extracodecdata is a pointer to an FMOD_MIDI_EXTRACODECDATA structure. */
+ MOD, /* Protracker / Fasttracker MOD. */
+ MPEG, /* MP2/MP3 MPEG. */
+ OGGVORBIS, /* Ogg vorbis. */
+ PLAYLIST, /* Information only from ASX/PLS/M3U/WAX playlists */
+ RAW, /* Raw PCM data. */
+ S3M, /* ScreamTracker 3. */
+ USER, /* User created sound. */
+ WAV, /* Microsoft WAV. */
+ XM, /* FastTracker 2 XM. */
+ XMA, /* Xbox One XMA */
+ AUDIOQUEUE, /* iPhone hardware decoder, supports AAC, ALAC and MP3. extracodecdata is a pointer to an FMOD_AUDIOQUEUE_EXTRACODECDATA structure. */
+ AT9, /* PS4 ATRAC 9 format */
+ VORBIS, /* Vorbis */
+ MEDIA_FOUNDATION,/* Windows Store Application built in system codecs */
+ MEDIACODEC, /* Android MediaCodec */
+ FADPCM, /* FMOD Adaptive Differential Pulse Code Modulation */
+ OPUS, /* Opus */
+
+ MAX, /* Maximum number of sound types supported. */
+ }
+
+ public enum SOUND_FORMAT : int
+ {
+ NONE, /* Unitialized / unknown */
+ PCM8, /* 8bit integer PCM data */
+ PCM16, /* 16bit integer PCM data */
+ PCM24, /* 24bit integer PCM data */
+ PCM32, /* 32bit integer PCM data */
+ PCMFLOAT, /* 32bit floating point PCM data */
+ BITSTREAM, /* Sound data is in its native compressed format. */
+
+ MAX /* Maximum number of sound formats supported. */
+ }
+
+ [Flags]
+ public enum MODE : uint
+ {
+ DEFAULT = 0x00000000, /* Default for all modes listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_3D_WORLDRELATIVE, FMOD_3D_INVERSEROLLOFF */
+ LOOP_OFF = 0x00000001, /* For non looping sounds. (default). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI. */
+ LOOP_NORMAL = 0x00000002, /* For forward looping sounds. */
+ LOOP_BIDI = 0x00000004, /* For bidirectional looping sounds. (only works on software mixed static sounds). */
+ _2D = 0x00000008, /* Ignores any 3d processing. (default). */
+ _3D = 0x00000010, /* Makes the sound positionable in 3D. Overrides FMOD_2D. */
+ CREATESTREAM = 0x00000080, /* Decompress at runtime, streaming from the source provided (standard stream). Overrides FMOD_CREATESAMPLE. */
+ CREATESAMPLE = 0x00000100, /* Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format. (standard sample). */
+ CREATECOMPRESSEDSAMPLE = 0x00000200, /* Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Can only be used in combination with FMOD_SOFTWARE. */
+ OPENUSER = 0x00000400, /* Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks. If a user created 'sample' is created with no read callback, the sample will be empty. Use FMOD_Sound_Lock and FMOD_Sound_Unlock to place sound data into the sound if this is the case. */
+ OPENMEMORY = 0x00000800, /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. */
+ OPENMEMORY_POINT = 0x10000000, /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used. */
+ OPENRAW = 0x00001000, /* Will ignore file format and treat as raw pcm. User may need to declare if data is FMOD_SIGNED or FMOD_UNSIGNED */
+ OPENONLY = 0x00002000, /* Just open the file, dont prebuffer or read. Good for fast opens for info, or when sound::readData is to be used. */
+ ACCURATETIME = 0x00004000, /* For FMOD_CreateSound - for accurate FMOD_Sound_GetLength / FMOD_Channel_SetPosition on VBR MP3, AAC and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this. */
+ MPEGSEARCH = 0x00008000, /* For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k. */
+ NONBLOCKING = 0x00010000, /* For opening sounds and getting streamed subsounds (seeking) asyncronously. Use Sound::getOpenState to poll the state of the sound as it opens or retrieves the subsound in the background. */
+ UNIQUE = 0x00020000, /* Unique sound, can only be played one at a time */
+ _3D_HEADRELATIVE = 0x00040000, /* Make the sound's position, velocity and orientation relative to the listener. */
+ _3D_WORLDRELATIVE = 0x00080000, /* Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) */
+ _3D_INVERSEROLLOFF = 0x00100000, /* This sound will follow the inverse rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (DEFAULT) */
+ _3D_LINEARROLLOFF = 0x00200000, /* This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. */
+ _3D_LINEARSQUAREROLLOFF = 0x00400000, /* This sound will follow a linear-square rolloff model where mindistance = full volume, maxdistance = silence. Rolloffscale is ignored. */
+ _3D_INVERSETAPEREDROLLOFF = 0x00800000, /* This sound will follow the inverse rolloff model at distances close to mindistance and a linear-square rolloff close to maxdistance. */
+ _3D_CUSTOMROLLOFF = 0x04000000, /* This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff. */
+ _3D_IGNOREGEOMETRY = 0x40000000, /* Is not affect by geometry occlusion. If not specified in Sound::setMode, or Channel::setMode, the flag is cleared and it is affected by geometry again. */
+ IGNORETAGS = 0x02000000, /* Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance). */
+ LOWMEM = 0x08000000, /* Removes some features from samples to give a lower memory overhead, like Sound::getName. */
+ VIRTUAL_PLAYFROMSTART = 0x80000000 /* For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start. */
+ }
+
+ public enum OPENSTATE : int
+ {
+ READY = 0, /* Opened and ready to play */
+ LOADING, /* Initial load in progress */
+ ERROR, /* Failed to open - file not found, out of memory etc. See return value of Sound::getOpenState for what happened. */
+ CONNECTING, /* Connecting to remote host (internet sounds only) */
+ BUFFERING, /* Buffering data */
+ SEEKING, /* Seeking to subsound and re-flushing stream buffer. */
+ PLAYING, /* Ready and playing, but not possible to release at this time without stalling the main thread. */
+ SETPOSITION, /* Seeking within a stream to a different position. */
+
+ MAX, /* Maximum number of open state types. */
+ }
+
+ public enum SOUNDGROUP_BEHAVIOR : int
+ {
+ BEHAVIOR_FAIL, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will simply fail during System::playSound. */
+ BEHAVIOR_MUTE, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will be silent, then if another sound in the group stops the sound that was silent before becomes audible again. */
+ BEHAVIOR_STEALLOWEST, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will steal the quietest / least important sound playing in the group. */
+
+ MAX, /* Maximum number of sound group behaviors. */
+ }
+
+ public enum CHANNELCONTROL_CALLBACK_TYPE : int
+ {
+ END, /* Called when a sound ends. */
+ VIRTUALVOICE, /* Called when a voice is swapped out or swapped in. */
+ SYNCPOINT, /* Called when a syncpoint is encountered. Can be from wav file markers. */
+ OCCLUSION, /* Called when the channel has its geometry occlusion value calculated. Can be used to clamp or change the value. */
+
+ MAX, /* Maximum number of callback types supported. */
+ }
+
+ public struct CHANNELCONTROL_DSP_INDEX
+ {
+ public const int HEAD = -1; /* Head of the DSP chain. Equivalent of index 0. */
+ public const int FADER = -2; /* Built in fader DSP. */
+ public const int TAIL = -3; /* Tail of the DSP chain. Equivalent of the number of dsps minus 1. */
+ }
+
+ public enum ERRORCALLBACK_INSTANCETYPE : int
+ {
+ NONE,
+ SYSTEM,
+ CHANNEL,
+ CHANNELGROUP,
+ CHANNELCONTROL,
+ SOUND,
+ SOUNDGROUP,
+ DSP,
+ DSPCONNECTION,
+ GEOMETRY,
+ REVERB3D,
+ STUDIO_SYSTEM,
+ STUDIO_EVENTDESCRIPTION,
+ STUDIO_EVENTINSTANCE,
+ STUDIO_PARAMETERINSTANCE,
+ STUDIO_BUS,
+ STUDIO_VCA,
+ STUDIO_BANK,
+ STUDIO_COMMANDREPLAY
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ERRORCALLBACK_INFO
+ {
+ public RESULT result; /* Error code result */
+ public ERRORCALLBACK_INSTANCETYPE instancetype; /* Type of instance the error occurred on */
+ public IntPtr instance; /* Instance pointer */
+ public StringWrapper functionname; /* Function that the error occurred on */
+ public StringWrapper functionparams; /* Function parameters that the error ocurred on */
+ }
+
+ [Flags]
+ public enum SYSTEM_CALLBACK_TYPE : uint
+ {
+ DEVICELISTCHANGED = 0x00000001, /* Called from System::update when the enumerated list of devices has changed. */
+ DEVICELOST = 0x00000002, /* Called from System::update when an output device has been lost due to control panel parameter changes and FMOD cannot automatically recover. */
+ MEMORYALLOCATIONFAILED = 0x00000004, /* Called directly when a memory allocation fails somewhere in FMOD. (NOTE - 'system' will be NULL in this callback type.)*/
+ THREADCREATED = 0x00000008, /* Called directly when a thread is created. (NOTE - 'system' will be NULL in this callback type.) */
+ BADDSPCONNECTION = 0x00000010, /* Called when a bad connection was made with DSP::addInput. Usually called from mixer thread because that is where the connections are made. */
+ PREMIX = 0x00000020, /* Called each tick before a mix update happens. */
+ POSTMIX = 0x00000040, /* Called each tick after a mix update happens. */
+ ERROR = 0x00000080, /* Called when each API function returns an error code, including delayed async functions. */
+ MIDMIX = 0x00000100, /* Called each tick in mix update after clocks have been updated before the main mix occurs. */
+ THREADDESTROYED = 0x00000200, /* Called directly when a thread is destroyed. */
+ PREUPDATE = 0x00000400, /* Called at start of System::update function. */
+ POSTUPDATE = 0x00000800, /* Called at end of System::update function. */
+ RECORDLISTCHANGED = 0x00001000, /* Called from System::update when the enumerated list of recording devices has changed. */
+ ALL = 0xFFFFFFFF, /* Pass this mask to System::setCallback to receive all callback types. */
+ }
+
+ /*
+ FMOD Callbacks
+ */
+ public delegate RESULT DEBUG_CALLBACK(DEBUG_FLAGS flags, StringWrapper file, int line, StringWrapper func, StringWrapper message);
+ public delegate RESULT SYSTEM_CALLBACK(IntPtr system, SYSTEM_CALLBACK_TYPE type, IntPtr commanddata1, IntPtr commanddata2, IntPtr userdata);
+ public delegate RESULT CHANNELCONTROL_CALLBACK(IntPtr channelcontrol, CHANNELCONTROL_TYPE controltype, CHANNELCONTROL_CALLBACK_TYPE callbacktype, IntPtr commanddata1, IntPtr commanddata2);
+ public delegate RESULT SOUND_NONBLOCK_CALLBACK(IntPtr sound, RESULT result);
+ public delegate RESULT SOUND_PCMREAD_CALLBACK(IntPtr sound, IntPtr data, uint datalen);
+ public delegate RESULT SOUND_PCMSETPOS_CALLBACK(IntPtr sound, int subsound, uint position, TIMEUNIT postype);
+ public delegate RESULT FILE_OPEN_CALLBACK(StringWrapper name, ref uint filesize, ref IntPtr handle, IntPtr userdata);
+ public delegate RESULT FILE_CLOSE_CALLBACK(IntPtr handle, IntPtr userdata);
+ public delegate RESULT FILE_READ_CALLBACK(IntPtr handle, IntPtr buffer, uint sizebytes, ref uint bytesread, IntPtr userdata);
+ public delegate RESULT FILE_SEEK_CALLBACK(IntPtr handle, uint pos, IntPtr userdata);
+ public delegate RESULT FILE_ASYNCREAD_CALLBACK(IntPtr info, IntPtr userdata);
+ public delegate RESULT FILE_ASYNCCANCEL_CALLBACK(IntPtr info, IntPtr userdata);
+ public delegate RESULT FILE_ASYNCDONE_FUNC(IntPtr info, RESULT result);
+ public delegate IntPtr MEMORY_ALLOC_CALLBACK(uint size, MEMORY_TYPE type, StringWrapper sourcestr);
+ public delegate IntPtr MEMORY_REALLOC_CALLBACK(IntPtr ptr, uint size, MEMORY_TYPE type, StringWrapper sourcestr);
+ public delegate void MEMORY_FREE_CALLBACK(IntPtr ptr, MEMORY_TYPE type, StringWrapper sourcestr);
+ public delegate float CB_3D_ROLLOFF_CALLBACK(IntPtr channelcontrol, float distance);
+
+ public enum DSP_RESAMPLER : int
+ {
+ DEFAULT, /* Default interpolation method. Currently equal to FMOD_DSP_RESAMPLER_LINEAR. */
+ NOINTERP, /* No interpolation. High frequency aliasing hiss will be audible depending on the sample rate of the sound. */
+ LINEAR, /* Linear interpolation (default method). Fast and good quality, causes very slight lowpass effect on low frequency sounds. */
+ CUBIC, /* Cubic interpolation. Slower than linear interpolation but better quality. */
+ SPLINE, /* 5 point spline interpolation. Slowest resampling method but best quality. */
+
+ MAX, /* Maximum number of resample methods supported. */
+ }
+
+ public enum DSPCONNECTION_TYPE : int
+ {
+ STANDARD, /* Default connection type. Audio is mixed from the input to the output DSP's audible buffer. */
+ SIDECHAIN, /* Sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer. */
+ SEND, /* Send connection type. Audio is mixed from the input to the output DSP's audible buffer, but the input is NOT executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. */
+ SEND_SIDECHAIN, /* Send sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer, but the input is NOT executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. */
+
+ MAX, /* Maximum number of DSP connection types supported. */
+ }
+
+ public enum TAGTYPE : int
+ {
+ UNKNOWN = 0,
+ ID3V1,
+ ID3V2,
+ VORBISCOMMENT,
+ SHOUTCAST,
+ ICECAST,
+ ASF,
+ MIDI,
+ PLAYLIST,
+ FMOD,
+ USER,
+
+ MAX /* Maximum number of tag types supported. */
+ }
+
+ public enum TAGDATATYPE : int
+ {
+ BINARY = 0,
+ INT,
+ FLOAT,
+ STRING,
+ STRING_UTF16,
+ STRING_UTF16BE,
+ STRING_UTF8,
+
+ MAX /* Maximum number of tag datatypes supported. */
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct TAG
+ {
+ public TAGTYPE type; /* [r] The type of this tag. */
+ public TAGDATATYPE datatype; /* [r] The type of data that this tag contains */
+ public StringWrapper name; /* [r] The name of this tag i.e. "TITLE", "ARTIST" etc. */
+ public IntPtr data; /* [r] Pointer to the tag data - its format is determined by the datatype member */
+ public uint datalen; /* [r] Length of the data contained in this tag */
+ public bool updated; /* [r] True if this tag has been updated since last being accessed with Sound::getTag */
+ }
+
+ [Flags]
+ public enum TIMEUNIT : uint
+ {
+ MS = 0x00000001, /* Milliseconds. */
+ PCM = 0x00000002, /* PCM Samples, related to milliseconds * samplerate / 1000. */
+ PCMBYTES = 0x00000004, /* Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). */
+ RAWBYTES = 0x00000008, /* Raw file bytes of (compressed) sound data (does not include headers). Only used by Sound::getLength and Channel::getPosition. */
+ PCMFRACTION = 0x00000010, /* Fractions of 1 PCM sample. Unsigned int range 0 to 0xFFFFFFFF. Used for sub-sample granularity for DSP purposes. */
+ MODORDER = 0x00000100, /* MOD/S3M/XM/IT. Order in a sequenced module format. Use Sound::getFormat to determine the format. */
+ MODROW = 0x00000200, /* MOD/S3M/XM/IT. Current row in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number if rows in the currently playing or seeked to pattern. */
+ MODPATTERN = 0x00000400, /* MOD/S3M/XM/IT. Current pattern in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number of patterns in the song and Channel::getPosition will return the currently playing pattern. */
+ }
+
+ public struct PORT_INDEX
+ {
+ public const ulong NONE = 0xFFFFFFFFFFFFFFFF;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct CREATESOUNDEXINFO
+ {
+ public int cbsize; /* [w] Size of this structure. This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. */
+ public uint length; /* [w] Optional. Specify 0 to ignore. Size in bytes of file to load, or sound to create (in this case only if FMOD_OPENUSER is used). Required if loading from memory. If 0 is specified, then it will use the size of the file (unless loading from memory then an error will be returned). */
+ public uint fileoffset; /* [w] Optional. Specify 0 to ignore. Offset from start of the file to start loading from. This is useful for loading files from inside big data files. */
+ public int numchannels; /* [w] Optional. Specify 0 to ignore. Number of channels in a sound specified only if OPENUSER is used. */
+ public int defaultfrequency; /* [w] Optional. Specify 0 to ignore. Default frequency of sound in a sound specified only if OPENUSER is used. Other formats use the frequency determined by the file format. */
+ public SOUND_FORMAT format; /* [w] Optional. Specify 0 or SOUND_FORMAT_NONE to ignore. Format of the sound specified only if OPENUSER is used. Other formats use the format determined by the file format. */
+ public uint decodebuffersize; /* [w] Optional. Specify 0 to ignore. For streams. This determines the size of the double buffer (in PCM samples) that a stream uses. Use this for user created streams if you want to determine the size of the callback buffer passed to you. Specify 0 to use FMOD's default size which is currently equivalent to 400ms of the sound format created/loaded. */
+ public int initialsubsound; /* [w] Optional. Specify 0 to ignore. In a multi-sample file format such as .FSB/.DLS/.SF2, specify the initial subsound to seek to, only if CREATESTREAM is used. */
+ public int numsubsounds; /* [w] Optional. Specify 0 to ignore or have no subsounds. In a user created multi-sample sound, specify the number of subsounds within the sound that are accessable with Sound::getSubSound / SoundGetSubSound. */
+ public IntPtr inclusionlist; /* [w] Optional. Specify 0 to ignore. In a multi-sample format such as .FSB/.DLS/.SF2 it may be desirable to specify only a subset of sounds to be loaded out of the whole file. This is an array of subsound indicies to load into memory when created. */
+ public int inclusionlistnum; /* [w] Optional. Specify 0 to ignore. This is the number of integers contained within the */
+ public SOUND_PCMREAD_CALLBACK pcmreadcallback; /* [w] Optional. Specify 0 to ignore. Callback to 'piggyback' on FMOD's read functions and accept or even write PCM data while FMOD is opening the sound. Used for user sounds created with OPENUSER or for capturing decoded data as FMOD reads it. */
+ public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback; /* [w] Optional. Specify 0 to ignore. Callback for when the user calls a seeking function such as Channel::setPosition within a multi-sample sound, and for when it is opened.*/
+ public SOUND_NONBLOCK_CALLBACK nonblockcallback; /* [w] Optional. Specify 0 to ignore. Callback for successful completion, or error while loading a sound that used the FMOD_NONBLOCKING flag.*/
+ public IntPtr dlsname; /* [w] Optional. Specify 0 to ignore. Filename for a DLS or SF2 sample set when loading a MIDI file. If not specified, on windows it will attempt to open /windows/system32/drivers/gm.dls, otherwise the MIDI will fail to open. */
+ public IntPtr encryptionkey; /* [w] Optional. Specify 0 to ignore. Key for encrypted FSB file. Without this key an encrypted FSB file will not load. */
+ public int maxpolyphony; /* [w] Optional. Specify 0 to ingore. For sequenced formats with dynamic channel allocation such as .MID and .IT, this specifies the maximum voice count allowed while playing. .IT defaults to 64. .MID defaults to 32. */
+ public IntPtr userdata; /* [w] Optional. Specify 0 to ignore. This is user data to be attached to the sound during creation. Access via Sound::getUserData. */
+ public SOUND_TYPE suggestedsoundtype; /* [w] Optional. Specify 0 or FMOD_SOUND_TYPE_UNKNOWN to ignore. Instead of scanning all codec types, use this to speed up loading by making it jump straight to this codec. */
+ public FILE_OPEN_CALLBACK fileuseropen; /* [w] Optional. Specify 0 to ignore. Callback for opening this file. */
+ public FILE_CLOSE_CALLBACK fileuserclose; /* [w] Optional. Specify 0 to ignore. Callback for closing this file. */
+ public FILE_READ_CALLBACK fileuserread; /* [w] Optional. Specify 0 to ignore. Callback for reading from this file. */
+ public FILE_SEEK_CALLBACK fileuserseek; /* [w] Optional. Specify 0 to ignore. Callback for seeking within this file. */
+ public FILE_ASYNCREAD_CALLBACK fileuserasyncread; /* [w] Optional. Specify 0 to ignore. Callback for asyncronously reading from this file. */
+ public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel; /* [w] Optional. Specify 0 to ignore. Callback for cancelling an asyncronous read. */
+ public IntPtr fileuserdata; /* [w] Optional. Specify 0 to ignore. User data to be passed into the file callbacks. */
+ public int filebuffersize; /* [w] Optional. Specify 0 to ignore. Buffer size for reading the file, -1 to disable buffering, or 0 for system default. */
+ public CHANNELORDER channelorder; /* [w] Optional. Specify 0 to ignore. Use this to differ the way fmod maps multichannel sounds to speakers. See FMOD_CHANNELORDER for more. */
+ public IntPtr initialsoundgroup; /* [w] Optional. Specify 0 to ignore. Specify a sound group if required, to put sound in as it is created. */
+ public uint initialseekposition; /* [w] Optional. Specify 0 to ignore. For streams. Specify an initial position to seek the stream to. */
+ public TIMEUNIT initialseekpostype; /* [w] Optional. Specify 0 to ignore. For streams. Specify the time unit for the position set in initialseekposition. */
+ public int ignoresetfilesystem; /* [w] Optional. Specify 0 to ignore. Set to 1 to use fmod's built in file system. Ignores setFileSystem callbacks and also FMOD_CREATESOUNEXINFO file callbacks. Useful for specific cases where you don't want to use your own file system but want to use fmod's file system (ie net streaming). */
+ public uint audioqueuepolicy; /* [w] Optional. Specify 0 or FMOD_AUDIOQUEUE_CODECPOLICY_DEFAULT to ignore. Policy used to determine whether hardware or software is used for decoding, see FMOD_AUDIOQUEUE_CODECPOLICY for options (iOS >= 3.0 required, otherwise only hardware is available) */
+ public uint minmidigranularity; /* [w] Optional. Specify 0 to ignore. Allows you to set a minimum desired MIDI mixer granularity. Values smaller than 512 give greater than default accuracy at the cost of more CPU and vise versa. Specify 0 for default (512 samples). */
+ public int nonblockthreadid; /* [w] Optional. Specify 0 to ignore. Specifies a thread index to execute non blocking load on. Allows for up to 5 threads to be used for loading at once. This is to avoid one load blocking another. Maximum value = 4. */
+ public IntPtr fsbguid; /* [r/w] Optional. Specify 0 to ignore. Allows you to provide the GUID lookup for cached FSB header info. Once loaded the GUID will be written back to the pointer. This is to avoid seeking and reading the FSB header. */
+ }
+
+#pragma warning disable 414
+ [StructLayout(LayoutKind.Sequential)]
+ public struct REVERB_PROPERTIES
+ { /* MIN MAX DEFAULT DESCRIPTION */
+ public float DecayTime; /* [r/w] 0.0 20000.0 1500.0 Reverberation decay time in ms */
+ public float EarlyDelay; /* [r/w] 0.0 300.0 7.0 Initial reflection delay time */
+ public float LateDelay; /* [r/w] 0.0 100 11.0 Late reverberation delay time relative to initial reflection */
+ public float HFReference; /* [r/w] 20.0 20000.0 5000 Reference high frequency (hz) */
+ public float HFDecayRatio; /* [r/w] 10.0 100.0 50.0 High-frequency to mid-frequency decay time ratio */
+ public float Diffusion; /* [r/w] 0.0 100.0 100.0 Value that controls the echo density in the late reverberation decay. */
+ public float Density; /* [r/w] 0.0 100.0 100.0 Value that controls the modal density in the late reverberation decay */
+ public float LowShelfFrequency; /* [r/w] 20.0 1000.0 250.0 Reference low frequency (hz) */
+ public float LowShelfGain; /* [r/w] -36.0 12.0 0.0 Relative room effect level at low frequencies */
+ public float HighCut; /* [r/w] 20.0 20000.0 20000.0 Relative room effect level at high frequencies */
+ public float EarlyLateMix; /* [r/w] 0.0 100.0 50.0 Early reflections level relative to room effect */
+ public float WetLevel; /* [r/w] -80.0 20.0 -6.0 Room effect level (at mid frequencies)
+ * */
+ #region wrapperinternal
+ public REVERB_PROPERTIES(float decayTime, float earlyDelay, float lateDelay, float hfReference,
+ float hfDecayRatio, float diffusion, float density, float lowShelfFrequency, float lowShelfGain,
+ float highCut, float earlyLateMix, float wetLevel)
+ {
+ DecayTime = decayTime;
+ EarlyDelay = earlyDelay;
+ LateDelay = lateDelay;
+ HFReference = hfReference;
+ HFDecayRatio = hfDecayRatio;
+ Diffusion = diffusion;
+ Density = density;
+ LowShelfFrequency = lowShelfFrequency;
+ LowShelfGain = lowShelfGain;
+ HighCut = highCut;
+ EarlyLateMix = earlyLateMix;
+ WetLevel = wetLevel;
+ }
+ #endregion
+ }
+#pragma warning restore 414
+
+ public class PRESET
+ {
+ /* Instance Env Diffus Room RoomHF RmLF DecTm DecHF DecLF Refl RefDel Revb RevDel ModTm ModDp HFRef LFRef Diffus Densty FLAGS */
+ public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES(1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f); }
+ public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f); }
+ public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES(170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f); }
+ public static REVERB_PROPERTIES ROOM() { return new REVERB_PROPERTIES(400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f); }
+ public static REVERB_PROPERTIES BATHROOM() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f); }
+ public static REVERB_PROPERTIES LIVINGROOM() { return new REVERB_PROPERTIES(500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f); }
+ public static REVERB_PROPERTIES STONEROOM() { return new REVERB_PROPERTIES(2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f); }
+ public static REVERB_PROPERTIES AUDITORIUM() { return new REVERB_PROPERTIES(4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f); }
+ public static REVERB_PROPERTIES CONCERTHALL() { return new REVERB_PROPERTIES(3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f); }
+ public static REVERB_PROPERTIES CAVE() { return new REVERB_PROPERTIES(2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f); }
+ public static REVERB_PROPERTIES ARENA() { return new REVERB_PROPERTIES(7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f); }
+ public static REVERB_PROPERTIES HANGAR() { return new REVERB_PROPERTIES(10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f); }
+ public static REVERB_PROPERTIES CARPETTEDHALLWAY() { return new REVERB_PROPERTIES(300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f); }
+ public static REVERB_PROPERTIES HALLWAY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f); }
+ public static REVERB_PROPERTIES STONECORRIDOR() { return new REVERB_PROPERTIES(270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f); }
+ public static REVERB_PROPERTIES ALLEY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f); }
+ public static REVERB_PROPERTIES FOREST() { return new REVERB_PROPERTIES(1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f); }
+ public static REVERB_PROPERTIES CITY() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f); }
+ public static REVERB_PROPERTIES MOUNTAINS() { return new REVERB_PROPERTIES(1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f); }
+ public static REVERB_PROPERTIES QUARRY() { return new REVERB_PROPERTIES(1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f); }
+ public static REVERB_PROPERTIES PLAIN() { return new REVERB_PROPERTIES(1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f); }
+ public static REVERB_PROPERTIES PARKINGLOT() { return new REVERB_PROPERTIES(1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f); }
+ public static REVERB_PROPERTIES SEWERPIPE() { return new REVERB_PROPERTIES(2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f); }
+ public static REVERB_PROPERTIES UNDERWATER() { return new REVERB_PROPERTIES(1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f); }
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ADVANCEDSETTINGS
+ {
+ public int cbSize; /* [w] Size of this structure. Use sizeof(FMOD_ADVANCEDSETTINGS) */
+ public int maxMPEGCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. MPEG codecs consume 30,528 bytes per instance and this number will determine how many MPEG channels can be played simultaneously. Default = 32. */
+ public int maxADPCMCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. ADPCM codecs consume 3,128 bytes per instance and this number will determine how many ADPCM channels can be played simultaneously. Default = 32. */
+ public int maxXMACodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. XMA codecs consume 14,836 bytes per instance and this number will determine how many XMA channels can be played simultaneously. Default = 32. */
+ public int maxVorbisCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. Vorbis codecs consume 23,256 bytes per instance and this number will determine how many Vorbis channels can be played simultaneously. Default = 32. */
+ public int maxAT9Codecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. AT9 codecs consume 8,720 bytes per instance and this number will determine how many AT9 channels can be played simultaneously. Default = 32. */
+ public int maxFADPCMCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. This number will determine how many FADPCM channels can be played simultaneously. Default = 32. */
+ public int maxPCMCodecs; /* [r/w] Unsupported. */
+ public int ASIONumChannels; /* [r/w] Optional. Specify 0 to ignore. Number of channels available on the ASIO device. */
+ public IntPtr ASIOChannelList; /* [r/w] Optional. Specify 0 to ignore. Pointer to an array of strings (number of entries defined by ASIONumChannels) with ASIO channel names. */
+ public IntPtr ASIOSpeakerList; /* [r/w] Optional. Specify 0 to ignore. Pointer to a list of speakers that the ASIO channels map to. This can be called after System::init to remap ASIO output. */
+ public float vol0virtualvol; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_VOL0_BECOMES_VIRTUAL. If this flag is used, and the volume is below this, then the sound will become virtual. Use this value to raise the threshold to a different point where a sound goes virtual. */
+ public uint defaultDecodeBufferSize; /* [r/w] Optional. Specify 0 to ignore. For streams. This determines the default size of the double buffer (in milliseconds) that a stream uses. Default = 400ms */
+ public ushort profilePort; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_PROFILE_ENABLE. Specify the port to listen on for connections by the profiler application. */
+ public uint geometryMaxFadeTime; /* [r/w] Optional. Specify 0 to ignore. The maximum time in miliseconds it takes for a channel to fade to the new level when its occlusion changes. */
+ public float distanceFilterCenterFreq; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_DISTANCE_FILTERING. The default center frequency in Hz for the distance filtering effect. Default = 1500.0. */
+ public int reverb3Dinstance; /* [r/w] Optional. Specify 0 to ignore. Out of 0 to 3, 3d reverb spheres will create a phyical reverb unit on this instance slot. See FMOD_REVERB_PROPERTIES. */
+ public int DSPBufferPoolSize; /* [r/w] Optional. Specify 0 to ignore. Number of buffers in DSP buffer pool. Each buffer will be DSPBlockSize * sizeof(float) * SpeakerModeChannelCount. ie 7.1 @ 1024 DSP block size = 8 * 1024 * 4 = 32kb. Default = 8. */
+ public uint stackSizeStream; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD Stream thread in bytes. Useful for custom codecs that use excess stack. Default 49,152 (48kb) */
+ public uint stackSizeNonBlocking; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD_NONBLOCKING loading thread. Useful for custom codecs that use excess stack. Default 65,536 (64kb) */
+ public uint stackSizeMixer; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD mixer thread. Useful for custom dsps that use excess stack. Default 49,152 (48kb) */
+ public DSP_RESAMPLER resamplerMethod; /* [r/w] Optional. Specify 0 to ignore. Resampling method used with fmod's software mixer. See FMOD_DSP_RESAMPLER for details on methods. */
+ public uint commandQueueSize; /* [r/w] Optional. Specify 0 to ignore. Specify the command queue size for thread safe processing. Default 2048 (2kb) */
+ public uint randomSeed; /* [r/w] Optional. Specify 0 to ignore. Seed value that FMOD will use to initialize its internal random number generators. */
+ }
+
+ [Flags]
+ public enum DRIVER_STATE : uint
+ {
+ CONNECTED = 0x00000001, /* Device is currently plugged in. */
+ DEFAULT = 0x00000002, /* Device is the users preferred choice. */
+ }
+
+ /*
+ FMOD System factory functions. Use this to create an FMOD System Instance. below you will see System init/close to get started.
+ */
+ public struct Factory
+ {
+ public static RESULT System_Create(out System system)
+ {
+ return FMOD5_System_Create(out system.handle);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Create(out IntPtr system);
+
+ #endregion
+ }
+
+ public struct Memory
+ {
+ public static RESULT Initialize(IntPtr poolmem, int poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags = MEMORY_TYPE.ALL)
+ {
+ return FMOD5_Memory_Initialize(poolmem, poollen, useralloc, userrealloc, userfree, memtypeflags);
+ }
+
+ public static RESULT GetStats(out int currentalloced, out int maxalloced, bool blocking = true)
+ {
+ return FMOD5_Memory_GetStats(out currentalloced, out maxalloced, blocking);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Memory_Initialize(IntPtr poolmem, int poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Memory_GetStats(out int currentalloced, out int maxalloced, bool blocking);
+
+ #endregion
+ }
+
+ public struct Debug
+ {
+ public static RESULT Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode = DEBUG_MODE.TTY, DEBUG_CALLBACK callback = null, string filename = null)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_Debug_Initialize(flags, mode, callback, encoder.byteFromStringUTF8(filename));
+ }
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Debug_Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode, DEBUG_CALLBACK callback, byte[] filename);
+
+ #endregion
+ }
+
+ /*
+ 'System' API.
+ */
+ public struct System
+ {
+ public RESULT release()
+ {
+ return FMOD5_System_Release(this.handle);
+ }
+
+ // Pre-init functions.
+ public RESULT setOutput(OUTPUTTYPE output)
+ {
+ return FMOD5_System_SetOutput(this.handle, output);
+ }
+ public RESULT getOutput(out OUTPUTTYPE output)
+ {
+ return FMOD5_System_GetOutput(this.handle, out output);
+ }
+ public RESULT getNumDrivers(out int numdrivers)
+ {
+ return FMOD5_System_GetNumDrivers(this.handle, out numdrivers);
+ }
+ public RESULT getDriverInfo(int id, out string name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_System_GetDriverInfo(this.handle, id, stringMem, namelen, out guid, out systemrate, out speakermode, out speakermodechannels);
+ using (StringHelper.ThreadSafeEncoding encoding = StringHelper.GetFreeHelper())
+ {
+ name = encoding.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getDriverInfo(int id, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels)
+ {
+ return FMOD5_System_GetDriverInfo(this.handle, id, IntPtr.Zero, 0, out guid, out systemrate, out speakermode, out speakermodechannels);
+ }
+ public RESULT setDriver(int driver)
+ {
+ return FMOD5_System_SetDriver(this.handle, driver);
+ }
+ public RESULT getDriver(out int driver)
+ {
+ return FMOD5_System_GetDriver(this.handle, out driver);
+ }
+ public RESULT setSoftwareChannels(int numsoftwarechannels)
+ {
+ return FMOD5_System_SetSoftwareChannels(this.handle, numsoftwarechannels);
+ }
+ public RESULT getSoftwareChannels(out int numsoftwarechannels)
+ {
+ return FMOD5_System_GetSoftwareChannels(this.handle, out numsoftwarechannels);
+ }
+ public RESULT setSoftwareFormat(int samplerate, SPEAKERMODE speakermode, int numrawspeakers)
+ {
+ return FMOD5_System_SetSoftwareFormat(this.handle, samplerate, speakermode, numrawspeakers);
+ }
+ public RESULT getSoftwareFormat(out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers)
+ {
+ return FMOD5_System_GetSoftwareFormat(this.handle, out samplerate, out speakermode, out numrawspeakers);
+ }
+ public RESULT setDSPBufferSize(uint bufferlength, int numbuffers)
+ {
+ return FMOD5_System_SetDSPBufferSize(this.handle, bufferlength, numbuffers);
+ }
+ public RESULT getDSPBufferSize(out uint bufferlength, out int numbuffers)
+ {
+ return FMOD5_System_GetDSPBufferSize(this.handle, out bufferlength, out numbuffers);
+ }
+ public RESULT setFileSystem(FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign)
+ {
+ return FMOD5_System_SetFileSystem(this.handle, useropen, userclose, userread, userseek, userasyncread, userasynccancel, blockalign);
+ }
+ public RESULT attachFileSystem(FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek)
+ {
+ return FMOD5_System_AttachFileSystem(this.handle, useropen, userclose, userread, userseek);
+ }
+ public RESULT setAdvancedSettings(ref ADVANCEDSETTINGS settings)
+ {
+ settings.cbSize = Marshal.SizeOf(settings);
+ return FMOD5_System_SetAdvancedSettings(this.handle, ref settings);
+ }
+ public RESULT getAdvancedSettings(ref ADVANCEDSETTINGS settings)
+ {
+ settings.cbSize = Marshal.SizeOf(settings);
+ return FMOD5_System_GetAdvancedSettings(this.handle, ref settings);
+ }
+ public RESULT setCallback(SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL)
+ {
+ return FMOD5_System_SetCallback(this.handle, callback, callbackmask);
+ }
+
+ // Plug-in support.
+ public RESULT setPluginPath(string path)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_SetPluginPath(this.handle, encoder.byteFromStringUTF8(path));
+ }
+ }
+ public RESULT loadPlugin(string filename, out uint handle, uint priority = 0)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_LoadPlugin(this.handle, encoder.byteFromStringUTF8(filename), out handle, priority);
+ }
+ }
+ public RESULT unloadPlugin(uint handle)
+ {
+ return FMOD5_System_UnloadPlugin(this.handle, handle);
+ }
+ public RESULT getNumNestedPlugins(uint handle, out int count)
+ {
+ return FMOD5_System_GetNumNestedPlugins(this.handle, handle, out count);
+ }
+ public RESULT getNestedPlugin(uint handle, int index, out uint nestedhandle)
+ {
+ return FMOD5_System_GetNestedPlugin(this.handle, handle, index, out nestedhandle);
+ }
+ public RESULT getNumPlugins(PLUGINTYPE plugintype, out int numplugins)
+ {
+ return FMOD5_System_GetNumPlugins(this.handle, plugintype, out numplugins);
+ }
+ public RESULT getPluginHandle(PLUGINTYPE plugintype, int index, out uint handle)
+ {
+ return FMOD5_System_GetPluginHandle(this.handle, plugintype, index, out handle);
+ }
+ public RESULT getPluginInfo(uint handle, out PLUGINTYPE plugintype, out string name, int namelen, out uint version)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_System_GetPluginInfo(this.handle, handle, out plugintype, stringMem, namelen, out version);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getPluginInfo(uint handle, out PLUGINTYPE plugintype, out uint version)
+ {
+ return FMOD5_System_GetPluginInfo(this.handle, handle, out plugintype, IntPtr.Zero, 0, out version);
+ }
+ public RESULT setOutputByPlugin(uint handle)
+ {
+ return FMOD5_System_SetOutputByPlugin(this.handle, handle);
+ }
+ public RESULT getOutputByPlugin(out uint handle)
+ {
+ return FMOD5_System_GetOutputByPlugin(this.handle, out handle);
+ }
+ public RESULT createDSPByPlugin(uint handle, out DSP dsp)
+ {
+ return FMOD5_System_CreateDSPByPlugin(this.handle, handle, out dsp.handle);
+ }
+ public RESULT getDSPInfoByPlugin(uint handle, out IntPtr description)
+ {
+ return FMOD5_System_GetDSPInfoByPlugin(this.handle, handle, out description);
+ }
+ /*
+ public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority)
+ public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority = 0)
+ public RESULT registerCodec(ref CODEC_DESCRIPTION description, out uint handle, uint priority)
+ {
+ return FMOD5_System_RegisterCodec(this.handle, ref description, out handle, priority);
+ }
+ */
+ public RESULT registerDSP(ref DSP_DESCRIPTION description, out uint handle)
+ {
+ return FMOD5_System_RegisterDSP(this.handle, ref description, out handle);
+ }
+ /*
+ public RESULT registerOutput(ref OUTPUT_DESCRIPTION description, out uint handle)
+ {
+ return FMOD5_System_RegisterOutput(this.handle, ref description, out handle);
+ }
+ */
+
+ // Init/Close.
+ public RESULT init(int maxchannels, INITFLAGS flags, IntPtr extradriverdata)
+ {
+ return FMOD5_System_Init(this.handle, maxchannels, flags, extradriverdata);
+ }
+ public RESULT close()
+ {
+ return FMOD5_System_Close(this.handle);
+ }
+
+ // General post-init system functions.
+ public RESULT update()
+ {
+ return FMOD5_System_Update(this.handle);
+ }
+ public RESULT setSpeakerPosition(SPEAKER speaker, float x, float y, bool active)
+ {
+ return FMOD5_System_SetSpeakerPosition(this.handle, speaker, x, y, active);
+ }
+ public RESULT getSpeakerPosition(SPEAKER speaker, out float x, out float y, out bool active)
+ {
+ return FMOD5_System_GetSpeakerPosition(this.handle, speaker, out x, out y, out active);
+ }
+ public RESULT setStreamBufferSize(uint filebuffersize, TIMEUNIT filebuffersizetype)
+ {
+ return FMOD5_System_SetStreamBufferSize(this.handle, filebuffersize, filebuffersizetype);
+ }
+ public RESULT getStreamBufferSize(out uint filebuffersize, out TIMEUNIT filebuffersizetype)
+ {
+ return FMOD5_System_GetStreamBufferSize(this.handle, out filebuffersize, out filebuffersizetype);
+ }
+ public RESULT set3DSettings(float dopplerscale, float distancefactor, float rolloffscale)
+ {
+ return FMOD5_System_Set3DSettings(this.handle, dopplerscale, distancefactor, rolloffscale);
+ }
+ public RESULT get3DSettings(out float dopplerscale, out float distancefactor, out float rolloffscale)
+ {
+ return FMOD5_System_Get3DSettings(this.handle, out dopplerscale, out distancefactor, out rolloffscale);
+ }
+ public RESULT set3DNumListeners(int numlisteners)
+ {
+ return FMOD5_System_Set3DNumListeners(this.handle, numlisteners);
+ }
+ public RESULT get3DNumListeners(out int numlisteners)
+ {
+ return FMOD5_System_Get3DNumListeners(this.handle, out numlisteners);
+ }
+ public RESULT set3DListenerAttributes(int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up)
+ {
+ return FMOD5_System_Set3DListenerAttributes(this.handle, listener, ref pos, ref vel, ref forward, ref up);
+ }
+ public RESULT get3DListenerAttributes(int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up)
+ {
+ return FMOD5_System_Get3DListenerAttributes(this.handle, listener, out pos, out vel, out forward, out up);
+ }
+ public RESULT set3DRolloffCallback(CB_3D_ROLLOFF_CALLBACK callback)
+ {
+ return FMOD5_System_Set3DRolloffCallback(this.handle, callback);
+ }
+ public RESULT mixerSuspend()
+ {
+ return FMOD5_System_MixerSuspend(this.handle);
+ }
+ public RESULT mixerResume()
+ {
+ return FMOD5_System_MixerResume(this.handle);
+ }
+ public RESULT getDefaultMixMatrix(SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop)
+ {
+ return FMOD5_System_GetDefaultMixMatrix(this.handle, sourcespeakermode, targetspeakermode, matrix, matrixhop);
+ }
+ public RESULT getSpeakerModeChannels(SPEAKERMODE mode, out int channels)
+ {
+ return FMOD5_System_GetSpeakerModeChannels(this.handle, mode, out channels);
+ }
+
+ // System information functions.
+ public RESULT getVersion(out uint version)
+ {
+ return FMOD5_System_GetVersion(this.handle, out version);
+ }
+ public RESULT getOutputHandle(out IntPtr handle)
+ {
+ return FMOD5_System_GetOutputHandle(this.handle, out handle);
+ }
+ public RESULT getChannelsPlaying(out int channels)
+ {
+ return FMOD5_System_GetChannelsPlaying(this.handle, out channels, IntPtr.Zero);
+ }
+ public RESULT getChannelsPlaying(out int channels, out int realchannels)
+ {
+ return FMOD5_System_GetChannelsPlaying(this.handle, out channels, out realchannels);
+ }
+ public RESULT getCPUUsage(out float dsp, out float stream, out float geometry, out float update, out float total)
+ {
+ return FMOD5_System_GetCPUUsage(this.handle, out dsp, out stream, out geometry, out update, out total);
+ }
+ public RESULT getFileUsage(out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead)
+ {
+ return FMOD5_System_GetFileUsage(this.handle, out sampleBytesRead, out streamBytesRead, out otherBytesRead);
+ }
+
+ // Sound/DSP/Channel/FX creation and retrieval.
+ public RESULT createSound(string name, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_CreateSound(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle);
+ }
+ }
+ public RESULT createSound(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ return FMOD5_System_CreateSound(this.handle, data, mode, ref exinfo, out sound.handle);
+ }
+ public RESULT createSound(IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ return FMOD5_System_CreateSound(this.handle, name_or_data, mode, ref exinfo, out sound.handle);
+ }
+ public RESULT createSound(string name, MODE mode, out Sound sound)
+ {
+ CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
+ exinfo.cbsize = Marshal.SizeOf(exinfo);
+
+ return createSound(name, mode, ref exinfo, out sound);
+ }
+ public RESULT createStream(string name, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_CreateStream(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle);
+ }
+ }
+ public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ return FMOD5_System_CreateStream(this.handle, data, mode, ref exinfo, out sound.handle);
+ }
+ public RESULT createStream(IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
+ {
+ return FMOD5_System_CreateStream(this.handle, name_or_data, mode, ref exinfo, out sound.handle);
+ }
+ public RESULT createStream(string name, MODE mode, out Sound sound)
+ {
+ CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
+ exinfo.cbsize = Marshal.SizeOf(exinfo);
+
+ return createStream(name, mode, ref exinfo, out sound);
+ }
+ public RESULT createDSP(ref DSP_DESCRIPTION description, out DSP dsp)
+ {
+ return FMOD5_System_CreateDSP(this.handle, ref description, out dsp.handle);
+ }
+ public RESULT createDSPByType(DSP_TYPE type, out DSP dsp)
+ {
+ return FMOD5_System_CreateDSPByType(this.handle, type, out dsp.handle);
+ }
+ public RESULT createChannelGroup(string name, out ChannelGroup channelgroup)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_CreateChannelGroup(this.handle, encoder.byteFromStringUTF8(name), out channelgroup.handle);
+ }
+ }
+ public RESULT createSoundGroup(string name, out SoundGroup soundgroup)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_CreateSoundGroup(this.handle, encoder.byteFromStringUTF8(name), out soundgroup.handle);
+ }
+ }
+ public RESULT createReverb3D(out Reverb3D reverb)
+ {
+ return FMOD5_System_CreateReverb3D(this.handle, out reverb.handle);
+ }
+ public RESULT playSound(Sound sound, ChannelGroup channelgroup, bool paused, out Channel channel)
+ {
+ return FMOD5_System_PlaySound(this.handle, sound.handle, channelgroup.handle, paused, out channel.handle);
+ }
+ public RESULT playDSP(DSP dsp, ChannelGroup channelgroup, bool paused, out Channel channel)
+ {
+ return FMOD5_System_PlayDSP(this.handle, dsp.handle, channelgroup.handle, paused, out channel.handle);
+ }
+ public RESULT getChannel(int channelid, out Channel channel)
+ {
+ return FMOD5_System_GetChannel(this.handle, channelid, out channel.handle);
+ }
+ public RESULT getMasterChannelGroup(out ChannelGroup channelgroup)
+ {
+ return FMOD5_System_GetMasterChannelGroup(this.handle, out channelgroup.handle);
+ }
+ public RESULT getMasterSoundGroup(out SoundGroup soundgroup)
+ {
+ return FMOD5_System_GetMasterSoundGroup(this.handle, out soundgroup.handle);
+ }
+
+ // Routing to ports.
+ public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false)
+ {
+ return FMOD5_System_AttachChannelGroupToPort(this.handle, portType, portIndex, channelgroup.handle, passThru);
+ }
+ public RESULT detachChannelGroupFromPort(ChannelGroup channelgroup)
+ {
+ return FMOD5_System_DetachChannelGroupFromPort(this.handle, channelgroup.handle);
+ }
+
+ // Reverb api.
+ public RESULT setReverbProperties(int instance, ref REVERB_PROPERTIES prop)
+ {
+ return FMOD5_System_SetReverbProperties(this.handle, instance, ref prop);
+ }
+ public RESULT getReverbProperties(int instance, out REVERB_PROPERTIES prop)
+ {
+ return FMOD5_System_GetReverbProperties(this.handle, instance, out prop);
+ }
+
+ // System level DSP functionality.
+ public RESULT lockDSP()
+ {
+ return FMOD5_System_LockDSP(this.handle);
+ }
+ public RESULT unlockDSP()
+ {
+ return FMOD5_System_UnlockDSP(this.handle);
+ }
+
+ // Recording api
+ public RESULT getRecordNumDrivers(out int numdrivers, out int numconnected)
+ {
+ return FMOD5_System_GetRecordNumDrivers(this.handle, out numdrivers, out numconnected);
+ }
+ public RESULT getRecordDriverInfo(int id, out string name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_System_GetRecordDriverInfo(this.handle, id, stringMem, namelen, out guid, out systemrate, out speakermode, out speakermodechannels, out state);
+
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getRecordDriverInfo(int id, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state)
+ {
+ return FMOD5_System_GetRecordDriverInfo(this.handle, id, IntPtr.Zero, 0, out guid, out systemrate, out speakermode, out speakermodechannels, out state);
+ }
+ public RESULT getRecordPosition(int id, out uint position)
+ {
+ return FMOD5_System_GetRecordPosition(this.handle, id, out position);
+ }
+ public RESULT recordStart(int id, Sound sound, bool loop)
+ {
+ return FMOD5_System_RecordStart(this.handle, id, sound.handle, loop);
+ }
+ public RESULT recordStop(int id)
+ {
+ return FMOD5_System_RecordStop(this.handle, id);
+ }
+ public RESULT isRecording(int id, out bool recording)
+ {
+ return FMOD5_System_IsRecording(this.handle, id, out recording);
+ }
+
+ // Geometry api
+ public RESULT createGeometry(int maxpolygons, int maxvertices, out Geometry geometry)
+ {
+ return FMOD5_System_CreateGeometry(this.handle, maxpolygons, maxvertices, out geometry.handle);
+ }
+ public RESULT setGeometrySettings(float maxworldsize)
+ {
+ return FMOD5_System_SetGeometrySettings(this.handle, maxworldsize);
+ }
+ public RESULT getGeometrySettings(out float maxworldsize)
+ {
+ return FMOD5_System_GetGeometrySettings(this.handle, out maxworldsize);
+ }
+ public RESULT loadGeometry(IntPtr data, int datasize, out Geometry geometry)
+ {
+ return FMOD5_System_LoadGeometry(this.handle, data, datasize, out geometry.handle);
+ }
+ public RESULT getGeometryOcclusion(ref VECTOR listener, ref VECTOR source, out float direct, out float reverb)
+ {
+ return FMOD5_System_GetGeometryOcclusion(this.handle, ref listener, ref source, out direct, out reverb);
+ }
+
+ // Network functions
+ public RESULT setNetworkProxy(string proxy)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_System_SetNetworkProxy(this.handle, encoder.byteFromStringUTF8(proxy));
+ }
+ }
+ public RESULT getNetworkProxy(out string proxy, int proxylen)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(proxylen);
+
+ RESULT result = FMOD5_System_GetNetworkProxy(this.handle, stringMem, proxylen);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ proxy = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT setNetworkTimeout(int timeout)
+ {
+ return FMOD5_System_SetNetworkTimeout(this.handle, timeout);
+ }
+ public RESULT getNetworkTimeout(out int timeout)
+ {
+ return FMOD5_System_GetNetworkTimeout(this.handle, out timeout);
+ }
+
+ // Userdata set/get
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_System_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_System_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Release(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetOutput(IntPtr system, OUTPUTTYPE output);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetOutput(IntPtr system, out OUTPUTTYPE output);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNumDrivers(IntPtr system, out int numdrivers);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetDriverInfo(IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetDriver(IntPtr system, int driver);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetDriver(IntPtr system, out int driver);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetSoftwareChannels(IntPtr system, int numsoftwarechannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetSoftwareChannels(IntPtr system, out int numsoftwarechannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetSoftwareFormat(IntPtr system, int samplerate, SPEAKERMODE speakermode, int numrawspeakers);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetSoftwareFormat(IntPtr system, out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetDSPBufferSize(IntPtr system, uint bufferlength, int numbuffers);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetDSPBufferSize(IntPtr system, out uint bufferlength, out int numbuffers);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetFileSystem(IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_AttachFileSystem(IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetAdvancedSettings(IntPtr system, ref ADVANCEDSETTINGS settings);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetAdvancedSettings(IntPtr system, ref ADVANCEDSETTINGS settings);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetCallback(IntPtr system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetPluginPath(IntPtr system, byte[] path);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_LoadPlugin(IntPtr system, byte[] filename, out uint handle, uint priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_UnloadPlugin(IntPtr system, uint handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNumNestedPlugins(IntPtr system, uint handle, out int count);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNestedPlugin(IntPtr system, uint handle, int index, out uint nestedhandle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNumPlugins(IntPtr system, PLUGINTYPE plugintype, out int numplugins);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetPluginHandle(IntPtr system, PLUGINTYPE plugintype, int index, out uint handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetPluginInfo(IntPtr system, uint handle, out PLUGINTYPE plugintype, IntPtr name, int namelen, out uint version);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetOutputByPlugin(IntPtr system, uint handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetOutputByPlugin(IntPtr system, out uint handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateDSPByPlugin(IntPtr system, uint handle, out IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetDSPInfoByPlugin(IntPtr system, uint handle, out IntPtr description);
+ //[DllImport(VERSION.dll)]
+ //private static extern RESULT FMOD5_System_RegisterCodec (IntPtr system, out CODEC_DESCRIPTION description, out uint handle, uint priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_RegisterDSP(IntPtr system, ref DSP_DESCRIPTION description, out uint handle);
+ //[DllImport(VERSION.dll)]
+ //private static extern RESULT FMOD5_System_RegisterOutput (IntPtr system, ref OUTPUT_DESCRIPTION description, out uint handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Init(IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Close(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Update(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetSpeakerPosition(IntPtr system, SPEAKER speaker, float x, float y, bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetSpeakerPosition(IntPtr system, SPEAKER speaker, out float x, out float y, out bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetStreamBufferSize(IntPtr system, uint filebuffersize, TIMEUNIT filebuffersizetype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetStreamBufferSize(IntPtr system, out uint filebuffersize, out TIMEUNIT filebuffersizetype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Set3DSettings(IntPtr system, float dopplerscale, float distancefactor, float rolloffscale);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Get3DSettings(IntPtr system, out float dopplerscale, out float distancefactor, out float rolloffscale);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Set3DNumListeners(IntPtr system, int numlisteners);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Get3DNumListeners(IntPtr system, out int numlisteners);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Set3DListenerAttributes(IntPtr system, int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Get3DListenerAttributes(IntPtr system, int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_Set3DRolloffCallback(IntPtr system, CB_3D_ROLLOFF_CALLBACK callback);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_MixerSuspend(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_MixerResume(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetDefaultMixMatrix(IntPtr system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetSpeakerModeChannels(IntPtr system, SPEAKERMODE mode, out int channels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetVersion(IntPtr system, out uint version);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetOutputHandle(IntPtr system, out IntPtr handle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetChannelsPlaying(IntPtr system, out int channels, IntPtr zero);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetChannelsPlaying(IntPtr system, out int channels, out int realchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetCPUUsage(IntPtr system, out float dsp, out float stream, out float geometry, out float update, out float total);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetFileUsage(IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateSound(IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateSound(IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateStream(IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateStream(IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateDSP(IntPtr system, ref DSP_DESCRIPTION description, out IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateDSPByType(IntPtr system, DSP_TYPE type, out IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateChannelGroup(IntPtr system, byte[] name, out IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateSoundGroup(IntPtr system, byte[] name, out IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateReverb3D(IntPtr system, out IntPtr reverb);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_PlaySound(IntPtr system, IntPtr sound, IntPtr channelgroup, bool paused, out IntPtr channel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_PlayDSP(IntPtr system, IntPtr dsp, IntPtr channelgroup, bool paused, out IntPtr channel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetChannel(IntPtr system, int channelid, out IntPtr channel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetMasterChannelGroup(IntPtr system, out IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetMasterSoundGroup(IntPtr system, out IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_AttachChannelGroupToPort(IntPtr system, uint portType, ulong portIndex, IntPtr channelgroup, bool passThru);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_DetachChannelGroupFromPort(IntPtr system, IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetReverbProperties(IntPtr system, int instance, ref REVERB_PROPERTIES prop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetReverbProperties(IntPtr system, int instance, out REVERB_PROPERTIES prop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_LockDSP(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_UnlockDSP(IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetRecordNumDrivers(IntPtr system, out int numdrivers, out int numconnected);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetRecordDriverInfo(IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetRecordPosition(IntPtr system, int id, out uint position);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_RecordStart(IntPtr system, int id, IntPtr sound, bool loop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_RecordStop(IntPtr system, int id);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_IsRecording(IntPtr system, int id, out bool recording);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_CreateGeometry(IntPtr system, int maxpolygons, int maxvertices, out IntPtr geometry);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetGeometrySettings(IntPtr system, float maxworldsize);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetGeometrySettings(IntPtr system, out float maxworldsize);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_LoadGeometry(IntPtr system, IntPtr data, int datasize, out IntPtr geometry);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetGeometryOcclusion(IntPtr system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetNetworkProxy(IntPtr system, byte[] proxy);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNetworkProxy(IntPtr system, IntPtr proxy, int proxylen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetNetworkTimeout(IntPtr system, int timeout);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetNetworkTimeout(IntPtr system, out int timeout);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_SetUserData(IntPtr system, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_System_GetUserData(IntPtr system, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+
+ /*
+ 'Sound' API.
+ */
+ public struct Sound
+ {
+ public RESULT release()
+ {
+ return FMOD5_Sound_Release(this.handle);
+ }
+ public RESULT getSystemObject(out System system)
+ {
+ return FMOD5_Sound_GetSystemObject(this.handle, out system.handle);
+ }
+
+ // Standard sound manipulation functions.
+ public RESULT @lock(uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2)
+ {
+ return FMOD5_Sound_Lock(this.handle, offset, length, out ptr1, out ptr2, out len1, out len2);
+ }
+ public RESULT unlock(IntPtr ptr1, IntPtr ptr2, uint len1, uint len2)
+ {
+ return FMOD5_Sound_Unlock(this.handle, ptr1, ptr2, len1, len2);
+ }
+ public RESULT setDefaults(float frequency, int priority)
+ {
+ return FMOD5_Sound_SetDefaults(this.handle, frequency, priority);
+ }
+ public RESULT getDefaults(out float frequency, out int priority)
+ {
+ return FMOD5_Sound_GetDefaults(this.handle, out frequency, out priority);
+ }
+ public RESULT set3DMinMaxDistance(float min, float max)
+ {
+ return FMOD5_Sound_Set3DMinMaxDistance(this.handle, min, max);
+ }
+ public RESULT get3DMinMaxDistance(out float min, out float max)
+ {
+ return FMOD5_Sound_Get3DMinMaxDistance(this.handle, out min, out max);
+ }
+ public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
+ {
+ return FMOD5_Sound_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
+ }
+ public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
+ {
+ return FMOD5_Sound_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
+ }
+ public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
+ {
+ return FMOD5_Sound_Set3DCustomRolloff(this.handle, ref points, numpoints);
+ }
+ public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
+ {
+ return FMOD5_Sound_Get3DCustomRolloff(this.handle, out points, out numpoints);
+ }
+
+ public RESULT getSubSound(int index, out Sound subsound)
+ {
+ return FMOD5_Sound_GetSubSound(this.handle, index, out subsound.handle);
+ }
+ public RESULT getSubSoundParent(out Sound parentsound)
+ {
+ return FMOD5_Sound_GetSubSoundParent(this.handle, out parentsound.handle);
+ }
+ public RESULT getName(out string name, int namelen)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_Sound_GetName(this.handle, stringMem, namelen);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getLength(out uint length, TIMEUNIT lengthtype)
+ {
+ return FMOD5_Sound_GetLength(this.handle, out length, lengthtype);
+ }
+ public RESULT getFormat(out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits)
+ {
+ return FMOD5_Sound_GetFormat(this.handle, out type, out format, out channels, out bits);
+ }
+ public RESULT getNumSubSounds(out int numsubsounds)
+ {
+ return FMOD5_Sound_GetNumSubSounds(this.handle, out numsubsounds);
+ }
+ public RESULT getNumTags(out int numtags, out int numtagsupdated)
+ {
+ return FMOD5_Sound_GetNumTags(this.handle, out numtags, out numtagsupdated);
+ }
+ public RESULT getTag(string name, int index, out TAG tag)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_Sound_GetTag(this.handle, encoder.byteFromStringUTF8(name), index, out tag);
+ }
+ }
+ public RESULT getOpenState(out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy)
+ {
+ return FMOD5_Sound_GetOpenState(this.handle, out openstate, out percentbuffered, out starving, out diskbusy);
+ }
+ public RESULT readData(IntPtr buffer, uint length, out uint read)
+ {
+ return FMOD5_Sound_ReadData(this.handle, buffer, length, out read);
+ }
+ public RESULT seekData(uint pcm)
+ {
+ return FMOD5_Sound_SeekData(this.handle, pcm);
+ }
+ public RESULT setSoundGroup(SoundGroup soundgroup)
+ {
+ return FMOD5_Sound_SetSoundGroup(this.handle, soundgroup.handle);
+ }
+ public RESULT getSoundGroup(out SoundGroup soundgroup)
+ {
+ return FMOD5_Sound_GetSoundGroup(this.handle, out soundgroup.handle);
+ }
+
+ // Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks.
+ public RESULT getNumSyncPoints(out int numsyncpoints)
+ {
+ return FMOD5_Sound_GetNumSyncPoints(this.handle, out numsyncpoints);
+ }
+ public RESULT getSyncPoint(int index, out IntPtr point)
+ {
+ return FMOD5_Sound_GetSyncPoint(this.handle, index, out point);
+ }
+ public RESULT getSyncPointInfo(IntPtr point, out string name, int namelen, out uint offset, TIMEUNIT offsettype)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_Sound_GetSyncPointInfo(this.handle, point, stringMem, namelen, out offset, offsettype);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getSyncPointInfo(IntPtr point, out uint offset, TIMEUNIT offsettype)
+ {
+ return FMOD5_Sound_GetSyncPointInfo(this.handle, point, IntPtr.Zero, 0, out offset, offsettype);
+ }
+ public RESULT addSyncPoint(uint offset, TIMEUNIT offsettype, string name, out IntPtr point)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return FMOD5_Sound_AddSyncPoint(this.handle, offset, offsettype, encoder.byteFromStringUTF8(name), out point);
+ }
+ }
+ public RESULT deleteSyncPoint(IntPtr point)
+ {
+ return FMOD5_Sound_DeleteSyncPoint(this.handle, point);
+ }
+
+ // Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time.
+ public RESULT setMode(MODE mode)
+ {
+ return FMOD5_Sound_SetMode(this.handle, mode);
+ }
+ public RESULT getMode(out MODE mode)
+ {
+ return FMOD5_Sound_GetMode(this.handle, out mode);
+ }
+ public RESULT setLoopCount(int loopcount)
+ {
+ return FMOD5_Sound_SetLoopCount(this.handle, loopcount);
+ }
+ public RESULT getLoopCount(out int loopcount)
+ {
+ return FMOD5_Sound_GetLoopCount(this.handle, out loopcount);
+ }
+ public RESULT setLoopPoints(uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype)
+ {
+ return FMOD5_Sound_SetLoopPoints(this.handle, loopstart, loopstarttype, loopend, loopendtype);
+ }
+ public RESULT getLoopPoints(out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype)
+ {
+ return FMOD5_Sound_GetLoopPoints(this.handle, out loopstart, loopstarttype, out loopend, loopendtype);
+ }
+
+ // For MOD/S3M/XM/IT/MID sequenced formats only.
+ public RESULT getMusicNumChannels(out int numchannels)
+ {
+ return FMOD5_Sound_GetMusicNumChannels(this.handle, out numchannels);
+ }
+ public RESULT setMusicChannelVolume(int channel, float volume)
+ {
+ return FMOD5_Sound_SetMusicChannelVolume(this.handle, channel, volume);
+ }
+ public RESULT getMusicChannelVolume(int channel, out float volume)
+ {
+ return FMOD5_Sound_GetMusicChannelVolume(this.handle, channel, out volume);
+ }
+ public RESULT setMusicSpeed(float speed)
+ {
+ return FMOD5_Sound_SetMusicSpeed(this.handle, speed);
+ }
+ public RESULT getMusicSpeed(out float speed)
+ {
+ return FMOD5_Sound_GetMusicSpeed(this.handle, out speed);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_Sound_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_Sound_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Release(IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSystemObject(IntPtr sound, out IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Lock(IntPtr sound, uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Unlock(IntPtr sound, IntPtr ptr1, IntPtr ptr2, uint len1, uint len2);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetDefaults(IntPtr sound, float frequency, int priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetDefaults(IntPtr sound, out float frequency, out int priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Set3DMinMaxDistance(IntPtr sound, float min, float max);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Get3DMinMaxDistance(IntPtr sound, out float min, out float max);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Set3DConeSettings(IntPtr sound, float insideconeangle, float outsideconeangle, float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Get3DConeSettings(IntPtr sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Set3DCustomRolloff(IntPtr sound, ref VECTOR points, int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_Get3DCustomRolloff(IntPtr sound, out IntPtr points, out int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSubSound(IntPtr sound, int index, out IntPtr subsound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSubSoundParent(IntPtr sound, out IntPtr parentsound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetName(IntPtr sound, IntPtr name, int namelen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetLength(IntPtr sound, out uint length, TIMEUNIT lengthtype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetFormat(IntPtr sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetNumSubSounds(IntPtr sound, out int numsubsounds);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetNumTags(IntPtr sound, out int numtags, out int numtagsupdated);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetTag(IntPtr sound, byte[] name, int index, out TAG tag);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetOpenState(IntPtr sound, out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_ReadData(IntPtr sound, IntPtr buffer, uint length, out uint read);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SeekData(IntPtr sound, uint pcm);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetSoundGroup(IntPtr sound, IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSoundGroup(IntPtr sound, out IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetNumSyncPoints(IntPtr sound, out int numsyncpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSyncPoint(IntPtr sound, int index, out IntPtr point);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetSyncPointInfo(IntPtr sound, IntPtr point, IntPtr name, int namelen, out uint offset, TIMEUNIT offsettype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_AddSyncPoint(IntPtr sound, uint offset, TIMEUNIT offsettype, byte[] name, out IntPtr point);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_DeleteSyncPoint(IntPtr sound, IntPtr point);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetMode(IntPtr sound, MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetMode(IntPtr sound, out MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetLoopCount(IntPtr sound, int loopcount);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetLoopCount(IntPtr sound, out int loopcount);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetLoopPoints(IntPtr sound, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetLoopPoints(IntPtr sound, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetMusicNumChannels(IntPtr sound, out int numchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetMusicChannelVolume(IntPtr sound, int channel, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetMusicChannelVolume(IntPtr sound, int channel, out float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetMusicSpeed(IntPtr sound, float speed);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetMusicSpeed(IntPtr sound, out float speed);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_SetUserData(IntPtr sound, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Sound_GetUserData(IntPtr sound, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'ChannelControl' API
+ */
+ interface IChannelControl
+ {
+ RESULT getSystemObject(out System system);
+
+ // General control functionality for Channels and ChannelGroups.
+ RESULT stop();
+ RESULT setPaused(bool paused);
+ RESULT getPaused(out bool paused);
+ RESULT setVolume(float volume);
+ RESULT getVolume(out float volume);
+ RESULT setVolumeRamp(bool ramp);
+ RESULT getVolumeRamp(out bool ramp);
+ RESULT getAudibility(out float audibility);
+ RESULT setPitch(float pitch);
+ RESULT getPitch(out float pitch);
+ RESULT setMute(bool mute);
+ RESULT getMute(out bool mute);
+ RESULT setReverbProperties(int instance, float wet);
+ RESULT getReverbProperties(int instance, out float wet);
+ RESULT setLowPassGain(float gain);
+ RESULT getLowPassGain(out float gain);
+ RESULT setMode(MODE mode);
+ RESULT getMode(out MODE mode);
+ RESULT setCallback(CHANNELCONTROL_CALLBACK callback);
+ RESULT isPlaying(out bool isplaying);
+
+ // Panning and level adjustment.
+ RESULT setPan(float pan);
+ RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
+ RESULT setMixLevelsInput(float[] levels, int numlevels);
+ RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop);
+ RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
+
+ // Clock based functionality.
+ RESULT getDSPClock(out ulong dspclock, out ulong parentclock);
+ RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels);
+ RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end);
+ RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
+ RESULT addFadePoint(ulong dspclock, float volume);
+ RESULT setFadePointRamp(ulong dspclock, float volume);
+ RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end);
+ RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
+
+ // DSP effects.
+ RESULT getDSP(int index, out DSP dsp);
+ RESULT addDSP(int index, DSP dsp);
+ RESULT removeDSP(DSP dsp);
+ RESULT getNumDSPs(out int numdsps);
+ RESULT setDSPIndex(DSP dsp, int index);
+ RESULT getDSPIndex(DSP dsp, out int index);
+
+ // 3D functionality.
+ RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel);
+ RESULT get3DAttributes(out VECTOR pos, out VECTOR vel);
+ RESULT set3DMinMaxDistance(float mindistance, float maxdistance);
+ RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance);
+ RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume);
+ RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume);
+ RESULT set3DConeOrientation(ref VECTOR orientation);
+ RESULT get3DConeOrientation(out VECTOR orientation);
+ RESULT set3DCustomRolloff(ref VECTOR points, int numpoints);
+ RESULT get3DCustomRolloff(out IntPtr points, out int numpoints);
+ RESULT set3DOcclusion(float directocclusion, float reverbocclusion);
+ RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion);
+ RESULT set3DSpread(float angle);
+ RESULT get3DSpread(out float angle);
+ RESULT set3DLevel(float level);
+ RESULT get3DLevel(out float level);
+ RESULT set3DDopplerLevel(float level);
+ RESULT get3DDopplerLevel(out float level);
+ RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq);
+ RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq);
+
+ // Userdata set/get.
+ RESULT setUserData(IntPtr userdata);
+ RESULT getUserData(out IntPtr userdata);
+ }
+
+ /*
+ 'Channel' API
+ */
+ public struct Channel : IChannelControl
+ {
+ // Channel specific control functionality.
+ public RESULT setFrequency(float frequency)
+ {
+ return FMOD5_Channel_SetFrequency(this.handle, frequency);
+ }
+ public RESULT getFrequency(out float frequency)
+ {
+ return FMOD5_Channel_GetFrequency(this.handle, out frequency);
+ }
+ public RESULT setPriority(int priority)
+ {
+ return FMOD5_Channel_SetPriority(this.handle, priority);
+ }
+ public RESULT getPriority(out int priority)
+ {
+ return FMOD5_Channel_GetPriority(this.handle, out priority);
+ }
+ public RESULT setPosition(uint position, TIMEUNIT postype)
+ {
+ return FMOD5_Channel_SetPosition(this.handle, position, postype);
+ }
+ public RESULT getPosition(out uint position, TIMEUNIT postype)
+ {
+ return FMOD5_Channel_GetPosition(this.handle, out position, postype);
+ }
+ public RESULT setChannelGroup(ChannelGroup channelgroup)
+ {
+ return FMOD5_Channel_SetChannelGroup(this.handle, channelgroup.handle);
+ }
+ public RESULT getChannelGroup(out ChannelGroup channelgroup)
+ {
+ return FMOD5_Channel_GetChannelGroup(this.handle, out channelgroup.handle);
+ }
+ public RESULT setLoopCount(int loopcount)
+ {
+ return FMOD5_Channel_SetLoopCount(this.handle, loopcount);
+ }
+ public RESULT getLoopCount(out int loopcount)
+ {
+ return FMOD5_Channel_GetLoopCount(this.handle, out loopcount);
+ }
+ public RESULT setLoopPoints(uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype)
+ {
+ return FMOD5_Channel_SetLoopPoints(this.handle, loopstart, loopstarttype, loopend, loopendtype);
+ }
+ public RESULT getLoopPoints(out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype)
+ {
+ return FMOD5_Channel_GetLoopPoints(this.handle, out loopstart, loopstarttype, out loopend, loopendtype);
+ }
+
+ // Information only functions.
+ public RESULT isVirtual(out bool isvirtual)
+ {
+ return FMOD5_Channel_IsVirtual(this.handle, out isvirtual);
+ }
+ public RESULT getCurrentSound(out Sound sound)
+ {
+ return FMOD5_Channel_GetCurrentSound(this.handle, out sound.handle);
+ }
+ public RESULT getIndex(out int index)
+ {
+ return FMOD5_Channel_GetIndex(this.handle, out index);
+ }
+ public RESULT getSystemObject(out System system)
+ {
+ return FMOD5_Channel_GetSystemObject(this.handle, out system.handle);
+ }
+
+ // General control functionality for Channels and ChannelGroups.
+ public RESULT stop()
+ {
+ return FMOD5_Channel_Stop(this.handle);
+ }
+ public RESULT setPaused(bool paused)
+ {
+ return FMOD5_Channel_SetPaused(this.handle, paused);
+ }
+ public RESULT getPaused(out bool paused)
+ {
+ return FMOD5_Channel_GetPaused(this.handle, out paused);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD5_Channel_SetVolume(this.handle, volume);
+ }
+ public RESULT getVolume(out float volume)
+ {
+ return FMOD5_Channel_GetVolume(this.handle, out volume);
+ }
+ public RESULT setVolumeRamp(bool ramp)
+ {
+ return FMOD5_Channel_SetVolumeRamp(this.handle, ramp);
+ }
+ public RESULT getVolumeRamp(out bool ramp)
+ {
+ return FMOD5_Channel_GetVolumeRamp(this.handle, out ramp);
+ }
+ public RESULT getAudibility(out float audibility)
+ {
+ return FMOD5_Channel_GetAudibility(this.handle, out audibility);
+ }
+ public RESULT setPitch(float pitch)
+ {
+ return FMOD5_Channel_SetPitch(this.handle, pitch);
+ }
+ public RESULT getPitch(out float pitch)
+ {
+ return FMOD5_Channel_GetPitch(this.handle, out pitch);
+ }
+ public RESULT setMute(bool mute)
+ {
+ return FMOD5_Channel_SetMute(this.handle, mute);
+ }
+ public RESULT getMute(out bool mute)
+ {
+ return FMOD5_Channel_GetMute(this.handle, out mute);
+ }
+ public RESULT setReverbProperties(int instance, float wet)
+ {
+ return FMOD5_Channel_SetReverbProperties(this.handle, instance, wet);
+ }
+ public RESULT getReverbProperties(int instance, out float wet)
+ {
+ return FMOD5_Channel_GetReverbProperties(this.handle, instance, out wet);
+ }
+ public RESULT setLowPassGain(float gain)
+ {
+ return FMOD5_Channel_SetLowPassGain(this.handle, gain);
+ }
+ public RESULT getLowPassGain(out float gain)
+ {
+ return FMOD5_Channel_GetLowPassGain(this.handle, out gain);
+ }
+ public RESULT setMode(MODE mode)
+ {
+ return FMOD5_Channel_SetMode(this.handle, mode);
+ }
+ public RESULT getMode(out MODE mode)
+ {
+ return FMOD5_Channel_GetMode(this.handle, out mode);
+ }
+ public RESULT setCallback(CHANNELCONTROL_CALLBACK callback)
+ {
+ return FMOD5_Channel_SetCallback(this.handle, callback);
+ }
+ public RESULT isPlaying(out bool isplaying)
+ {
+ return FMOD5_Channel_IsPlaying(this.handle, out isplaying);
+ }
+
+ // Panning and level adjustment.
+ public RESULT setPan(float pan)
+ {
+ return FMOD5_Channel_SetPan(this.handle, pan);
+ }
+ public RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright)
+ {
+ return FMOD5_Channel_SetMixLevelsOutput(this.handle, frontleft, frontright, center, lfe, surroundleft, surroundright, backleft, backright);
+ }
+ public RESULT setMixLevelsInput(float[] levels, int numlevels)
+ {
+ return FMOD5_Channel_SetMixLevelsInput(this.handle, levels, numlevels);
+ }
+ public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop = 0)
+ {
+ return FMOD5_Channel_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
+ }
+ public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop = 0)
+ {
+ return FMOD5_Channel_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
+ }
+
+ // Clock based functionality.
+ public RESULT getDSPClock(out ulong dspclock, out ulong parentclock)
+ {
+ return FMOD5_Channel_GetDSPClock(this.handle, out dspclock, out parentclock);
+ }
+ public RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels = true)
+ {
+ return FMOD5_Channel_SetDelay(this.handle, dspclock_start, dspclock_end, stopchannels);
+ }
+ public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end)
+ {
+ return FMOD5_Channel_GetDelay(this.handle, out dspclock_start, out dspclock_end, IntPtr.Zero);
+ }
+ public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels)
+ {
+ return FMOD5_Channel_GetDelay(this.handle, out dspclock_start, out dspclock_end, out stopchannels);
+ }
+ public RESULT addFadePoint(ulong dspclock, float volume)
+ {
+ return FMOD5_Channel_AddFadePoint(this.handle, dspclock, volume);
+ }
+ public RESULT setFadePointRamp(ulong dspclock, float volume)
+ {
+ return FMOD5_Channel_SetFadePointRamp(this.handle, dspclock, volume);
+ }
+ public RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end)
+ {
+ return FMOD5_Channel_RemoveFadePoints(this.handle, dspclock_start, dspclock_end);
+ }
+ public RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume)
+ {
+ return FMOD5_Channel_GetFadePoints(this.handle, ref numpoints, point_dspclock, point_volume);
+ }
+
+ // DSP effects.
+ public RESULT getDSP(int index, out DSP dsp)
+ {
+ return FMOD5_Channel_GetDSP(this.handle, index, out dsp.handle);
+ }
+ public RESULT addDSP(int index, DSP dsp)
+ {
+ return FMOD5_Channel_AddDSP(this.handle, index, dsp.handle);
+ }
+ public RESULT removeDSP(DSP dsp)
+ {
+ return FMOD5_Channel_RemoveDSP(this.handle, dsp.handle);
+ }
+ public RESULT getNumDSPs(out int numdsps)
+ {
+ return FMOD5_Channel_GetNumDSPs(this.handle, out numdsps);
+ }
+ public RESULT setDSPIndex(DSP dsp, int index)
+ {
+ return FMOD5_Channel_SetDSPIndex(this.handle, dsp.handle, index);
+ }
+ public RESULT getDSPIndex(DSP dsp, out int index)
+ {
+ return FMOD5_Channel_GetDSPIndex(this.handle, dsp.handle, out index);
+ }
+
+ // 3D functionality.
+ public RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel)
+ {
+ return FMOD5_Channel_Set3DAttributes(this.handle, ref pos, ref vel);
+ }
+ public RESULT get3DAttributes(out VECTOR pos, out VECTOR vel)
+ {
+ return FMOD5_Channel_Get3DAttributes(this.handle, out pos, out vel);
+ }
+ public RESULT set3DMinMaxDistance(float mindistance, float maxdistance)
+ {
+ return FMOD5_Channel_Set3DMinMaxDistance(this.handle, mindistance, maxdistance);
+ }
+ public RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance)
+ {
+ return FMOD5_Channel_Get3DMinMaxDistance(this.handle, out mindistance, out maxdistance);
+ }
+ public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
+ {
+ return FMOD5_Channel_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
+ }
+ public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
+ {
+ return FMOD5_Channel_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
+ }
+ public RESULT set3DConeOrientation(ref VECTOR orientation)
+ {
+ return FMOD5_Channel_Set3DConeOrientation(this.handle, ref orientation);
+ }
+ public RESULT get3DConeOrientation(out VECTOR orientation)
+ {
+ return FMOD5_Channel_Get3DConeOrientation(this.handle, out orientation);
+ }
+ public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
+ {
+ return FMOD5_Channel_Set3DCustomRolloff(this.handle, ref points, numpoints);
+ }
+ public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
+ {
+ return FMOD5_Channel_Get3DCustomRolloff(this.handle, out points, out numpoints);
+ }
+ public RESULT set3DOcclusion(float directocclusion, float reverbocclusion)
+ {
+ return FMOD5_Channel_Set3DOcclusion(this.handle, directocclusion, reverbocclusion);
+ }
+ public RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion)
+ {
+ return FMOD5_Channel_Get3DOcclusion(this.handle, out directocclusion, out reverbocclusion);
+ }
+ public RESULT set3DSpread(float angle)
+ {
+ return FMOD5_Channel_Set3DSpread(this.handle, angle);
+ }
+ public RESULT get3DSpread(out float angle)
+ {
+ return FMOD5_Channel_Get3DSpread(this.handle, out angle);
+ }
+ public RESULT set3DLevel(float level)
+ {
+ return FMOD5_Channel_Set3DLevel(this.handle, level);
+ }
+ public RESULT get3DLevel(out float level)
+ {
+ return FMOD5_Channel_Get3DLevel(this.handle, out level);
+ }
+ public RESULT set3DDopplerLevel(float level)
+ {
+ return FMOD5_Channel_Set3DDopplerLevel(this.handle, level);
+ }
+ public RESULT get3DDopplerLevel(out float level)
+ {
+ return FMOD5_Channel_Get3DDopplerLevel(this.handle, out level);
+ }
+ public RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq)
+ {
+ return FMOD5_Channel_Set3DDistanceFilter(this.handle, custom, customLevel, centerFreq);
+ }
+ public RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq)
+ {
+ return FMOD5_Channel_Get3DDistanceFilter(this.handle, out custom, out customLevel, out centerFreq);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_Channel_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_Channel_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetFrequency(IntPtr channel, float frequency);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetFrequency(IntPtr channel, out float frequency);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetPriority(IntPtr channel, int priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetPriority(IntPtr channel, out int priority);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetPosition(IntPtr channel, uint position, TIMEUNIT postype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetPosition(IntPtr channel, out uint position, TIMEUNIT postype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetChannelGroup(IntPtr channel, IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetChannelGroup(IntPtr channel, out IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetLoopCount(IntPtr channel, int loopcount);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetLoopCount(IntPtr channel, out int loopcount);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetLoopPoints(IntPtr channel, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetLoopPoints(IntPtr channel, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_IsVirtual(IntPtr channel, out bool isvirtual);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetCurrentSound(IntPtr channel, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetIndex(IntPtr channel, out int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetSystemObject(IntPtr channel, out IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Stop(IntPtr channel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetPaused(IntPtr channel, bool paused);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetPaused(IntPtr channel, out bool paused);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetVolume(IntPtr channel, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetVolume(IntPtr channel, out float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetVolumeRamp(IntPtr channel, bool ramp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetVolumeRamp(IntPtr channel, out bool ramp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetAudibility(IntPtr channel, out float audibility);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetPitch(IntPtr channel, float pitch);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetPitch(IntPtr channel, out float pitch);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetMute(IntPtr channel, bool mute);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetMute(IntPtr channel, out bool mute);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetReverbProperties(IntPtr channel, int instance, float wet);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetReverbProperties(IntPtr channel, int instance, out float wet);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetLowPassGain(IntPtr channel, float gain);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetLowPassGain(IntPtr channel, out float gain);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetMode(IntPtr channel, MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetMode(IntPtr channel, out MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetCallback(IntPtr channel, CHANNELCONTROL_CALLBACK callback);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_IsPlaying(IntPtr channel, out bool isplaying);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetPan(IntPtr channel, float pan);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetMixLevelsOutput(IntPtr channel, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetMixLevelsInput(IntPtr channel, float[] levels, int numlevels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetMixMatrix(IntPtr channel, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetMixMatrix(IntPtr channel, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetDSPClock(IntPtr channel, out ulong dspclock, out ulong parentclock);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetDelay(IntPtr channel, ulong dspclock_start, ulong dspclock_end, bool stopchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetDelay(IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetDelay(IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_AddFadePoint(IntPtr channel, ulong dspclock, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetFadePointRamp(IntPtr channel, ulong dspclock, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_RemoveFadePoints(IntPtr channel, ulong dspclock_start, ulong dspclock_end);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetFadePoints(IntPtr channel, ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetDSP(IntPtr channel, int index, out IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_AddDSP(IntPtr channel, int index, IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_RemoveDSP(IntPtr channel, IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetNumDSPs(IntPtr channel, out int numdsps);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetDSPIndex(IntPtr channel, IntPtr dsp, int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetDSPIndex(IntPtr channel, IntPtr dsp, out int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DAttributes(IntPtr channel, ref VECTOR pos, ref VECTOR vel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DAttributes(IntPtr channel, out VECTOR pos, out VECTOR vel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DMinMaxDistance(IntPtr channel, float mindistance, float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DMinMaxDistance(IntPtr channel, out float mindistance, out float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DConeSettings(IntPtr channel, float insideconeangle, float outsideconeangle, float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DConeSettings(IntPtr channel, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DConeOrientation(IntPtr channel, ref VECTOR orientation);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DConeOrientation(IntPtr channel, out VECTOR orientation);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DCustomRolloff(IntPtr channel, ref VECTOR points, int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DCustomRolloff(IntPtr channel, out IntPtr points, out int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DOcclusion(IntPtr channel, float directocclusion, float reverbocclusion);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DOcclusion(IntPtr channel, out float directocclusion, out float reverbocclusion);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DSpread(IntPtr channel, float angle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DSpread(IntPtr channel, out float angle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DLevel(IntPtr channel, float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DLevel(IntPtr channel, out float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DDopplerLevel(IntPtr channel, float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DDopplerLevel(IntPtr channel, out float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Set3DDistanceFilter(IntPtr channel, bool custom, float customLevel, float centerFreq);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_Get3DDistanceFilter(IntPtr channel, out bool custom, out float customLevel, out float centerFreq);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_SetUserData(IntPtr channel, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Channel_GetUserData(IntPtr channel, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'ChannelGroup' API
+ */
+ public struct ChannelGroup : IChannelControl
+ {
+ public RESULT release()
+ {
+ return FMOD5_ChannelGroup_Release(this.handle);
+ }
+
+ // Nested channel groups.
+ public RESULT addGroup(ChannelGroup group, bool propagatedspclock = true)
+ {
+ return FMOD5_ChannelGroup_AddGroup(this.handle, group.handle, propagatedspclock, IntPtr.Zero);
+ }
+ public RESULT addGroup(ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
+ {
+ return FMOD5_ChannelGroup_AddGroup(this.handle, group.handle, propagatedspclock, out connection.handle);
+ }
+ public RESULT getNumGroups(out int numgroups)
+ {
+ return FMOD5_ChannelGroup_GetNumGroups(this.handle, out numgroups);
+ }
+ public RESULT getGroup(int index, out ChannelGroup group)
+ {
+ return FMOD5_ChannelGroup_GetGroup(this.handle, index, out group.handle);
+ }
+ public RESULT getParentGroup(out ChannelGroup group)
+ {
+ return FMOD5_ChannelGroup_GetParentGroup(this.handle, out group.handle);
+ }
+
+ // Information only functions.
+ public RESULT getName(out string name, int namelen)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_ChannelGroup_GetName(this.handle, stringMem, namelen);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getNumChannels(out int numchannels)
+ {
+ return FMOD5_ChannelGroup_GetNumChannels(this.handle, out numchannels);
+ }
+ public RESULT getChannel(int index, out Channel channel)
+ {
+ return FMOD5_ChannelGroup_GetChannel(this.handle, index, out channel.handle);
+ }
+
+ public RESULT getSystemObject(out System system)
+ {
+ return FMOD5_ChannelGroup_GetSystemObject(this.handle, out system.handle);
+ }
+
+ // General control functionality for Channels and ChannelGroups.
+ public RESULT stop()
+ {
+ return FMOD5_ChannelGroup_Stop(this.handle);
+ }
+ public RESULT setPaused(bool paused)
+ {
+ return FMOD5_ChannelGroup_SetPaused(this.handle, paused);
+ }
+ public RESULT getPaused(out bool paused)
+ {
+ return FMOD5_ChannelGroup_GetPaused(this.handle, out paused);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD5_ChannelGroup_SetVolume(this.handle, volume);
+ }
+ public RESULT getVolume(out float volume)
+ {
+ return FMOD5_ChannelGroup_GetVolume(this.handle, out volume);
+ }
+ public RESULT setVolumeRamp(bool ramp)
+ {
+ return FMOD5_ChannelGroup_SetVolumeRamp(this.handle, ramp);
+ }
+ public RESULT getVolumeRamp(out bool ramp)
+ {
+ return FMOD5_ChannelGroup_GetVolumeRamp(this.handle, out ramp);
+ }
+ public RESULT getAudibility(out float audibility)
+ {
+ return FMOD5_ChannelGroup_GetAudibility(this.handle, out audibility);
+ }
+ public RESULT setPitch(float pitch)
+ {
+ return FMOD5_ChannelGroup_SetPitch(this.handle, pitch);
+ }
+ public RESULT getPitch(out float pitch)
+ {
+ return FMOD5_ChannelGroup_GetPitch(this.handle, out pitch);
+ }
+ public RESULT setMute(bool mute)
+ {
+ return FMOD5_ChannelGroup_SetMute(this.handle, mute);
+ }
+ public RESULT getMute(out bool mute)
+ {
+ return FMOD5_ChannelGroup_GetMute(this.handle, out mute);
+ }
+ public RESULT setReverbProperties(int instance, float wet)
+ {
+ return FMOD5_ChannelGroup_SetReverbProperties(this.handle, instance, wet);
+ }
+ public RESULT getReverbProperties(int instance, out float wet)
+ {
+ return FMOD5_ChannelGroup_GetReverbProperties(this.handle, instance, out wet);
+ }
+ public RESULT setLowPassGain(float gain)
+ {
+ return FMOD5_ChannelGroup_SetLowPassGain(this.handle, gain);
+ }
+ public RESULT getLowPassGain(out float gain)
+ {
+ return FMOD5_ChannelGroup_GetLowPassGain(this.handle, out gain);
+ }
+ public RESULT setMode(MODE mode)
+ {
+ return FMOD5_ChannelGroup_SetMode(this.handle, mode);
+ }
+ public RESULT getMode(out MODE mode)
+ {
+ return FMOD5_ChannelGroup_GetMode(this.handle, out mode);
+ }
+ public RESULT setCallback(CHANNELCONTROL_CALLBACK callback)
+ {
+ return FMOD5_ChannelGroup_SetCallback(this.handle, callback);
+ }
+ public RESULT isPlaying(out bool isplaying)
+ {
+ return FMOD5_ChannelGroup_IsPlaying(this.handle, out isplaying);
+ }
+
+ // Panning and level adjustment.
+ public RESULT setPan(float pan)
+ {
+ return FMOD5_ChannelGroup_SetPan(this.handle, pan);
+ }
+ public RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright)
+ {
+ return FMOD5_ChannelGroup_SetMixLevelsOutput(this.handle, frontleft, frontright, center, lfe, surroundleft, surroundright, backleft, backright);
+ }
+ public RESULT setMixLevelsInput(float[] levels, int numlevels)
+ {
+ return FMOD5_ChannelGroup_SetMixLevelsInput(this.handle, levels, numlevels);
+ }
+ public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop)
+ {
+ return FMOD5_ChannelGroup_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
+ }
+ public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop)
+ {
+ return FMOD5_ChannelGroup_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
+ }
+
+ // Clock based functionality.
+ public RESULT getDSPClock(out ulong dspclock, out ulong parentclock)
+ {
+ return FMOD5_ChannelGroup_GetDSPClock(this.handle, out dspclock, out parentclock);
+ }
+ public RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels)
+ {
+ return FMOD5_ChannelGroup_SetDelay(this.handle, dspclock_start, dspclock_end, stopchannels);
+ }
+ public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end)
+ {
+ return FMOD5_ChannelGroup_GetDelay(this.handle, out dspclock_start, out dspclock_end, IntPtr.Zero);
+ }
+ public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels)
+ {
+ return FMOD5_ChannelGroup_GetDelay(this.handle, out dspclock_start, out dspclock_end, out stopchannels);
+ }
+ public RESULT addFadePoint(ulong dspclock, float volume)
+ {
+ return FMOD5_ChannelGroup_AddFadePoint(this.handle, dspclock, volume);
+ }
+ public RESULT setFadePointRamp(ulong dspclock, float volume)
+ {
+ return FMOD5_ChannelGroup_SetFadePointRamp(this.handle, dspclock, volume);
+ }
+ public RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end)
+ {
+ return FMOD5_ChannelGroup_RemoveFadePoints(this.handle, dspclock_start, dspclock_end);
+ }
+ public RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume)
+ {
+ return FMOD5_ChannelGroup_GetFadePoints(this.handle, ref numpoints, point_dspclock, point_volume);
+ }
+
+ // DSP effects.
+ public RESULT getDSP(int index, out DSP dsp)
+ {
+ return FMOD5_ChannelGroup_GetDSP(this.handle, index, out dsp.handle);
+ }
+ public RESULT addDSP(int index, DSP dsp)
+ {
+ return FMOD5_ChannelGroup_AddDSP(this.handle, index, dsp.handle);
+ }
+ public RESULT removeDSP(DSP dsp)
+ {
+ return FMOD5_ChannelGroup_RemoveDSP(this.handle, dsp.handle);
+ }
+ public RESULT getNumDSPs(out int numdsps)
+ {
+ return FMOD5_ChannelGroup_GetNumDSPs(this.handle, out numdsps);
+ }
+ public RESULT setDSPIndex(DSP dsp, int index)
+ {
+ return FMOD5_ChannelGroup_SetDSPIndex(this.handle, dsp.handle, index);
+ }
+ public RESULT getDSPIndex(DSP dsp, out int index)
+ {
+ return FMOD5_ChannelGroup_GetDSPIndex(this.handle, dsp.handle, out index);
+ }
+
+ // 3D functionality.
+ public RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel)
+ {
+ return FMOD5_ChannelGroup_Set3DAttributes(this.handle, ref pos, ref vel);
+ }
+ public RESULT get3DAttributes(out VECTOR pos, out VECTOR vel)
+ {
+ return FMOD5_ChannelGroup_Get3DAttributes(this.handle, out pos, out vel);
+ }
+ public RESULT set3DMinMaxDistance(float mindistance, float maxdistance)
+ {
+ return FMOD5_ChannelGroup_Set3DMinMaxDistance(this.handle, mindistance, maxdistance);
+ }
+ public RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance)
+ {
+ return FMOD5_ChannelGroup_Get3DMinMaxDistance(this.handle, out mindistance, out maxdistance);
+ }
+ public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
+ {
+ return FMOD5_ChannelGroup_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
+ }
+ public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
+ {
+ return FMOD5_ChannelGroup_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
+ }
+ public RESULT set3DConeOrientation(ref VECTOR orientation)
+ {
+ return FMOD5_ChannelGroup_Set3DConeOrientation(this.handle, ref orientation);
+ }
+ public RESULT get3DConeOrientation(out VECTOR orientation)
+ {
+ return FMOD5_ChannelGroup_Get3DConeOrientation(this.handle, out orientation);
+ }
+ public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
+ {
+ return FMOD5_ChannelGroup_Set3DCustomRolloff(this.handle, ref points, numpoints);
+ }
+ public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
+ {
+ return FMOD5_ChannelGroup_Get3DCustomRolloff(this.handle, out points, out numpoints);
+ }
+ public RESULT set3DOcclusion(float directocclusion, float reverbocclusion)
+ {
+ return FMOD5_ChannelGroup_Set3DOcclusion(this.handle, directocclusion, reverbocclusion);
+ }
+ public RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion)
+ {
+ return FMOD5_ChannelGroup_Get3DOcclusion(this.handle, out directocclusion, out reverbocclusion);
+ }
+ public RESULT set3DSpread(float angle)
+ {
+ return FMOD5_ChannelGroup_Set3DSpread(this.handle, angle);
+ }
+ public RESULT get3DSpread(out float angle)
+ {
+ return FMOD5_ChannelGroup_Get3DSpread(this.handle, out angle);
+ }
+ public RESULT set3DLevel(float level)
+ {
+ return FMOD5_ChannelGroup_Set3DLevel(this.handle, level);
+ }
+ public RESULT get3DLevel(out float level)
+ {
+ return FMOD5_ChannelGroup_Get3DLevel(this.handle, out level);
+ }
+ public RESULT set3DDopplerLevel(float level)
+ {
+ return FMOD5_ChannelGroup_Set3DDopplerLevel(this.handle, level);
+ }
+ public RESULT get3DDopplerLevel(out float level)
+ {
+ return FMOD5_ChannelGroup_Get3DDopplerLevel(this.handle, out level);
+ }
+ public RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq)
+ {
+ return FMOD5_ChannelGroup_Set3DDistanceFilter(this.handle, custom, customLevel, centerFreq);
+ }
+ public RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq)
+ {
+ return FMOD5_ChannelGroup_Get3DDistanceFilter(this.handle, out custom, out customLevel, out centerFreq);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_ChannelGroup_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_ChannelGroup_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Release(IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_AddGroup(IntPtr channelgroup, IntPtr group, bool propagatedspclock, IntPtr zero);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_AddGroup(IntPtr channelgroup, IntPtr group, bool propagatedspclock, out IntPtr connection);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetNumGroups(IntPtr channelgroup, out int numgroups);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetGroup(IntPtr channelgroup, int index, out IntPtr group);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetParentGroup(IntPtr channelgroup, out IntPtr group);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetName(IntPtr channelgroup, IntPtr name, int namelen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetNumChannels(IntPtr channelgroup, out int numchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetChannel(IntPtr channelgroup, int index, out IntPtr channel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetSystemObject(IntPtr channelgroup, out IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Stop(IntPtr channelgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetPaused(IntPtr channelgroup, bool paused);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetPaused(IntPtr channelgroup, out bool paused);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetVolume(IntPtr channelgroup, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetVolume(IntPtr channelgroup, out float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetVolumeRamp(IntPtr channelgroup, bool ramp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetVolumeRamp(IntPtr channelgroup, out bool ramp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetAudibility(IntPtr channelgroup, out float audibility);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetPitch(IntPtr channelgroup, float pitch);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetPitch(IntPtr channelgroup, out float pitch);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetMute(IntPtr channelgroup, bool mute);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetMute(IntPtr channelgroup, out bool mute);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetReverbProperties(IntPtr channelgroup, int instance, float wet);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetReverbProperties(IntPtr channelgroup, int instance, out float wet);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetLowPassGain(IntPtr channelgroup, float gain);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetLowPassGain(IntPtr channelgroup, out float gain);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetMode(IntPtr channelgroup, MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetMode(IntPtr channelgroup, out MODE mode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetCallback(IntPtr channelgroup, CHANNELCONTROL_CALLBACK callback);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_IsPlaying(IntPtr channelgroup, out bool isplaying);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetPan(IntPtr channelgroup, float pan);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsOutput(IntPtr channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsInput(IntPtr channelgroup, float[] levels, int numlevels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetMixMatrix(IntPtr channelgroup, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetMixMatrix(IntPtr channelgroup, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetDSPClock(IntPtr channelgroup, out ulong dspclock, out ulong parentclock);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetDelay(IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end, bool stopchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetDelay(IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetDelay(IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_AddFadePoint(IntPtr channelgroup, ulong dspclock, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetFadePointRamp(IntPtr channelgroup, ulong dspclock, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_RemoveFadePoints(IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetFadePoints(IntPtr channelgroup, ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetDSP(IntPtr channelgroup, int index, out IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_AddDSP(IntPtr channelgroup, int index, IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_RemoveDSP(IntPtr channelgroup, IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetNumDSPs(IntPtr channelgroup, out int numdsps);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetDSPIndex(IntPtr channelgroup, IntPtr dsp, int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetDSPIndex(IntPtr channelgroup, IntPtr dsp, out int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DAttributes(IntPtr channelgroup, ref VECTOR pos, ref VECTOR vel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DAttributes(IntPtr channelgroup, out VECTOR pos, out VECTOR vel);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DMinMaxDistance(IntPtr channelgroup, float mindistance, float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DMinMaxDistance(IntPtr channelgroup, out float mindistance, out float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DConeSettings(IntPtr channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DConeSettings(IntPtr channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DConeOrientation(IntPtr channelgroup, ref VECTOR orientation);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DConeOrientation(IntPtr channelgroup, out VECTOR orientation);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DCustomRolloff(IntPtr channelgroup, ref VECTOR points, int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DCustomRolloff(IntPtr channelgroup, out IntPtr points, out int numpoints);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DOcclusion(IntPtr channelgroup, float directocclusion, float reverbocclusion);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DOcclusion(IntPtr channelgroup, out float directocclusion, out float reverbocclusion);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DSpread(IntPtr channelgroup, float angle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DSpread(IntPtr channelgroup, out float angle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DLevel(IntPtr channelgroup, float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DLevel(IntPtr channelgroup, out float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DDopplerLevel(IntPtr channelgroup, float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DDopplerLevel(IntPtr channelgroup, out float level);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Set3DDistanceFilter(IntPtr channelgroup, bool custom, float customLevel, float centerFreq);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_Get3DDistanceFilter(IntPtr channelgroup, out bool custom, out float customLevel, out float centerFreq);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_SetUserData(IntPtr channelgroup, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_ChannelGroup_GetUserData(IntPtr channelgroup, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'SoundGroup' API
+ */
+ public struct SoundGroup
+ {
+ public RESULT release()
+ {
+ return FMOD5_SoundGroup_Release(this.handle);
+ }
+
+ public RESULT getSystemObject(out System system)
+ {
+ return FMOD5_SoundGroup_GetSystemObject(this.handle, out system.handle);
+ }
+
+ // SoundGroup control functions.
+ public RESULT setMaxAudible(int maxaudible)
+ {
+ return FMOD5_SoundGroup_SetMaxAudible(this.handle, maxaudible);
+ }
+ public RESULT getMaxAudible(out int maxaudible)
+ {
+ return FMOD5_SoundGroup_GetMaxAudible(this.handle, out maxaudible);
+ }
+ public RESULT setMaxAudibleBehavior(SOUNDGROUP_BEHAVIOR behavior)
+ {
+ return FMOD5_SoundGroup_SetMaxAudibleBehavior(this.handle, behavior);
+ }
+ public RESULT getMaxAudibleBehavior(out SOUNDGROUP_BEHAVIOR behavior)
+ {
+ return FMOD5_SoundGroup_GetMaxAudibleBehavior(this.handle, out behavior);
+ }
+ public RESULT setMuteFadeSpeed(float speed)
+ {
+ return FMOD5_SoundGroup_SetMuteFadeSpeed(this.handle, speed);
+ }
+ public RESULT getMuteFadeSpeed(out float speed)
+ {
+ return FMOD5_SoundGroup_GetMuteFadeSpeed(this.handle, out speed);
+ }
+ public RESULT setVolume(float volume)
+ {
+ return FMOD5_SoundGroup_SetVolume(this.handle, volume);
+ }
+ public RESULT getVolume(out float volume)
+ {
+ return FMOD5_SoundGroup_GetVolume(this.handle, out volume);
+ }
+ public RESULT stop()
+ {
+ return FMOD5_SoundGroup_Stop(this.handle);
+ }
+
+ // Information only functions.
+ public RESULT getName(out string name, int namelen)
+ {
+ IntPtr stringMem = Marshal.AllocHGlobal(namelen);
+
+ RESULT result = FMOD5_SoundGroup_GetName(this.handle, stringMem, namelen);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(stringMem);
+ }
+ Marshal.FreeHGlobal(stringMem);
+
+ return result;
+ }
+ public RESULT getNumSounds(out int numsounds)
+ {
+ return FMOD5_SoundGroup_GetNumSounds(this.handle, out numsounds);
+ }
+ public RESULT getSound(int index, out Sound sound)
+ {
+ return FMOD5_SoundGroup_GetSound(this.handle, index, out sound.handle);
+ }
+ public RESULT getNumPlaying(out int numplaying)
+ {
+ return FMOD5_SoundGroup_GetNumPlaying(this.handle, out numplaying);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_SoundGroup_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_SoundGroup_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_Release(IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetSystemObject(IntPtr soundgroup, out IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_SetMaxAudible(IntPtr soundgroup, int maxaudible);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetMaxAudible(IntPtr soundgroup, out int maxaudible);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_SetMaxAudibleBehavior(IntPtr soundgroup, SOUNDGROUP_BEHAVIOR behavior);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetMaxAudibleBehavior(IntPtr soundgroup, out SOUNDGROUP_BEHAVIOR behavior);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_SetMuteFadeSpeed(IntPtr soundgroup, float speed);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetMuteFadeSpeed(IntPtr soundgroup, out float speed);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_SetVolume(IntPtr soundgroup, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetVolume(IntPtr soundgroup, out float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_Stop(IntPtr soundgroup);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetName(IntPtr soundgroup, IntPtr name, int namelen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetNumSounds(IntPtr soundgroup, out int numsounds);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetSound(IntPtr soundgroup, int index, out IntPtr sound);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetNumPlaying(IntPtr soundgroup, out int numplaying);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_SetUserData(IntPtr soundgroup, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_SoundGroup_GetUserData(IntPtr soundgroup, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'DSP' API
+ */
+ public struct DSP
+ {
+ public RESULT release()
+ {
+ return FMOD5_DSP_Release(this.handle);
+ }
+ public RESULT getSystemObject(out System system)
+ {
+ return FMOD5_DSP_GetSystemObject(this.handle, out system.handle);
+ }
+
+ // Connection / disconnection / input and output enumeration.
+ public RESULT addInput(DSP input)
+ {
+ return FMOD5_DSP_AddInput(this.handle, input.handle, IntPtr.Zero, DSPCONNECTION_TYPE.STANDARD);
+ }
+ public RESULT addInput(DSP input, out DSPConnection connection, DSPCONNECTION_TYPE type = DSPCONNECTION_TYPE.STANDARD)
+ {
+ return FMOD5_DSP_AddInput(this.handle, input.handle, out connection.handle, type);
+ }
+ public RESULT disconnectFrom(DSP target, DSPConnection connection)
+ {
+ return FMOD5_DSP_DisconnectFrom(this.handle, target.handle, connection.handle);
+ }
+ public RESULT disconnectAll(bool inputs, bool outputs)
+ {
+ return FMOD5_DSP_DisconnectAll(this.handle, inputs, outputs);
+ }
+ public RESULT getNumInputs(out int numinputs)
+ {
+ return FMOD5_DSP_GetNumInputs(this.handle, out numinputs);
+ }
+ public RESULT getNumOutputs(out int numoutputs)
+ {
+ return FMOD5_DSP_GetNumOutputs(this.handle, out numoutputs);
+ }
+ public RESULT getInput(int index, out DSP input, out DSPConnection inputconnection)
+ {
+ return FMOD5_DSP_GetInput(this.handle, index, out input.handle, out inputconnection.handle);
+ }
+ public RESULT getOutput(int index, out DSP output, out DSPConnection outputconnection)
+ {
+ return FMOD5_DSP_GetOutput(this.handle, index, out output.handle, out outputconnection.handle);
+ }
+
+ // DSP unit control.
+ public RESULT setActive(bool active)
+ {
+ return FMOD5_DSP_SetActive(this.handle, active);
+ }
+ public RESULT getActive(out bool active)
+ {
+ return FMOD5_DSP_GetActive(this.handle, out active);
+ }
+ public RESULT setBypass(bool bypass)
+ {
+ return FMOD5_DSP_SetBypass(this.handle, bypass);
+ }
+ public RESULT getBypass(out bool bypass)
+ {
+ return FMOD5_DSP_GetBypass(this.handle, out bypass);
+ }
+ public RESULT setWetDryMix(float prewet, float postwet, float dry)
+ {
+ return FMOD5_DSP_SetWetDryMix(this.handle, prewet, postwet, dry);
+ }
+ public RESULT getWetDryMix(out float prewet, out float postwet, out float dry)
+ {
+ return FMOD5_DSP_GetWetDryMix(this.handle, out prewet, out postwet, out dry);
+ }
+ public RESULT setChannelFormat(CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode)
+ {
+ return FMOD5_DSP_SetChannelFormat(this.handle, channelmask, numchannels, source_speakermode);
+ }
+ public RESULT getChannelFormat(out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode)
+ {
+ return FMOD5_DSP_GetChannelFormat(this.handle, out channelmask, out numchannels, out source_speakermode);
+ }
+ public RESULT getOutputChannelFormat(CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode)
+ {
+ return FMOD5_DSP_GetOutputChannelFormat(this.handle, inmask, inchannels, inspeakermode, out outmask, out outchannels, out outspeakermode);
+ }
+ public RESULT reset()
+ {
+ return FMOD5_DSP_Reset(this.handle);
+ }
+
+ // DSP parameter control.
+ public RESULT setParameterFloat(int index, float value)
+ {
+ return FMOD5_DSP_SetParameterFloat(this.handle, index, value);
+ }
+ public RESULT setParameterInt(int index, int value)
+ {
+ return FMOD5_DSP_SetParameterInt(this.handle, index, value);
+ }
+ public RESULT setParameterBool(int index, bool value)
+ {
+ return FMOD5_DSP_SetParameterBool(this.handle, index, value);
+ }
+ public RESULT setParameterData(int index, byte[] data)
+ {
+ return FMOD5_DSP_SetParameterData(this.handle, index, Marshal.UnsafeAddrOfPinnedArrayElement(data, 0), (uint)data.Length);
+ }
+ public RESULT getParameterFloat(int index, out float value)
+ {
+ return FMOD5_DSP_GetParameterFloat(this.handle, index, out value, IntPtr.Zero, 0);
+ }
+ public RESULT getParameterInt(int index, out int value)
+ {
+ return FMOD5_DSP_GetParameterInt(this.handle, index, out value, IntPtr.Zero, 0);
+ }
+ public RESULT getParameterBool(int index, out bool value)
+ {
+ return FMOD5_DSP_GetParameterBool(this.handle, index, out value, IntPtr.Zero, 0);
+ }
+ public RESULT getParameterData(int index, out IntPtr data, out uint length)
+ {
+ return FMOD5_DSP_GetParameterData(this.handle, index, out data, out length, IntPtr.Zero, 0);
+ }
+ public RESULT getNumParameters(out int numparams)
+ {
+ return FMOD5_DSP_GetNumParameters(this.handle, out numparams);
+ }
+ public RESULT getParameterInfo(int index, out DSP_PARAMETER_DESC desc)
+ {
+ IntPtr descPtr;
+ RESULT result = FMOD5_DSP_GetParameterInfo(this.handle, index, out descPtr);
+#if (UNITY_2017_4_OR_NEWER) && !NET_4_6
+ desc = (DSP_PARAMETER_DESC)Marshal.PtrToStructure(descPtr, typeof(DSP_PARAMETER_DESC));
+#else
+ desc = Marshal.PtrToStructure(descPtr);
+#endif // (UNITY_2017_4_OR_NEWER) && !NET_4_6
+ return result;
+ }
+ public RESULT getDataParameterIndex(int datatype, out int index)
+ {
+ return FMOD5_DSP_GetDataParameterIndex(this.handle, datatype, out index);
+ }
+ public RESULT showConfigDialog(IntPtr hwnd, bool show)
+ {
+ return FMOD5_DSP_ShowConfigDialog(this.handle, hwnd, show);
+ }
+
+ // DSP attributes.
+ public RESULT getInfo(out string name, out uint version, out int channels, out int configwidth, out int configheight)
+ {
+ IntPtr nameMem = Marshal.AllocHGlobal(32);
+
+ RESULT result = FMOD5_DSP_GetInfo(this.handle, nameMem, out version, out channels, out configwidth, out configheight);
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ name = encoder.stringFromNative(nameMem);
+ }
+ Marshal.FreeHGlobal(nameMem);
+ return result;
+ }
+ public RESULT getInfo(out uint version, out int channels, out int configwidth, out int configheight)
+ {
+ return FMOD5_DSP_GetInfo(this.handle, IntPtr.Zero, out version, out channels, out configwidth, out configheight); ;
+ }
+ public RESULT getType(out DSP_TYPE type)
+ {
+ return FMOD5_DSP_GetType(this.handle, out type);
+ }
+ public RESULT getIdle(out bool idle)
+ {
+ return FMOD5_DSP_GetIdle(this.handle, out idle);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_DSP_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_DSP_GetUserData(this.handle, out userdata);
+ }
+
+ // Metering.
+ public RESULT setMeteringEnabled(bool inputEnabled, bool outputEnabled)
+ {
+ return FMOD5_DSP_SetMeteringEnabled(this.handle, inputEnabled, outputEnabled);
+ }
+ public RESULT getMeteringEnabled(out bool inputEnabled, out bool outputEnabled)
+ {
+ return FMOD5_DSP_GetMeteringEnabled(this.handle, out inputEnabled, out outputEnabled);
+ }
+
+ public RESULT getMeteringInfo(IntPtr zero, out DSP_METERING_INFO outputInfo)
+ {
+ return FMOD5_DSP_GetMeteringInfo(this.handle, zero, out outputInfo);
+ }
+ public RESULT getMeteringInfo(out DSP_METERING_INFO inputInfo, IntPtr zero)
+ {
+ return FMOD5_DSP_GetMeteringInfo(this.handle, out inputInfo, zero);
+ }
+ public RESULT getMeteringInfo(out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo)
+ {
+ return FMOD5_DSP_GetMeteringInfo(this.handle, out inputInfo, out outputInfo);
+ }
+
+ public RESULT getCPUUsage(out uint exclusive, out uint inclusive)
+ {
+ return FMOD5_DSP_GetCPUUsage(this.handle, out exclusive, out inclusive);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_Release(IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetSystemObject(IntPtr dsp, out IntPtr system);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_AddInput(IntPtr dsp, IntPtr input, IntPtr zero, DSPCONNECTION_TYPE type);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_AddInput(IntPtr dsp, IntPtr input, out IntPtr connection, DSPCONNECTION_TYPE type);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_DisconnectFrom(IntPtr dsp, IntPtr target, IntPtr connection);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_DisconnectAll(IntPtr dsp, bool inputs, bool outputs);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetNumInputs(IntPtr dsp, out int numinputs);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetNumOutputs(IntPtr dsp, out int numoutputs);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetInput(IntPtr dsp, int index, out IntPtr input, out IntPtr inputconnection);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetOutput(IntPtr dsp, int index, out IntPtr output, out IntPtr outputconnection);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetActive(IntPtr dsp, bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetActive(IntPtr dsp, out bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetBypass(IntPtr dsp, bool bypass);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetBypass(IntPtr dsp, out bool bypass);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetWetDryMix(IntPtr dsp, float prewet, float postwet, float dry);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetWetDryMix(IntPtr dsp, out float prewet, out float postwet, out float dry);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetChannelFormat(IntPtr dsp, CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetChannelFormat(IntPtr dsp, out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetOutputChannelFormat(IntPtr dsp, CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_Reset(IntPtr dsp);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetParameterFloat(IntPtr dsp, int index, float value);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetParameterInt(IntPtr dsp, int index, int value);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetParameterBool(IntPtr dsp, int index, bool value);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetParameterData(IntPtr dsp, int index, IntPtr data, uint length);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetParameterFloat(IntPtr dsp, int index, out float value, IntPtr valuestr, int valuestrlen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetParameterInt(IntPtr dsp, int index, out int value, IntPtr valuestr, int valuestrlen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetParameterBool(IntPtr dsp, int index, out bool value, IntPtr valuestr, int valuestrlen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetParameterData(IntPtr dsp, int index, out IntPtr data, out uint length, IntPtr valuestr, int valuestrlen);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetNumParameters(IntPtr dsp, out int numparams);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetParameterInfo(IntPtr dsp, int index, out IntPtr desc);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetDataParameterIndex(IntPtr dsp, int datatype, out int index);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_ShowConfigDialog(IntPtr dsp, IntPtr hwnd, bool show);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetInfo(IntPtr dsp, IntPtr name, out uint version, out int channels, out int configwidth, out int configheight);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetType(IntPtr dsp, out DSP_TYPE type);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetIdle(IntPtr dsp, out bool idle);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_SetUserData(IntPtr dsp, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSP_GetUserData(IntPtr dsp, out IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_SetMeteringEnabled(IntPtr dsp, bool inputEnabled, bool outputEnabled);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_GetMeteringEnabled(IntPtr dsp, out bool inputEnabled, out bool outputEnabled);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, IntPtr zero, out DSP_METERING_INFO outputInfo);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, out DSP_METERING_INFO inputInfo, IntPtr zero);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_GetMeteringInfo(IntPtr dsp, out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo);
+ [DllImport(VERSION.dll)]
+ public static extern RESULT FMOD5_DSP_GetCPUUsage(IntPtr dsp, out uint exclusive, out uint inclusive);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'DSPConnection' API
+ */
+ public struct DSPConnection
+ {
+ public RESULT getInput(out DSP input)
+ {
+ return FMOD5_DSPConnection_GetInput(this.handle, out input.handle);
+ }
+ public RESULT getOutput(out DSP output)
+ {
+ return FMOD5_DSPConnection_GetOutput(this.handle, out output.handle);
+ }
+ public RESULT setMix(float volume)
+ {
+ return FMOD5_DSPConnection_SetMix(this.handle, volume);
+ }
+ public RESULT getMix(out float volume)
+ {
+ return FMOD5_DSPConnection_GetMix(this.handle, out volume);
+ }
+ public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop = 0)
+ {
+ return FMOD5_DSPConnection_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
+ }
+ public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop = 0)
+ {
+ return FMOD5_DSPConnection_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
+ }
+ public RESULT getType(out DSPCONNECTION_TYPE type)
+ {
+ return FMOD5_DSPConnection_GetType(this.handle, out type);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_DSPConnection_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_DSPConnection_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetInput(IntPtr dspconnection, out IntPtr input);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetOutput(IntPtr dspconnection, out IntPtr output);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_SetMix(IntPtr dspconnection, float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetMix(IntPtr dspconnection, out float volume);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_SetMixMatrix(IntPtr dspconnection, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetMixMatrix(IntPtr dspconnection, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetType(IntPtr dspconnection, out DSPCONNECTION_TYPE type);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_SetUserData(IntPtr dspconnection, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_DSPConnection_GetUserData(IntPtr dspconnection, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'Geometry' API
+ */
+ public struct Geometry
+ {
+ public RESULT release()
+ {
+ return FMOD5_Geometry_Release(this.handle);
+ }
+
+ // Polygon manipulation.
+ public RESULT addPolygon(float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex)
+ {
+ return FMOD5_Geometry_AddPolygon(this.handle, directocclusion, reverbocclusion, doublesided, numvertices, vertices, out polygonindex);
+ }
+ public RESULT getNumPolygons(out int numpolygons)
+ {
+ return FMOD5_Geometry_GetNumPolygons(this.handle, out numpolygons);
+ }
+ public RESULT getMaxPolygons(out int maxpolygons, out int maxvertices)
+ {
+ return FMOD5_Geometry_GetMaxPolygons(this.handle, out maxpolygons, out maxvertices);
+ }
+ public RESULT getPolygonNumVertices(int index, out int numvertices)
+ {
+ return FMOD5_Geometry_GetPolygonNumVertices(this.handle, index, out numvertices);
+ }
+ public RESULT setPolygonVertex(int index, int vertexindex, ref VECTOR vertex)
+ {
+ return FMOD5_Geometry_SetPolygonVertex(this.handle, index, vertexindex, ref vertex);
+ }
+ public RESULT getPolygonVertex(int index, int vertexindex, out VECTOR vertex)
+ {
+ return FMOD5_Geometry_GetPolygonVertex(this.handle, index, vertexindex, out vertex);
+ }
+ public RESULT setPolygonAttributes(int index, float directocclusion, float reverbocclusion, bool doublesided)
+ {
+ return FMOD5_Geometry_SetPolygonAttributes(this.handle, index, directocclusion, reverbocclusion, doublesided);
+ }
+ public RESULT getPolygonAttributes(int index, out float directocclusion, out float reverbocclusion, out bool doublesided)
+ {
+ return FMOD5_Geometry_GetPolygonAttributes(this.handle, index, out directocclusion, out reverbocclusion, out doublesided);
+ }
+
+ // Object manipulation.
+ public RESULT setActive(bool active)
+ {
+ return FMOD5_Geometry_SetActive(this.handle, active);
+ }
+ public RESULT getActive(out bool active)
+ {
+ return FMOD5_Geometry_GetActive(this.handle, out active);
+ }
+ public RESULT setRotation(ref VECTOR forward, ref VECTOR up)
+ {
+ return FMOD5_Geometry_SetRotation(this.handle, ref forward, ref up);
+ }
+ public RESULT getRotation(out VECTOR forward, out VECTOR up)
+ {
+ return FMOD5_Geometry_GetRotation(this.handle, out forward, out up);
+ }
+ public RESULT setPosition(ref VECTOR position)
+ {
+ return FMOD5_Geometry_SetPosition(this.handle, ref position);
+ }
+ public RESULT getPosition(out VECTOR position)
+ {
+ return FMOD5_Geometry_GetPosition(this.handle, out position);
+ }
+ public RESULT setScale(ref VECTOR scale)
+ {
+ return FMOD5_Geometry_SetScale(this.handle, ref scale);
+ }
+ public RESULT getScale(out VECTOR scale)
+ {
+ return FMOD5_Geometry_GetScale(this.handle, out scale);
+ }
+ public RESULT save(IntPtr data, out int datasize)
+ {
+ return FMOD5_Geometry_Save(this.handle, data, out datasize);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_Geometry_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_Geometry_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_Release(IntPtr geometry);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_AddPolygon(IntPtr geometry, float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetNumPolygons(IntPtr geometry, out int numpolygons);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetMaxPolygons(IntPtr geometry, out int maxpolygons, out int maxvertices);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetPolygonNumVertices(IntPtr geometry, int index, out int numvertices);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetPolygonVertex(IntPtr geometry, int index, int vertexindex, ref VECTOR vertex);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetPolygonVertex(IntPtr geometry, int index, int vertexindex, out VECTOR vertex);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetPolygonAttributes(IntPtr geometry, int index, float directocclusion, float reverbocclusion, bool doublesided);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetPolygonAttributes(IntPtr geometry, int index, out float directocclusion, out float reverbocclusion, out bool doublesided);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetActive(IntPtr geometry, bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetActive(IntPtr geometry, out bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetRotation(IntPtr geometry, ref VECTOR forward, ref VECTOR up);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetRotation(IntPtr geometry, out VECTOR forward, out VECTOR up);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetPosition(IntPtr geometry, ref VECTOR position);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetPosition(IntPtr geometry, out VECTOR position);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetScale(IntPtr geometry, ref VECTOR scale);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetScale(IntPtr geometry, out VECTOR scale);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_Save(IntPtr geometry, IntPtr data, out int datasize);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_SetUserData(IntPtr geometry, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Geometry_GetUserData(IntPtr geometry, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ /*
+ 'Reverb3D' API
+ */
+ public struct Reverb3D
+ {
+ public RESULT release()
+ {
+ return FMOD5_Reverb3D_Release(this.handle);
+ }
+
+ // Reverb manipulation.
+ public RESULT set3DAttributes(ref VECTOR position, float mindistance, float maxdistance)
+ {
+ return FMOD5_Reverb3D_Set3DAttributes(this.handle, ref position, mindistance, maxdistance);
+ }
+ public RESULT get3DAttributes(ref VECTOR position, ref float mindistance, ref float maxdistance)
+ {
+ return FMOD5_Reverb3D_Get3DAttributes(this.handle, ref position, ref mindistance, ref maxdistance);
+ }
+ public RESULT setProperties(ref REVERB_PROPERTIES properties)
+ {
+ return FMOD5_Reverb3D_SetProperties(this.handle, ref properties);
+ }
+ public RESULT getProperties(ref REVERB_PROPERTIES properties)
+ {
+ return FMOD5_Reverb3D_GetProperties(this.handle, ref properties);
+ }
+ public RESULT setActive(bool active)
+ {
+ return FMOD5_Reverb3D_SetActive(this.handle, active);
+ }
+ public RESULT getActive(out bool active)
+ {
+ return FMOD5_Reverb3D_GetActive(this.handle, out active);
+ }
+
+ // Userdata set/get.
+ public RESULT setUserData(IntPtr userdata)
+ {
+ return FMOD5_Reverb3D_SetUserData(this.handle, userdata);
+ }
+ public RESULT getUserData(out IntPtr userdata)
+ {
+ return FMOD5_Reverb3D_GetUserData(this.handle, out userdata);
+ }
+
+ #region importfunctions
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_Release(IntPtr reverb3d);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_Set3DAttributes(IntPtr reverb3d, ref VECTOR position, float mindistance, float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_Get3DAttributes(IntPtr reverb3d, ref VECTOR position, ref float mindistance, ref float maxdistance);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_SetProperties(IntPtr reverb3d, ref REVERB_PROPERTIES properties);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_GetProperties(IntPtr reverb3d, ref REVERB_PROPERTIES properties);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_SetActive(IntPtr reverb3d, bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_GetActive(IntPtr reverb3d, out bool active);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_SetUserData(IntPtr reverb3d, IntPtr userdata);
+ [DllImport(VERSION.dll)]
+ private static extern RESULT FMOD5_Reverb3D_GetUserData(IntPtr reverb3d, out IntPtr userdata);
+ #endregion
+
+ #region wrapperinternal
+
+ public IntPtr handle;
+
+ public bool hasHandle() { return this.handle != IntPtr.Zero; }
+ public void clearHandle() { this.handle = IntPtr.Zero; }
+
+ #endregion
+ }
+
+ #region String Helper Functions
+ [StructLayout(LayoutKind.Sequential)]
+ public struct StringWrapper
+ {
+ IntPtr nativeUtf8Ptr;
+
+ public static implicit operator string(StringWrapper fstring)
+ {
+ using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
+ {
+ return encoder.stringFromNative(fstring.nativeUtf8Ptr);
+ }
+ }
+ }
+
+ static class StringHelper
+ {
+ public class ThreadSafeEncoding : IDisposable
+ {
+ UTF8Encoding encoding = new UTF8Encoding();
+ byte[] encodedBuffer = new byte[128];
+ char[] decodedBuffer = new char[128];
+ bool inUse;
+ GCHandle gcHandle;
+
+ public bool InUse() { return inUse; }
+ public void SetInUse() { inUse = true; }
+
+ private int roundUpPowerTwo(int number)
+ {
+ int newNumber = 1;
+ while (newNumber <= number)
+ {
+ newNumber *= 2;
+ }
+
+ return newNumber;
+ }
+
+ public byte[] byteFromStringUTF8(string s)
+ {
+ if (s == null)
+ {
+ return null;
+ }
+
+ int maximumLength = encoding.GetMaxByteCount(s.Length) + 1; // +1 for null terminator
+ if (maximumLength > encodedBuffer.Length)
+ {
+ int encodedLength = encoding.GetByteCount(s) + 1; // +1 for null terminator
+ if (encodedLength > encodedBuffer.Length)
+ {
+ encodedBuffer = new byte[roundUpPowerTwo(encodedLength)];
+ }
+ }
+
+ int byteCount = encoding.GetBytes(s, 0, s.Length, encodedBuffer, 0);
+ encodedBuffer[byteCount] = 0; // Apply null terminator
+
+ return encodedBuffer;
+ }
+
+ public IntPtr intptrFromStringUTF8(string s)
+ {
+ if (s == null)
+ {
+ return IntPtr.Zero;
+ }
+
+ gcHandle = GCHandle.Alloc(byteFromStringUTF8(s), GCHandleType.Pinned);
+ return gcHandle.AddrOfPinnedObject();
+ }
+
+ public string stringFromNative(IntPtr nativePtr)
+ {
+ if (nativePtr == IntPtr.Zero)
+ {
+ return "";
+ }
+
+ int nativeLen = 0;
+ while (Marshal.ReadByte(nativePtr, nativeLen) != 0)
+ {
+ nativeLen++;
+ }
+
+ if (nativeLen == 0)
+ {
+ return "";
+ }
+
+ if (nativeLen > encodedBuffer.Length)
+ {
+ encodedBuffer = new byte[roundUpPowerTwo(nativeLen)];
+ }
+
+ Marshal.Copy(nativePtr, encodedBuffer, 0, nativeLen);
+
+ int maximumLength = encoding.GetMaxCharCount(nativeLen);
+ if (maximumLength > decodedBuffer.Length)
+ {
+ int decodedLength = encoding.GetCharCount(encodedBuffer, 0, nativeLen);
+ if (decodedLength > decodedBuffer.Length)
+ {
+ decodedBuffer = new char[roundUpPowerTwo(decodedLength)];
+ }
+ }
+
+ int charCount = encoding.GetChars(encodedBuffer, 0, nativeLen, decodedBuffer, 0);
+
+ return new String(decodedBuffer, 0, charCount);
+ }
+
+ public void Dispose()
+ {
+ if (gcHandle.IsAllocated)
+ {
+ gcHandle.Free();
+ }
+ lock (encoders)
+ {
+ inUse = false;
+ }
+ }
+ }
+
+ static List encoders = new List(1);
+
+ public static ThreadSafeEncoding GetFreeHelper()
+ {
+ lock (encoders)
+ {
+ ThreadSafeEncoding helper = null;
+ // Search for not in use helper
+ for (int i = 0; i < encoders.Count; i++)
+ {
+ if (!encoders[i].InUse())
+ {
+ helper = encoders[i];
+ break;
+ }
+ }
+ // Otherwise create another helper
+ if (helper == null)
+ {
+ helper = new ThreadSafeEncoding();
+ encoders.Add(helper);
+ }
+ helper.SetInUse();
+ return helper;
+ }
+ }
+ }
+
+ #endregion
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod_dsp.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod_dsp.cs
similarity index 91%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod_dsp.cs
rename to ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod_dsp.cs
index 19c6b6e..80f526c 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod_dsp.cs
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMOD/fmod_dsp.cs
@@ -10,9 +10,6 @@
/* https://fmod.com/resources/documentation-api?version=2.0&page=plugin-api-dsp.html */
/* =========================================================================================*/
-// Disabling XML docs warnings.
-#pragma warning disable 1591
-
using System;
using System.Text;
using System.Runtime.InteropServices;
@@ -276,7 +273,7 @@ public struct DSP_PARAMETER_FFT
[MarshalAs(UnmanagedType.ByValArray,SizeConst=32)]
private IntPtr[] spectrum_internal; /* [r] Per channel spectrum arrays. See remarks for more. */
-
+
public float[][] spectrum
{
get
@@ -292,6 +289,21 @@ public float[][] spectrum
return buffer;
}
}
+
+ public void getSpectrum(ref float[][] buffer)
+ {
+ int bufferLength = Math.Min(buffer.Length, numchannels);
+ for (int i = 0; i < bufferLength; ++i)
+ {
+ getSpectrum(i, ref buffer[i]);
+ }
+ }
+
+ public void getSpectrum(int channel, ref float[] buffer)
+ {
+ int bufferLength = Math.Min(buffer.Length, length);
+ Marshal.Copy(spectrum_internal[channel], buffer, 0, bufferLength);
+ }
}
[StructLayout(LayoutKind.Sequential)]
@@ -724,13 +736,14 @@ public enum DSP_CONVOLUTION_REVERB : int
public enum DSP_CHANNELMIX_OUTPUT : int
{
- DEFAULT, /* Output channel count = input channel count. Mapping: See FMOD_SPEAKER enumeration. */
- ALLMONO, /* Output channel count = 1. Mapping: Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel all the way up to FMOD_MAX_CHANNEL_WIDTH channels are treated as if they were mono) */
- ALLSTEREO, /* Output channel count = 2. Mapping: Left, Right, Left, Right, Left, Right, ... (each pair of channels is treated as stereo all the way up to FMOD_MAX_CHANNEL_WIDTH channels) */
- ALLQUAD, /* Output channel count = 4. Mapping: Repeating pattern of Front Left, Front Right, Surround Left, Surround Right. */
- ALL5POINT1, /* Output channel count = 6. Mapping: Repeating pattern of Front Left, Front Right, Center, LFE, Surround Left, Surround Right. */
- ALL7POINT1, /* Output channel count = 8. Mapping: Repeating pattern of Front Left, Front Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right. */
- ALLLFE /* Output channel count = 6. Mapping: Repeating pattern of LFE in a 5.1 output signal. */
+ DEFAULT, /* Output channel count = input channel count. Mapping: See FMOD_SPEAKER enumeration. */
+ ALLMONO, /* Output channel count = 1. Mapping: Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel all the way up to FMOD_MAX_CHANNEL_WIDTH channels are treated as if they were mono) */
+ ALLSTEREO, /* Output channel count = 2. Mapping: Left, Right, Left, Right, Left, Right, ... (each pair of channels is treated as stereo all the way up to FMOD_MAX_CHANNEL_WIDTH channels) */
+ ALLQUAD, /* Output channel count = 4. Mapping: Repeating pattern of Front Left, Front Right, Surround Left, Surround Right. */
+ ALL5POINT1, /* Output channel count = 6. Mapping: Repeating pattern of Front Left, Front Right, Center, LFE, Surround Left, Surround Right. */
+ ALL7POINT1, /* Output channel count = 8. Mapping: Repeating pattern of Front Left, Front Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right. */
+ ALLLFE, /* Output channel count = 6. Mapping: Repeating pattern of LFE in a 5.1 output signal. */
+ ALL7POINT1POINT4 /* Output channel count = 12. Mapping: Repeating pattern of Front Left, Front Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right, Top Front Left, Top Front Right, Top Back Left, Top Back Right. */
}
public enum DSP_CHANNELMIX : int
@@ -767,7 +780,39 @@ public enum DSP_CHANNELMIX : int
GAIN_CH28, /* (Type:float) - Channel #28 gain in dB. -80.0 to 10.0. Default = 0. */
GAIN_CH29, /* (Type:float) - Channel #29 gain in dB. -80.0 to 10.0. Default = 0. */
GAIN_CH30, /* (Type:float) - Channel #30 gain in dB. -80.0 to 10.0. Default = 0. */
- GAIN_CH31 /* (Type:float) - Channel #31 gain in dB. -80.0 to 10.0. Default = 0. */
+ GAIN_CH31, /* (Type:float) - Channel #31 gain in dB. -80.0 to 10.0. Default = 0. */
+ OUTPUT_CH0, /* (Type:int) - Input channel #0 Output channel. 0 to 31. Default = 0. */
+ OUTPUT_CH1, /* (Type:int) - Input channel #1 Output channel. 0 to 31. Default = 1. */
+ OUTPUT_CH2, /* (Type:int) - Input channel #2 Output channel. 0 to 31. Default = 2. */
+ OUTPUT_CH3, /* (Type:int) - Input channel #3 Output channel. 0 to 31. Default = 3. */
+ OUTPUT_CH4, /* (Type:int) - Input channel #4 Output channel. 0 to 31. Default = 4. */
+ OUTPUT_CH5, /* (Type:int) - Input channel #5 Output channel. 0 to 31. Default = 5. */
+ OUTPUT_CH6, /* (Type:int) - Input channel #6 Output channel. 0 to 31. Default = 6. */
+ OUTPUT_CH7, /* (Type:int) - Input channel #7 Output channel. 0 to 31. Default = 7. */
+ OUTPUT_CH8, /* (Type:int) - Input channel #8 Output channel. 0 to 31. Default = 8. */
+ OUTPUT_CH9, /* (Type:int) - Input channel #9 Output channel. 0 to 31. Default = 9. */
+ OUTPUT_CH10, /* (Type:int) - Input channel #10 Output channel. 0 to 31. Default = 10. */
+ OUTPUT_CH11, /* (Type:int) - Input channel #11 Output channel. 0 to 31. Default = 11. */
+ OUTPUT_CH12, /* (Type:int) - Input channel #12 Output channel. 0 to 31. Default = 12. */
+ OUTPUT_CH13, /* (Type:int) - Input channel #13 Output channel. 0 to 31. Default = 13. */
+ OUTPUT_CH14, /* (Type:int) - Input channel #14 Output channel. 0 to 31. Default = 14. */
+ OUTPUT_CH15, /* (Type:int) - Input channel #15 Output channel. 0 to 31. Default = 15. */
+ OUTPUT_CH16, /* (Type:int) - Input channel #16 Output channel. 0 to 31. Default = 16. */
+ OUTPUT_CH17, /* (Type:int) - Input channel #17 Output channel. 0 to 31. Default = 17. */
+ OUTPUT_CH18, /* (Type:int) - Input channel #18 Output channel. 0 to 31. Default = 18. */
+ OUTPUT_CH19, /* (Type:int) - Input channel #19 Output channel. 0 to 31. Default = 19. */
+ OUTPUT_CH20, /* (Type:int) - Input channel #20 Output channel. 0 to 31. Default = 20. */
+ OUTPUT_CH21, /* (Type:int) - Input channel #21 Output channel. 0 to 31. Default = 21. */
+ OUTPUT_CH22, /* (Type:int) - Input channel #22 Output channel. 0 to 31. Default = 22. */
+ OUTPUT_CH23, /* (Type:int) - Input channel #23 Output channel. 0 to 31. Default = 23. */
+ OUTPUT_CH24, /* (Type:int) - Input channel #24 Output channel. 0 to 31. Default = 24. */
+ OUTPUT_CH25, /* (Type:int) - Input channel #25 Output channel. 0 to 31. Default = 25. */
+ OUTPUT_CH26, /* (Type:int) - Input channel #26 Output channel. 0 to 31. Default = 26. */
+ OUTPUT_CH27, /* (Type:int) - Input channel #27 Output channel. 0 to 31. Default = 27. */
+ OUTPUT_CH28, /* (Type:int) - Input channel #28 Output channel. 0 to 31. Default = 28. */
+ OUTPUT_CH29, /* (Type:int) - Input channel #29 Output channel. 0 to 31. Default = 29. */
+ OUTPUT_CH30, /* (Type:int) - Input channel #30 Output channel. 0 to 31. Default = 30. */
+ OUTPUT_CH31, /* (Type:int) - Input channel #31 Output channel. 0 to 31. Default = 31. */
}
public enum DSP_TRANSCEIVER_SPEAKERMODE : int
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMODManager.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMODManager.cs
new file mode 100644
index 0000000..c627ef3
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FMODManager.cs
@@ -0,0 +1,117 @@
+using ChaiFoxes.FMODAudio.Studio;
+using System;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public enum FMODMode
+ {
+ Core,
+ CoreAndStudio
+ }
+
+ public static class FMODManager
+ {
+ ///
+ /// This is the FMOD version which was tested on this
+ /// version of the library. Other versions may work,
+ /// but this is not guaranteed.
+ /// Visit https://fmod.com/download
+ ///
+ public const string RecommendedNativeLibraryVersion = "2.00.08";
+
+ private static FMODMode _mode;
+
+ internal static bool _initialized { get; private set; } = false;
+
+ public static bool UsesStudio =>
+ _mode == FMODMode.CoreAndStudio;
+
+ ///
+ /// Initializes systems and loads the native libraries. Can only be called once.
+ ///
+ /// Executes before initialization, but after the native instance creation.
+ public static void Init(
+ FMODMode mode,
+ string rootDir,
+ int maxChannels = 256,
+ uint dspBufferLength = 4,
+ int dspBufferCount = 32,
+ FMOD.INITFLAGS coreInitFlags = FMOD.INITFLAGS.CHANNEL_LOWPASS | FMOD.INITFLAGS.CHANNEL_DISTANCEFILTER,
+ FMOD.Studio.INITFLAGS studioInitFlags = FMOD.Studio.INITFLAGS.NORMAL,
+ Action preInitAction = null
+ )
+ {
+ if (_initialized)
+ {
+ throw new Exception("Manager is already initialized!");
+ }
+ _initialized = true;
+ _mode = mode;
+
+ FileLoader.RootDirectory = rootDir;
+ NativeLibraryLoader.LoadNativeLibrary("fmod");
+
+ if (UsesStudio)
+ {
+ NativeLibraryLoader.LoadNativeLibrary("fmodstudio");
+
+ FMOD.Studio.System.create(out StudioSystem.Native);
+
+ StudioSystem.Native.getCoreSystem(out CoreSystem.Native);
+
+ preInitAction?.Invoke();
+
+ // This also will init core system.
+ StudioSystem.Native.initialize(maxChannels, studioInitFlags, coreInitFlags, (IntPtr)0);
+ }
+ else
+ {
+ FMOD.Factory.System_Create(out CoreSystem.Native);
+
+ preInitAction?.Invoke();
+
+ CoreSystem.Native.init(maxChannels, coreInitFlags, (IntPtr)0);
+ }
+
+ // Too high values will cause sound lag.
+ CoreSystem.Native.setDSPBufferSize(dspBufferLength, dspBufferCount);
+
+ }
+
+ public static void Update()
+ {
+ CheckInitialized();
+ if (UsesStudio)
+ {
+ // Studio update updates core system internally.
+ // 2020 design awards winner material right here.
+ StudioSystem.Native.update();
+ }
+ else
+ {
+ CoreSystem.Native.update();
+ }
+ }
+
+ public static void Unload()
+ {
+ CheckInitialized();
+ if (UsesStudio)
+ {
+ StudioSystem.Native.release();
+ }
+ else
+ {
+ CoreSystem.Native.release();
+ }
+ }
+
+ private static void CheckInitialized()
+ {
+ if (!_initialized)
+ {
+ throw new Exception("You need to call Init() before calling this method!");
+ }
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FileLoader.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FileLoader.cs
new file mode 100644
index 0000000..d06c2a5
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/FileLoader.cs
@@ -0,0 +1,37 @@
+using Microsoft.Xna.Framework;
+using System.IO;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public static class FileLoader
+ {
+ public static string RootDirectory = "";
+
+ ///
+ /// Loads file as a byte array.
+ ///
+ public static byte[] LoadFileAsBuffer(string path)
+ {
+ // NOTE: Use this method to load audio files from memory
+ // instead of built-in methods which load files directly.
+ // They will not work on some platforms.
+
+ // TitleContainer is cross-platform Monogame file loader.
+ var stream = TitleContainer.OpenStream(Path.Combine(RootDirectory, path));
+
+ // File is opened as a stream, so we need to read it to the end.
+ var buffer = new byte[16 * 1024];
+ byte[] bufferRes;
+ using (var ms = new MemoryStream())
+ {
+ int read;
+ while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
+ {
+ ms.Write(buffer, 0, read);
+ }
+ bufferRes = ms.ToArray();
+ }
+ return bufferRes;
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/I3DControl.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/I3DControl.cs
new file mode 100644
index 0000000..966be12
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/I3DControl.cs
@@ -0,0 +1,22 @@
+using Microsoft.Xna.Framework;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public interface I3DControl
+ {
+ ///
+ /// Sound's position in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ Vector3 Position3D { get; set; }
+
+ ///
+ /// Sound's velocity in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ Vector3 Velocity3D { get; set; }
+
+ float MinDistance3D { get; set; }
+ float MaxDistance3D { get; set; }
+
+ ConeSettings3D ConeSettings3D { get; set; }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/IChannelControl.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/IChannelControl.cs
new file mode 100644
index 0000000..e02ea5d
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/IChannelControl.cs
@@ -0,0 +1,32 @@
+using Microsoft.Xna.Framework;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public interface IChannelControl : I3DControl
+ {
+ // General control functionality for Channels and ChannelGroups.
+ void Stop();
+
+ bool Paused { get; set; }
+ float Volume { get; set; }
+ bool VolumeRamp { get; set; }
+ float Audibility { get; }
+ float Pitch { get; set; }
+ bool Mute { get; set; }
+ float LowpassGain { get; set; }
+ FMOD.MODE Mode { get; set; }
+ bool IsPlaying { get; }
+
+ // 3D functionality.
+
+ Vector3 ConeOrientation3D { get; set; }
+
+ Occlusion3D Occlusion3D { get; set; }
+
+ float Spread3D { get; set; }
+ float Level3D { get; set; }
+ float DopplerLevel3D { get; set; }
+
+ DistanceFilter3D DistanceFilter3D { get; set; }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Listener3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Listener3D.cs
new file mode 100644
index 0000000..c00ce84
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Listener3D.cs
@@ -0,0 +1,248 @@
+using System;
+using System.Collections.Generic;
+using ChaiFoxes.FMODAudio.Studio;
+using Microsoft.Xna.Framework;
+
+namespace ChaiFoxes.FMODAudio
+{
+ ///
+ /// Sound listener in 3D space. Listens to positioned 3D sounds.
+ ///
+ /// NOTE: Do not mess with low-level listeners if you're using those.
+ /// It *probably* should be fine, but you're doing that at your own risk.
+ ///
+ public class Listener3D
+ {
+ ///
+ /// List of all listeners. Used to keep track of indices.
+ ///
+ private static List _listeners = new List();
+
+ ///
+ /// Listener index. Used to communicate with low-level API.
+ ///
+ private int _index;
+
+ ///
+ /// Listener position in 3D space. Used for panning and attenuation
+ ///
+ public Vector3 Position3D
+ {
+ get
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ return p.ToVector3();
+ }
+ set
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ SetAttributes(value.ToFmodVector(), v, f, u);
+ }
+ }
+
+ ///
+ /// Listener velocity in 3D space. Used for doppler effect.
+ ///
+ public Vector3 Velocity3D
+ {
+ get
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ return v.ToVector3();
+ }
+ set
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ SetAttributes(p, value.ToFmodVector(), f, u);
+ }
+ }
+
+ ///
+ /// Forwards orientation, must be of unit length (1.0) and perpendicular to up.
+ /// UnitY by default.
+ ///
+ public Vector3 ForwardOrientation
+ {
+ get
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ return f.ToVector3();
+ }
+ set
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ SetAttributes(p, v, value.ToFmodVector(), u);
+ }
+ }
+
+ ///
+ /// Upwards orientation, must be of unit length (1.0) and perpendicular to forward.
+ /// UnitZ by default.
+ ///
+ public Vector3 UpOrientation
+ {
+ get
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ return u.ToVector3();
+ }
+ set
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ SetAttributes(p, v, f, value.ToFmodVector());
+ }
+ }
+
+ public Listener3D()
+ {
+ if (!FMODManager._initialized)
+ {
+ throw new Exception("You cannot create listeners before initializing FMODManager!");
+ }
+ _index = _listeners.Count;
+ _listeners.Add(this);
+ UpdateNumListeners();
+
+ SetAttributes(
+ Vector3.Zero,
+ Vector3.Zero,
+ Vector3.UnitY,
+ Vector3.UnitZ
+ );
+ }
+
+ ///
+ /// Destroys the listener.
+ ///
+ public void Destroy()
+ {
+ if (_index != _listeners.Count - 1)
+ {
+ // Listener's index is its only link to its low-level attributes.
+ // We don't have access to actual low-level listener objects -
+ // if they even exist - and have to resort to this.
+ // Basically, if user decides to destroy a listener from the middle of
+ // listener list, we take the very last listener and place it instead
+ // of the destoyed listener.
+
+ var last = _listeners[_listeners.Count - 1];
+
+ // Saving attribute.
+ last.GetAttributes(out FMOD.VECTOR position, out var velocity, out var forwardVector, out var upVector);
+ // Replacing index.
+ last._index = _index;
+ // Copying attributes over.
+ last.SetAttributes(position, velocity, forwardVector, upVector);
+
+ // Changing last element's place in listener list.
+ _listeners.RemoveAt(_listeners.Count - 1);
+ _listeners.Insert(last._index, last);
+ }
+
+ _listeners.Remove(this);
+ UpdateNumListeners();
+
+ _index = -1;
+ }
+
+ ///
+ /// Gets all listener attributes at once.
+ ///
+ public void GetAttributes(
+ out Vector3 position,
+ out Vector3 velocity,
+ out Vector3 forward,
+ out Vector3 up
+ )
+ {
+ GetAttributes(out FMOD.VECTOR p, out var v, out var f, out var u);
+ position = p.ToVector3();
+ velocity = v.ToVector3();
+ forward = f.ToVector3();
+ up = u.ToVector3();
+ }
+
+
+ ///
+ /// Sets all listener attributes at once.
+ ///
+ public void SetAttributes(
+ Vector3 position,
+ Vector3 velocity,
+ Vector3 forward,
+ Vector3 up
+ )
+ {
+ SetAttributes(
+ position.ToFmodVector(),
+ velocity.ToFmodVector(),
+ forward.ToFmodVector(),
+ up.ToFmodVector()
+ );
+ }
+
+
+ ///
+ /// Gets all listener attributes at once.
+ ///
+ private void GetAttributes(
+ out FMOD.VECTOR position,
+ out FMOD.VECTOR velocity,
+ out FMOD.VECTOR forward,
+ out FMOD.VECTOR up
+ )
+ {
+ if (FMODManager.UsesStudio)
+ {
+ StudioSystem.Native.getListenerAttributes(_index, out var attributes);
+
+ position = attributes.position;
+ velocity = attributes.velocity;
+ forward = attributes.forward;
+ up = attributes.up;
+ }
+ else
+ {
+ CoreSystem.Native.get3DListenerAttributes(
+ _index,
+ out position,
+ out velocity,
+ out forward,
+ out up
+ );
+ }
+ }
+
+
+ ///
+ /// Sets all listener attributes at once.
+ ///
+ private void SetAttributes(
+ FMOD.VECTOR position,
+ FMOD.VECTOR velocity,
+ FMOD.VECTOR forward,
+ FMOD.VECTOR up
+ )
+ {
+ CoreSystem.Native.set3DListenerAttributes(
+ _index,
+ ref position,
+ ref velocity,
+ ref forward,
+ ref up
+ );
+ }
+
+ private void UpdateNumListeners()
+ {
+ if (FMODManager.UsesStudio)
+ {
+ StudioSystem.Native.setNumListeners(_listeners.Count);
+ }
+ else
+ {
+ CoreSystem.Native.set3DNumListeners(_listeners.Count);
+ }
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Occlusion3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Occlusion3D.cs
new file mode 100644
index 0000000..a264e15
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Occlusion3D.cs
@@ -0,0 +1,9 @@
+
+namespace ChaiFoxes.FMODAudio
+{
+ public struct Occlusion3D
+ {
+ public float DirectOcclusion;
+ public float ReverbOcclusion;
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/PointerLinker.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/PointerLinker.cs
new file mode 100644
index 0000000..9a0e957
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/PointerLinker.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
+namespace ChaiFoxes.FMODAudio
+{
+ ///
+ /// Some native classes can return other native objects. Problem is, they
+ /// are returned without the wrapper. Native objects can store user data,
+ /// though. This is used to store unique indices, which point to actual
+ /// high-level objects. This class is used to link back to them using pointers.
+ ///
+ internal class PointerLinker where T : class
+ {
+ private readonly Dictionary _items = new Dictionary();
+
+ private ulong _currentIndex = 0;
+
+ public IntPtr Add(T item)
+ {
+ _items.Add(_currentIndex, item);
+
+ var ptr = Marshal.AllocHGlobal(Marshal.SizeOf(_currentIndex));
+ Marshal.StructureToPtr(_currentIndex, ptr, false);
+ _currentIndex += 1;
+
+ return ptr;
+ }
+
+ public T Get(IntPtr ptr)
+ {
+ try
+ {
+ var index = (ulong)Marshal.PtrToStructure(ptr, typeof(ulong));
+ return _items[index];
+ }
+ catch(Exception)
+ {
+ return null;
+ }
+ }
+
+ public void Remove(IntPtr ptr)
+ {
+ var index = (ulong)Marshal.PtrToStructure(ptr, typeof(ulong));
+ _items.Remove(index);
+ Marshal.FreeHGlobal(ptr);
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Sound.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Sound.cs
new file mode 100644
index 0000000..9af73df
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Sound.cs
@@ -0,0 +1,273 @@
+using Microsoft.Xna.Framework;
+using System;
+using System.Runtime.InteropServices;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio
+{
+ ///
+ /// Sound class. Can play sound with given attributes.
+ ///
+ public class Sound : I3DControl, IDisposable
+ {
+ public readonly FMOD.Sound Native;
+
+ ///
+ /// Contains all references to all sound objects.
+ ///
+ internal static readonly PointerLinker _linker = new PointerLinker();
+
+ ///
+ /// Tells if sound is looping.
+ ///
+ public bool Looping
+ {
+ get => (Loops == -1);
+ set
+ {
+ if (value)
+ {
+ Loops = -1;
+ }
+ else
+ {
+ Loops = 0;
+ }
+ }
+ }
+
+ ///
+ /// Amount of loops.
+ /// > 0 - Specific count.
+ /// 0 - No loops.
+ /// -1 - Infinite loops.
+ ///
+ public int Loops = 0;
+
+ ///
+ /// Sound pitch. Affects speed too.
+ /// 1 - Normal pitch.
+ /// More than 1 - Higher pitch.
+ /// Less than 1 - Lower pitch.
+ ///
+ public float Pitch = 1;
+
+ ///
+ /// Sound volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ ///
+ public float Volume = 1;
+
+ ///
+ /// Low pass filter. Makes sound muffled.
+ /// 1 - No filtering.
+ /// 0 - Full filtering.
+ ///
+ public float LowPass = 1;
+
+ ///
+ /// Sound mode.
+ ///
+ public FMOD.MODE Mode;
+ // For some reason, native getMode doesn't work. Disabled for now.
+ //{
+ // get
+ // {
+ // Native.getMode(out var mode);
+ // return mode;
+ // }
+ // set
+ // {
+ // Native.setMode(value);
+ // }
+ //}
+
+ ///
+ /// Sound's default channel group.
+ ///
+ public ChannelGroup ChannelGroup;
+
+ public SoundGroup SoundGroup
+ {
+ get
+ {
+ Native.getSoundGroup(out var sound);
+ sound.getUserData(out var ptr);
+ return SoundGroup._linker.Get(ptr);
+ }
+ set
+ {
+ Native.setSoundGroup(value.Native);
+ }
+ }
+
+ ///
+ /// If true, allows sound to be positioned in 3D space.
+ ///
+ public bool Is3D = false;
+
+ ///
+ /// Sound's position in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Position3D { get; set; } = Vector3.Zero;
+
+
+ ///
+ /// Sound's velocity in 3D space. Can be used only if 3D positioning is enabled.
+ ///
+ public Vector3 Velocity3D { get; set; } = Vector3.Zero;
+
+ ///
+ /// Distance from the source where attenuation begins.
+ ///
+ public float MinDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return minDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(value, MaxDistance3D);
+ }
+
+ ///
+ /// Distance from the source where attenuation ends.
+ ///
+ public float MaxDistance3D
+ {
+ get
+ {
+ Native.get3DMinMaxDistance(out var minDistance, out var maxDistance);
+ return maxDistance;
+ }
+ set =>
+ Native.set3DMinMaxDistance(MinDistance3D, value);
+ }
+
+ ///
+ /// Sound length in specified time units
+ ///
+ public uint Length
+ {
+ get
+ {
+ Native.getLength(out var length, LengthTimeunit);
+ return length;
+ }
+ }
+
+ public int LoopCount
+ {
+ get
+ {
+ Native.getLoopCount(out var loopCount);
+ return loopCount;
+ }
+ set
+ {
+ Native.setLoopCount(value);
+ }
+ }
+
+ public float DefaultFrequency
+ {
+ get
+ {
+ Native.getDefaults(out var frequency, out var priority);
+ return frequency;
+ }
+ set =>
+ Native.setDefaults(value, DefaultPriority);
+ }
+
+ public int DefaultPriority
+ {
+ get
+ {
+ Native.getDefaults(out var frequency, out var priority);
+ return priority;
+ }
+ set =>
+ Native.setDefaults(DefaultFrequency, value);
+ }
+
+ public ConeSettings3D ConeSettings3D
+ {
+ get
+ {
+ var cone = new ConeSettings3D();
+ Native.get3DConeSettings(out cone.InsideConeAngle, out cone.OutsideVolume, out cone.OutsideVolume);
+ return cone;
+ }
+ set =>
+ Native.set3DConeSettings(value.InsideConeAngle, value.OutsideConeAngle, value.OutsideVolume);
+ }
+
+
+ ///
+ /// Sound buffer. Used for streamed sounds, which point to this memory.
+ /// In other words, we need to just reference it somewhere to prevent
+ /// garbage collector from collecting it.
+ /// This memory is also pinned, so GC won't move it anywhere.
+ ///
+ /// If any unexpected crashes emerge, this is the first suspect.
+ ///
+ private byte[] _buffer;
+
+ ///
+ /// Buffer's handle.
+ ///
+ private GCHandle _bufferHandle;
+
+
+ internal Sound(FMOD.Sound sound, byte[] buffer, GCHandle bufferHandle)
+ : this(sound)
+ {
+ _buffer = buffer;
+ _bufferHandle = bufferHandle;
+ }
+
+ internal Sound(FMOD.Sound sound)
+ {
+ Native = sound;
+
+ Native.setUserData(_linker.Add(this));
+ }
+
+ public Channel Play(bool paused = false) =>
+ Play(ChannelGroup, paused);
+
+ public Channel Play(ChannelGroup group, bool paused = false)
+ {
+ FMOD.ChannelGroup nativeGroup = default;
+ if (group != null)
+ {
+ nativeGroup = group.Native;
+ }
+ CoreSystem.Native.playSound(Native, nativeGroup, paused, out FMOD.Channel fmodChannel);
+ return new Channel(this, fmodChannel);
+ }
+
+ ///
+ /// Unloads the sound and frees its handles.
+ ///
+ public void Dispose()
+ {
+ Native.getUserData(out var ptr);
+ _linker.Remove(ptr);
+
+ Native.release();
+ if (_buffer != null)
+ {
+ _bufferHandle.Free();
+ }
+ }
+
+ public FMOD.TIMEUNIT LengthTimeunit = FMOD.TIMEUNIT.MS;
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/SoundGroup.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/SoundGroup.cs
new file mode 100644
index 0000000..d2becc7
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/SoundGroup.cs
@@ -0,0 +1,107 @@
+using System;
+
+namespace ChaiFoxes.FMODAudio
+{
+ public class SoundGroup : IDisposable
+ {
+ public readonly FMOD.SoundGroup Native;
+
+ ///
+ /// Contains all references to all sound grorup objects.
+ ///
+ internal static readonly PointerLinker _linker = new PointerLinker();
+
+
+ public int MaxAudible
+ {
+ get
+ {
+ Native.getMaxAudible(out var audible);
+ return audible;
+ }
+ set =>
+ Native.setMaxAudible(value);
+ }
+
+ public FMOD.SOUNDGROUP_BEHAVIOR MaxAudibleBehavior
+ {
+ get
+ {
+ Native.getMaxAudibleBehavior(out var behavior);
+ return behavior;
+ }
+ set =>
+ Native.setMaxAudibleBehavior(value);
+ }
+
+ public float MuteFadeSpeed
+ {
+ get
+ {
+ Native.getMuteFadeSpeed(out var mute);
+ return mute;
+ }
+ set =>
+ Native.setMuteFadeSpeed(value);
+ }
+
+ ///
+ /// Sound volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var volume);
+ return volume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ public int SoundsCount
+ {
+ get
+ {
+ Native.getNumSounds(out var count);
+ return count;
+ }
+ }
+
+ public int PlayingSoundsCount
+ {
+ get
+ {
+ Native.getNumPlaying(out var count);
+ return count;
+ }
+ }
+
+ public SoundGroup(string name)
+ {
+ CoreSystem.Native.createSoundGroup(name, out Native);
+ }
+
+ public void Stop() =>
+ Native.stop();
+
+ public Sound GetSound(int index)
+ {
+ Native.getSound(index, out var sound);
+ sound.getUserData(out var ptr);
+ return Sound._linker.Get(ptr);
+ }
+
+
+ public void Dispose()
+ {
+ Native.getUserData(out var ptr);
+ _linker.Remove(ptr);
+
+ Native.release();
+ }
+
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Attributes3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Attributes3D.cs
new file mode 100644
index 0000000..1e99f27
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Attributes3D.cs
@@ -0,0 +1,46 @@
+using Microsoft.Xna.Framework;
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ public struct Attributes3D
+ {
+ ///
+ /// Position in 3D space. Used for panning and attenuation.
+ ///
+ public Vector3 Position;
+
+ ///
+ /// Velocity in 3D space. Used for doppler effect.
+ ///
+ public Vector3 Velocity;
+
+ ///
+ /// Forwards orientation, must be of unit length (1.0) and perpendicular to up.
+ ///
+ public Vector3 ForwardVector;
+
+ ///
+ /// Upwards orientation, must be of unit length (1.0) and perpendicular to forward.
+ ///
+ public Vector3 UpVector;
+
+ internal Attributes3D(FMOD.ATTRIBUTES_3D attributes)
+ {
+ Position = attributes.position.ToVector3();
+ Velocity = attributes.velocity.ToVector3();
+ ForwardVector = attributes.forward.ToVector3();
+ UpVector = attributes.up.ToVector3();
+ }
+
+ public FMOD.ATTRIBUTES_3D ToFmodAttributes()
+ {
+ return new FMOD.ATTRIBUTES_3D
+ {
+ position = Position.ToFmodVector(),
+ velocity = Velocity.ToFmodVector(),
+ forward = ForwardVector.ToFmodVector(),
+ up = UpVector.ToFmodVector()
+ };
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bank.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bank.cs
new file mode 100644
index 0000000..4b05ae9
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bank.cs
@@ -0,0 +1,54 @@
+using System;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ ///
+ /// Bank class. Stores event metadata and sound data all in one file.
+ ///
+ public class Bank
+ {
+ public readonly FMOD.Studio.Bank Native;
+
+ ///
+ /// The bank's arbitrary user data.
+ ///
+ public IntPtr UserData
+ {
+ get
+ {
+ Native.getUserData(out IntPtr userData);
+ return userData;
+ }
+
+ set =>
+ Native.setUserData(value);
+ }
+
+ internal Bank(FMOD.Studio.Bank bank)
+ {
+ Native = bank;
+ }
+
+ ///
+ /// Loads all non-streaming sounds in the bank.
+ ///
+ public void LoadSampleData() =>
+ Native.loadSampleData();
+
+ ///
+ /// Unloads all non-streaming sounds in the bank.
+ ///
+ public void UnloadSampleData() =>
+ Native.unloadSampleData();
+
+ ///
+ /// Unloads the bank, invalidating all related event descriptions and destroying associated instances.
+ ///
+ public void Unload() =>
+ Native.unload();
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bus.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bus.cs
new file mode 100644
index 0000000..442cc25
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/Bus.cs
@@ -0,0 +1,146 @@
+using System;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ ///
+ /// Bus class.
+ /// Represents a global mixer bus within FMOD Studio.
+ ///
+ public class Bus
+ {
+ public readonly FMOD.Studio.Bus Native;
+
+ ///
+ /// Bus target volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// -1 - Inverted Signal.
+ /// This ignores modulation / automation applied to the volume within Studio.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var volume);
+ return volume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ ///
+ /// Bus current volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// -1 - Inverted Signal.
+ /// This takes into account modulation / automation applied to the volume within Studio.
+ ///
+ public float CurrentVolume
+ {
+ get
+ {
+ Native.getVolume(out _, out var finalVolume);
+ return finalVolume;
+ }
+ }
+
+ ///
+ /// Tells if the bus is muted.
+ /// Muting a bus will override its inputs,
+ /// but they will obey their individual mute states once it is unmuted.
+ ///
+ public bool Muted
+ {
+ get
+ {
+ Native.getMute(out var mute);
+ return mute;
+ }
+ set =>
+ Native.setMute(value);
+ }
+
+ ///
+ /// The bus' core channel group.
+ /// Please be aware that, by default, the channel group will be deleted when it isn't needed.
+ ///
+ public ChannelGroup ChannelGroup
+ {
+ get
+ {
+ Native.getChannelGroup(out var sound);
+ sound.getUserData(out var ptr);
+ return ChannelGroup._linker.Get(ptr);
+ }
+ }
+
+ ///
+ /// Tells if the bus is paused.
+ /// Pausing a bus will override its inputs,
+ /// but they will obey their individual playback states once it is unpaused.
+ ///
+ public bool Paused
+ {
+ get
+ {
+ Native.getPaused(out var paused);
+ return paused;
+ }
+
+ set =>
+ Native.setPaused(value);
+ }
+
+ ///
+ /// The Bus's internal path, i.e. "bus:/SFX/Ambience".
+ ///
+ public string Path
+ {
+ get
+ {
+ Native.getPath(out string path);
+ return path;
+ }
+ }
+
+ ///
+ /// The Bus's GUID.
+ ///
+ public Guid ID
+ {
+ get
+ {
+ Native.getID(out Guid id);
+ return id;
+ }
+ }
+
+ internal Bus(FMOD.Studio.Bus bus)
+ {
+ Native = bus;
+ }
+
+ ///
+ /// Forces FMOD to create the channel group if it doesn't exist yet,
+ /// as well as forcing it to stay loaded.
+ ///
+ public void LockChannelGroup() =>
+ Native.lockChannelGroup();
+
+ ///
+ /// Allows FMOD to destroy the channel group when it isn't needed.
+ ///
+ public void UnlockChannelGroup() =>
+ Native.unlockChannelGroup();
+
+ ///
+ /// Stop all events routed to the bus.
+ ///
+ public void StopAllEvents(bool immediate = false) =>
+ Native.stopAllEvents(immediate ? FMOD.Studio.STOP_MODE.IMMEDIATE : FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventDescription.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventDescription.cs
new file mode 100644
index 0000000..e8ba8e0
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventDescription.cs
@@ -0,0 +1,224 @@
+using Microsoft.Xna.Framework;
+using System;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ ///
+ /// Event description wrapper. Static reference to an event, which is then used to create event instances.
+ /// Can be retrieved from a bank by querying all events in a bank, or through a specific path / GUID.
+ ///
+ public class EventDescription
+ {
+ ///
+ /// FMOD event description using the default wrapper. Use this if you need full FMOD functionality.
+ ///
+ public readonly FMOD.Studio.EventDescription Native;
+
+ ///
+ /// Number of instances of the event currently in existence.
+ ///
+ public int InstanceCount
+ {
+ get
+ {
+ Native.getInstanceCount(out var instanceCount);
+ return instanceCount;
+ }
+ }
+
+ ///
+ /// All instances of the event currently in existence.
+ ///
+ public EventInstance[] Instances
+ {
+ get
+ {
+ Native.getInstanceList(out FMOD.Studio.EventInstance[] instanceArray);
+ var returnArray = new EventInstance[instanceArray.Length];
+ for (var i = 0; i < instanceArray.Length; i += 1)
+ {
+ returnArray[i] = new EventInstance(this, instanceArray[i]);
+ }
+ return returnArray;
+ }
+ }
+
+ ///
+ /// Sound pitch. Affects speed too.
+ /// 1 - Normal pitch.
+ /// More than 1 - Higher pitch.
+ /// Less than 1 - Lower pitch.
+ ///
+ public float Pitch = 1;
+
+ ///
+ /// Sound volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ ///
+ public float Volume = 1;
+
+ ///
+ /// Returns true if the event is 3D.
+ ///
+ public bool Is3D
+ {
+ get
+ {
+ Native.is3D(out var is3D);
+ return is3D;
+ }
+ }
+
+ ///
+ /// Event's 3D Attributes.
+ ///
+ public Attributes3D Attributes = new Attributes3D
+ {
+ Position = Vector3.Zero,
+ Velocity = Vector3.Zero,
+ ForwardVector = Vector3.UnitY,
+ UpVector = Vector3.UnitZ
+ };
+
+ public bool IsOneshot
+ {
+ get
+ {
+ Native.isOneshot(out var isOneshot);
+ return isOneshot;
+ }
+ }
+
+ ///
+ /// Returns true if the event is a snapshot.
+ ///
+ public bool IsSnapshot
+ {
+ get
+ {
+ Native.isSnapshot(out var isSnapshot);
+ return isSnapshot;
+ }
+ }
+
+ ///
+ /// Returns true if the event has any streamed sound.
+ ///
+ public bool IsStream
+ {
+ get
+ {
+ Native.isStream(out var isStream);
+ return isStream;
+ }
+ }
+
+ ///
+ /// Number of parameters in the event.
+ ///
+ public int ParameterCount
+ {
+ get
+ {
+ Native.getParameterDescriptionCount(out var count);
+ return count;
+ }
+ }
+
+ ///
+ /// The event description's internal path, i.e. "event:/UI/Cancel".
+ ///
+ public string Path
+ {
+ get
+ {
+ Native.getPath(out string path);
+ return path;
+ }
+ }
+
+ ///
+ /// The event description's GUID.
+ ///
+ public Guid ID
+ {
+ get
+ {
+ Native.getID(out Guid id);
+ return id;
+ }
+ }
+
+ internal EventDescription(FMOD.Studio.EventDescription eventDescription)
+ {
+ Native = eventDescription;
+ }
+
+ ///
+ /// Creates an instance of the event.
+ /// If the sample data hasn't already been loaded, this will automatically do it.
+ /// Loading sample data through this method requires a little time - make sure you don't want the event played immediately!
+ ///
+ public EventInstance CreateInstance()
+ {
+ Native.createInstance(out var eventInstance);
+ return new EventInstance(this, eventInstance);
+ }
+
+ ///
+ /// Immediately stops and releases all instances of this event.
+ ///
+ public void ReleaseAllInstances() =>
+ Native.releaseAllInstances();
+
+ ///
+ /// Gets an event parameter description by its name.
+ ///
+ public FMOD.Studio.PARAMETER_DESCRIPTION GetParameterDescription(string name)
+ {
+ Native.getParameterDescriptionByName(name, out var parameter);
+ return parameter;
+ }
+
+ ///
+ /// Gets an event parameter description by its index.
+ ///
+ public FMOD.Studio.PARAMETER_DESCRIPTION GetParameterDescription(int index)
+ {
+ Native.getParameterDescriptionByIndex(index, out var parameter);
+ return parameter;
+ }
+
+ ///
+ /// Gets an event parameter description by its ID.
+ ///
+ public FMOD.Studio.PARAMETER_DESCRIPTION GetParameterDescription(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterDescriptionByID(id, out var parameter);
+ return parameter;
+ }
+
+ ///
+ /// Assigns a user callback for every subsequent instance of this event.
+ ///
+ public void SetCallback(FMOD.Studio.EVENT_CALLBACK callback, FMOD.Studio.EVENT_CALLBACK_TYPE callbackMask) =>
+ Native.setCallback(callback, callbackMask);
+
+ ///
+ /// Loads all non-streaming sounds for the event.
+ ///
+ public void LoadSampleData() =>
+ Native.loadSampleData();
+
+ ///
+ /// Unloads all non-streaming sounds for the event.
+ ///
+ public void UnloadSampleData() =>
+ Native.unloadSampleData();
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventInstance.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventInstance.cs
new file mode 100644
index 0000000..622707b
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/EventInstance.cs
@@ -0,0 +1,228 @@
+using System;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ ///
+ /// Event instance wrapper.
+ /// An event can theoretically have any number of these, but only one event description.
+ ///
+ public class EventInstance : IDisposable
+ {
+ ///
+ /// FMOD event instance using the default wrapper. Use this if you need full FMOD functionality.
+ ///
+ public readonly FMOD.Studio.EventInstance Native;
+
+ ///
+ /// Event description, from which this instance was created.
+ ///
+ public readonly EventDescription Description;
+
+ ///
+ /// Event pitch. Affects speed too.
+ /// 1 - Normal pitch.
+ /// More than 1 - Higher pitch.
+ /// Less than 1 - Lower pitch.
+ ///
+ public float Pitch
+ {
+ get
+ {
+ Native.getPitch(out var pitch);
+ return pitch;
+ }
+ set =>
+ Native.setPitch(value);
+ }
+
+ ///
+ /// Event target volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// This ignores modulation / automation applied to the volume within Studio.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var targetVolume);
+ return targetVolume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ ///
+ /// Event current volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// This takes into account modulation / automation applied to the volume within Studio.
+ ///
+ public float CurrentVolume
+ {
+ get
+ {
+ Native.getVolume(out _, out var currentVolume);
+ return currentVolume;
+ }
+ }
+
+ ///
+ /// Retrieves whether or not the event is 3D.
+ ///
+ public bool Is3D => Description.Is3D;
+
+ ///
+ /// Event's 3D Attributes.
+ ///
+ public Attributes3D Attributes
+ {
+ get
+ {
+ Native.get3DAttributes(out FMOD.ATTRIBUTES_3D attributes);
+
+ return new Attributes3D(attributes);
+ }
+ set =>
+ Native.set3DAttributes(value.ToFmodAttributes());
+ }
+
+ ///
+ /// Timeline position in milliseconds.
+ ///
+ public int TimelinePosition
+ {
+ get
+ {
+ Native.getTimelinePosition(out var position);
+ return position;
+ }
+ set =>
+ Native.setTimelinePosition(value);
+ }
+
+ ///
+ /// This event instance's current playback state.
+ /// If the instance is invalid, this will default to PLAYBACK_STATE.STOPPED.
+ ///
+ public FMOD.Studio.PLAYBACK_STATE PlaybackState
+ {
+ get
+ {
+ Native.getPlaybackState(out FMOD.Studio.PLAYBACK_STATE state);
+ return state;
+ }
+ }
+
+ ///
+ /// Tells if the event is paused.
+ ///
+ public bool Paused
+ {
+ get
+ {
+ Native.getPaused(out var paused);
+ return paused;
+ } // TODO: Do the same on core sounds?
+
+ set =>
+ Native.setPaused(value);
+ }
+
+ internal EventInstance(EventDescription eventDescription, FMOD.Studio.EventInstance eventInstance)
+ {
+ Description = eventDescription;
+ Native = eventInstance;
+
+ Volume = eventDescription.Volume;
+ Pitch = eventDescription.Pitch;
+ Attributes = eventDescription.Attributes;
+ }
+
+ ///
+ /// Retrieves a parameter's current value via its name (case sensitive).
+ /// This ignores modulation / automation applied to the parameter within Studio.
+ ///
+ public float GetParameterTargetValue(string name)
+ {
+ Native.getParameterByName(name, out var value, out _);
+ return value;
+ }
+
+ ///
+ /// Retrieves a parameter's current value via its ID.
+ /// This ignores modulation / automation applied to the parameter within Studio.
+ ///
+ public float GetParameterTargetValue(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterByID(id, out var value, out _);
+ return value;
+ }
+
+ ///
+ /// Retrieves a parameter's current value via its name (case sensitive).
+ /// This takes into account modulation / automation applied to the parameter within Studio.
+ ///
+ public float GetParameterCurrentValue(string name)
+ {
+ Native.getParameterByName(name, out _, out var finalValue);
+ return finalValue;
+ }
+
+ ///
+ /// Retrieves a parameter's current value via its ID.
+ /// This takes into account modulation / automation applied to the parameter within Studio.
+ ///
+ public float GetParameterCurrentValue(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterByID(id, out _, out var finalValue);
+ return finalValue;
+ }
+
+ ///
+ /// Sets a parameter's value via its name (case sensitive).
+ /// Enable ignoreSeekSpeed to set the value instantly, ignoring the parameter's seek speed.
+ ///
+ public void SetParameterValue(string name, float value, bool ignoreSeekSpeed = false) =>
+ Native.setParameterByName(name, value, ignoreSeekSpeed);
+
+ ///
+ /// Sets a parameter's value via its ID.
+ /// Enable ignoreSeekSpeed to set the value instantly, ignoring the parameter's seek speed.
+ ///
+ public void SetParameterValue(FMOD.Studio.PARAMETER_ID id, float value, bool ignoreSeekSpeed = false) =>
+ Native.setParameterByID(id, value, ignoreSeekSpeed);
+
+ ///
+ /// Sets multiple parameters' values via their IDs.
+ /// Enable ignoreSeekSpeed to set the values instantly, ignoring the parameters' seek speeds.
+ ///
+ public void SetParameterValues(FMOD.Studio.PARAMETER_ID[] ids, float[] values, bool ignoreSeekSpeed = false) =>
+ Native.setParametersByIDs(ids, values, ids.Length, ignoreSeekSpeed);
+
+ ///
+ /// Assigns a user callback for this specific event instance.
+ ///
+ public void SetCallback(FMOD.Studio.EVENT_CALLBACK callback, FMOD.Studio.EVENT_CALLBACK_TYPE callbackMask) =>
+ Native.setCallback(callback, callbackMask);
+
+ public void Start() =>
+ Native.start();
+
+ public void Stop(bool immediate = false) =>
+ Native.stop(immediate ? FMOD.Studio.STOP_MODE.IMMEDIATE : FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
+
+ ///
+ /// Allows the timeline cursor to move past sustain points.
+ ///
+ public void TriggerCue() =>
+ Native.triggerCue();
+
+ public void Dispose() =>
+ Native.release();
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/StudioSystem.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/StudioSystem.cs
new file mode 100644
index 0000000..f70b38b
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/StudioSystem.cs
@@ -0,0 +1,171 @@
+using System;
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ public static class StudioSystem
+ {
+ ///
+ /// FMOD studio sound system.
+ ///
+ public static FMOD.Studio.System Native;
+
+ ///
+ /// Loads bank from file with the default flag.
+ ///
+ public static Bank LoadBank(string name) =>
+ LoadBank(name, FMOD.Studio.LOAD_BANK_FLAGS.NORMAL);
+
+ ///
+ /// Loads bank from file with custom flags.
+ ///
+ public static Bank LoadBank(string path, FMOD.Studio.LOAD_BANK_FLAGS flags)
+ {
+ Native.loadBankMemory(
+ FileLoader.LoadFileAsBuffer(path),
+ flags,
+ out FMOD.Studio.Bank bank
+ );
+
+ return new Bank(bank);
+ }
+
+ ///
+ /// Retrieves an event via internal path, i.e. "event:/UI/Cancel", or ID string, i.e. "{2a3e48e6-94fc-4363-9468-33d2dd4d7b00}".
+ ///
+ public static EventDescription GetEvent(string path)
+ {
+ Native.getEvent(path, out FMOD.Studio.EventDescription eventDescription);
+ return new EventDescription(eventDescription);
+ }
+
+ ///
+ /// Retrieves an event via 128-bit GUID.
+ /// To parse a GUID from a string id, i.e. "{2a3e48e6-94fc-4363-9468-33d2dd4d7b00}", use FMOD.Studio.Util.parseID().
+ ///
+ public static EventDescription GetEvent(Guid id)
+ {
+ Native.getEventByID(id, out FMOD.Studio.EventDescription eventDescription);
+ return new EventDescription(eventDescription);
+ }
+
+ ///
+ /// Retrieves a bus using path.
+ /// Path may be a path, such as bus:/SFX/Ambience, or an ID string, such as {d9982c58-a056-4e6c-b8e3-883854b4bffb}.
+ ///
+ public static Bus GetBus(string path)
+ {
+ Native.getBus(path, out var bus);
+ return new Bus(bus);
+ }
+
+ ///
+ /// Retrieves a bus via 128-bit GUID.
+ /// To parse a GUID from a string id, i.e. "{2a3e48e6-94fc-4363-9468-33d2dd4d7b00}", use FMOD.Studio.Util.parseID().
+ ///
+ public static Bus GetBusByID(Guid id)
+ {
+ Native.getBusByID(id, out var bus);
+ return new Bus(bus);
+ }
+
+
+ ///
+ /// Retrieves a VCA via internal path, i.e. "vca:/MyVCA", or ID string, i.e. "{d9982c58-a056-4e6c-b8e3-883854b4bffb}".
+ ///
+ public static VCA GetVCA(string path)
+ {
+ Native.getVCA(path, out var vca);
+ return new VCA(vca);
+ }
+
+ ///
+ /// Retrieves a VCA via 128-bit GUID.
+ /// To parse a GUID from a string id, i.e. "{d9982c58-a056-4e6c-b8e3-883854b4bffb}", use FMOD.Studio.Util.parseID().
+ ///
+ public static VCA GetVCA(Guid id)
+ {
+ Native.getVCAByID(id, out var vca);
+ return new VCA(vca);
+ }
+
+ ///
+ /// Retrieves a global parameter description by its name.
+ ///
+ public static FMOD.Studio.PARAMETER_DESCRIPTION GetParameterDescription(string name)
+ {
+ Native.getParameterDescriptionByName(name, out FMOD.Studio.PARAMETER_DESCRIPTION parameter);
+ return parameter;
+ }
+
+ ///
+ /// Retrieves a global parameter description by its ID.
+ ///
+ public static FMOD.Studio.PARAMETER_DESCRIPTION GetParameterDescription(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterDescriptionByID(id, out FMOD.Studio.PARAMETER_DESCRIPTION parameter);
+ return parameter;
+ }
+
+ ///
+ /// Retrieves a global parameter's current value via its name (case sensitive).
+ /// This ignores modulation / automation applied to the parameter within Studio.
+ ///
+ public static float GetParameterTargetValue(string name)
+ {
+ Native.getParameterByName(name, out var value, out _);
+ return value;
+ }
+
+ ///
+ /// Retrieves a global parameter's current value via its ID.
+ /// This ignores modulation / automation applied to the parameter within Studio.
+ ///
+ public static float GetParameterTargetValue(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterByID(id, out var value, out _);
+ return value;
+ }
+
+ ///
+ /// Retrieves a global parameter's current value via its name (case sensitive).
+ /// This takes into account modulation / automation applied to the parameter within Studio.
+ ///
+ public static float GetParameterCurrentValue(string name)
+ {
+ Native.getParameterByName(name, out _, out var finalValue);
+ return finalValue;
+ }
+
+ ///
+ /// Retrieves a global parameter's current value via its ID.
+ /// This takes into account modulation / automation applied to the parameter within Studio.
+ ///
+ public static float GetParameterCurrentValue(FMOD.Studio.PARAMETER_ID id)
+ {
+ Native.getParameterByID(id, out _, out var finalValue);
+ return finalValue;
+ }
+
+ ///
+ /// Sets a global parameter's value via its name (case sensitive).
+ /// Enable ignoreSeekSpeed to set the value instantly, ignoring the parameter's seek speed.
+ ///
+ public static void SetParameterValue(string name, float value, bool ignoreSeekSpeed = false) =>
+ Native.setParameterByName(name, value, ignoreSeekSpeed);
+
+ ///
+ /// Sets a global parameter's value via its ID.
+ /// Enable ignoreSeekSpeed to set the value instantly, ignoring the parameter's seek speed.
+ ///
+ public static void SetParameterValue(FMOD.Studio.PARAMETER_ID id, float value, bool ignoreSeekSpeed = false) =>
+ Native.setParameterByID(id, value, ignoreSeekSpeed);
+
+ ///
+ /// Sets multiple global parameters' values via their IDs.
+ /// Enable ignoreSeekSpeed to set the values instantly, ignoring the parameters' seek speeds.
+ ///
+ public static void SetParameterValues(FMOD.Studio.PARAMETER_ID[] ids, float[] values, bool ignoreSeekSpeed = false) =>
+ Native.setParametersByIDs(ids, values, ids.Length, ignoreSeekSpeed);
+
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/VCA.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/VCA.cs
new file mode 100644
index 0000000..ebdef6a
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/Studio/VCA.cs
@@ -0,0 +1,77 @@
+using System;
+
+// DO NOT include FMOD namespace in ANY of your classes.
+// Use FMOD.SomeClass instead.
+// FMOD classes seriously interfere with System namespace.
+
+namespace ChaiFoxes.FMODAudio.Studio
+{
+ ///
+ /// VCA class. Allows for grouping multiple buses together over different group buses, returns, and even events.
+ ///
+ public class VCA
+ {
+ public readonly FMOD.Studio.VCA Native;
+
+ ///
+ /// VCA target volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// This ignores modulation / automation applied to the volume within Studio.
+ ///
+ public float Volume
+ {
+ get
+ {
+ Native.getVolume(out var volume);
+ return volume;
+ }
+ set =>
+ Native.setVolume(value);
+ }
+
+ ///
+ /// VCA current volume.
+ /// 1 - Normal volume.
+ /// 0 - Muted.
+ /// This takes into account modulation / automation applied to the volume within Studio.
+ ///
+ public float CurrentVolume
+ {
+ get
+ {
+ Native.getVolume(out _, out var finalVolume);
+ return finalVolume;
+ }
+ }
+
+ ///
+ /// The VCA's internal path, i.e. "vca:/MyVCA".
+ ///
+ public string Path
+ {
+ get
+ {
+ Native.getPath(out string path);
+ return path;
+ }
+ }
+
+ ///
+ /// The VCA's GUID.
+ ///
+ public Guid ID
+ {
+ get
+ {
+ Native.getID(out Guid id);
+ return id;
+ }
+ }
+
+ internal VCA(FMOD.Studio.VCA vca)
+ {
+ Native = vca;
+ }
+ }
+}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/VectorExtensions.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/VectorExtensions.cs
similarity index 95%
rename from ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/VectorExtensions.cs
rename to ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/VectorExtensions.cs
index 7824251..2276103 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/VectorExtensions.cs
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/VectorExtensions.cs
@@ -19,7 +19,7 @@ public static FMOD.VECTOR ToFmodVector(this Vector3 v)
public static FMOD.VECTOR ToFmodVector(this Vector2 v)
{
- return new FMOD.VECTOR
+ return new FMOD.VECTOR
{
x = v.X,
y = v.Y,
@@ -45,6 +45,5 @@ public static Vector2 ToVector2(this FMOD.VECTOR v)
Y = v.y,
};
}
-
}
-}
+}
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/readme.txt b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/readme.txt
new file mode 100644
index 0000000..35fce40
--- /dev/null
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.Shared/readme.txt
@@ -0,0 +1,11 @@
+
+
+hi (:
+
+Thought you're done, eh?
+
+Before diving into the magical land of FMOD, you'll need to install native libraries.
+See the full guide at: https://github.com/Martenfur/ChaiFoxes.FMODAudio
+
+If you want to reference this nuget in your netstandard library, see the bait-and-switch
+section of the repository readme.
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.sln b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.sln
index d77b297..6266d4e 100644
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.sln
+++ b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio.sln
@@ -1,21 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28307.572
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Desktop", "ChaiFoxes.FMODAudio.Desktop\ChaiFoxes.FMODAudio.Desktop.csproj", "{F712BF21-58F9-448C-BEF5-286CEC991EBB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChaiFoxes.FMODAudio.Desktop", "ChaiFoxes.FMODAudio.Desktop\ChaiFoxes.FMODAudio.Desktop.csproj", "{F712BF21-58F9-448C-BEF5-286CEC991EBB}"
EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ChaiFoxes.FMODAudio", "ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.shproj", "{8D82E21D-B9EE-438B-A2CE-7B801BF712EA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChaiFoxes.FMODAudio.Android", "ChaiFoxes.FMODAudio.Android\ChaiFoxes.FMODAudio.Android.csproj", "{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Android", "ChaiFoxes.FMODAudio.Android\ChaiFoxes.FMODAudio.Android.csproj", "{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}"
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ChaiFoxes.FMODAudio.Shared", "ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.shproj", "{B5933BD7-E07E-4EB2-99BE-2814508425A1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChaiFoxes.FMODAudio.Android.Bindings", "ChaiFoxes.FMODAudio.Android.Bindings\ChaiFoxes.FMODAudio.Android.Bindings.csproj", "{2546D47C-EEA5-41D3-8906-B28A3B819889}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{94EF2A0B-5152-4AD0-8382-897432E2E7AE}"
+ ProjectSection(SolutionItems) = preProject
+ ..\.editorconfig = ..\.editorconfig
+ EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
- ChaiFoxes.FMODAudio\ChaiFoxes.FMOD.projitems*{08d5910f-1ca1-4a7e-a3f7-354ff1b03858}*SharedItemsImports = 4
- ChaiFoxes.FMODAudio\ChaiFoxes.FMOD.projitems*{8d82e21d-b9ee-438b-a2ce-7b801bf712ea}*SharedItemsImports = 13
- ChaiFoxes.FMODAudio\ChaiFoxes.FMOD.projitems*{f712bf21-58f9-448c-bef5-286cec991ebb}*SharedItemsImports = 4
+ ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{08d5910f-1ca1-4a7e-a3f7-354ff1b03858}*SharedItemsImports = 5
+ ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{b5933bd7-e07e-4eb2-99be-2814508425a1}*SharedItemsImports = 13
+ ChaiFoxes.FMODAudio.Shared\ChaiFoxes.FMODAudio.Shared.projitems*{f712bf21-58f9-448c-bef5-286cec991ebb}*SharedItemsImports = 5
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Android = Debug|Android
@@ -40,14 +43,6 @@ Global
{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|Android.Build.0 = Release|Any CPU
{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08D5910F-1CA1-4A7E-A3F7-354FF1B03858}.Release|Any CPU.Build.0 = Release|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Debug|Android.ActiveCfg = Debug|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Debug|Android.Build.0 = Debug|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Release|Android.ActiveCfg = Release|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Release|Android.Build.0 = Release|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2546D47C-EEA5-41D3-8906-B28A3B819889}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/AudioMgr.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/AudioMgr.cs
deleted file mode 100644
index 6be8be1..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/AudioMgr.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-using Microsoft.Xna.Framework;
-
-// DO NOT include FMOD namespace in ANY of your classes.
-// Use FMOD.SomeClass instead.
-// FMOD classes seriously interfere with System namespace.
-
-namespace ChaiFoxes.FMODAudio
-{
-
- ///
- /// Audio manager. Controls main audiosystem parameters.
- ///
- /// NOTE: My wrappers don't provide full FMOD functionality. For example,
- /// DSPs and advanced 3D stuff are largely left untouched. I may extend my audio
- /// classes to add new features. For now, you have to use FMOD classes directly.
- ///
- public static partial class AudioMgr
- {
- ///
- /// Low-level FMOD sound system.
- ///
- public static FMOD.System FMODSystem;
-
-
- ///
- /// Root directory for sounds and music.
- ///
- private static string _rootDir;
-
-
- ///
- /// Initializes FMOD with default parameters.
- ///
- /// If you want to use only the default wrapper, call
- /// LoadNativeLibrary() instead.
- ///
- public static void Init(string rootDir) =>
- Init(rootDir, 256, 4, 32, FMOD.INITFLAGS.CHANNEL_LOWPASS | FMOD.INITFLAGS.CHANNEL_DISTANCEFILTER);
-
- ///
- /// Initializes FMOD with custom parameters.
- ///
- /// If you want to use only the default wrapper, call
- /// LoadNativeLibrary() instead.
- ///
- public static void Init(
- string rootDir,
- uint dspBufferLength,
- int dspBufferCount,
- int maxChannels,
- FMOD.INITFLAGS initFlags
- )
- {
- _rootDir = rootDir;
- LoadNativeLibrary();
-
- FMOD.Factory.System_Create(out FMOD.System system);
- FMODSystem = system;
-
- // Too high values will cause sound lag.
- FMODSystem.setDSPBufferSize(dspBufferLength, dspBufferCount);
-
- FMODSystem.init(maxChannels, initFlags, (IntPtr)0);
- }
-
- public static void Update() =>
- FMODSystem.update();
-
- public static void Unload() =>
- FMODSystem.release();
-
-
- ///
- /// Creates new channel group with given name.
- ///
- public static FMOD.ChannelGroup CreateChannelGroup(string name)
- {
- FMODSystem.createChannelGroup(name, out FMOD.ChannelGroup group);
- return group;
- }
-
-
- ///
- /// Loads sound from file.
- /// Use this function to load short sound effects.
- ///
- public static Sound LoadSound(string name)
- {
- var buffer = LoadFileAsBuffer(Path.Combine(_rootDir, name));
-
- var info = new FMOD.CREATESOUNDEXINFO();
- info.length = (uint)buffer.Length;
- info.cbsize = Marshal.SizeOf(info);
-
- FMODSystem.createSound(
- buffer,
- FMOD.MODE.OPENMEMORY | FMOD.MODE.CREATESAMPLE,
- ref info,
- out FMOD.Sound newSound
- );
-
- return new Sound(newSound);
- }
-
- ///
- /// Loads streamed sound stream from file.
- /// Use this function to load music and long ambience tracks.
- ///
- public static Sound LoadStreamedSound(string name)
- {
-
- var buffer = LoadFileAsBuffer(Path.Combine(_rootDir, name));
-
- // Internal FMOD pointer points to this memory, so we don't want it to go anywhere.
- var handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-
- var info = new FMOD.CREATESOUNDEXINFO();
- info.length = (uint)buffer.Length;
- info.cbsize = Marshal.SizeOf(info);
-
- FMODSystem.createStream(
- buffer,
- FMOD.MODE.OPENMEMORY | FMOD.MODE.CREATESTREAM,
- ref info,
- out FMOD.Sound newSound
- );
-
- return new Sound(newSound, buffer, handle);
- }
-
-
-
- ///
- /// Loads file as a byte array.
- ///
- private static byte[] LoadFileAsBuffer(string path)
- {
- // TitleContainer is cross-platform Monogame file loader.
- var stream = TitleContainer.OpenStream(path);
-
- // File is opened as a stream, so we need to read it to the end.
- byte[] buffer = new byte[16*1024];
- byte[] bufferRes;
- using (MemoryStream ms = new MemoryStream())
- {
- int read;
- while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
- {
- ms.Write(buffer, 0, read);
- }
- bufferRes = ms.ToArray();
- }
-
- return bufferRes;
- }
-
- }
-}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMOD.projitems b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMOD.projitems
deleted file mode 100644
index 10d704b..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/ChaiFoxes.FMOD.projitems
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
- 8d82e21d-b9ee-438b-a2ce-7b801bf712ea
-
-
- ChaiFoxes.FMODAudio
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod.cs
deleted file mode 100644
index 35ff102..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/FMOD/fmod.cs
+++ /dev/null
@@ -1,3758 +0,0 @@
-/* ======================================================================================== */
-/* FMOD Core API - C# wrapper. */
-/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2019. */
-/* */
-/* For more detail visit: */
-/* https://fmod.com/resources/documentation-api?version=2.0&page=core-api.html */
-/* ======================================================================================== */
-
-// Disabling XML docs warnings.
-#pragma warning disable 1591
-
-using System;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
-
-namespace FMOD
-{
- /*
- FMOD version number. Check this against FMOD::System::getVersion / System_GetVersion
- 0xaaaabbcc -> aaaa = major version number. bb = minor version number. cc = development version number.
- */
- public class VERSION
- {
- public const int number = 0x00020000;
-
- // NOTE: This is the only modified part of the wrapper. Don't forget to copy it over when updating.
-
- #if ANDROID
- public const string dll = "libfmod"; // Android.
- #else
- public const string dll = "fmod.dll"; // Windows and Linux.
- #endif
- // NOTE: This is the only modified part of the wrapper. Don't forget to copy it over when updating.
- }
-
- public class CONSTANTS
- {
- public const int MAX_CHANNEL_WIDTH = 32;
- public const int MAX_LISTENERS = 8;
- public const int REVERB_MAXINSTANCES = 4;
- public const int MAX_SYSTEMS = 8;
- }
-
- /*
- FMOD types
- */
- public enum RESULT : int
- {
- OK, /* No errors. */
- ERR_BADCOMMAND, /* Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound). */
- ERR_CHANNEL_ALLOC, /* Error trying to allocate a channel. */
- ERR_CHANNEL_STOLEN, /* The specified channel has been reused to play another sound. */
- ERR_DMA, /* DMA Failure. See debug output for more information. */
- ERR_DSP_CONNECTION, /* DSP connection error. Connection possibly caused a cyclic dependency or connected dsps with incompatible buffer counts. */
- ERR_DSP_DONTPROCESS, /* DSP return code from a DSP process query callback. Tells mixer not to call the process callback and therefore not consume CPU. Use this to optimize the DSP graph. */
- ERR_DSP_FORMAT, /* DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format, or a matrix may have been set with the wrong size if the target unit has a specified channel map. */
- ERR_DSP_INUSE, /* DSP is already in the mixer's DSP network. It must be removed before being reinserted or released. */
- ERR_DSP_NOTFOUND, /* DSP connection error. Couldn't find the DSP unit specified. */
- ERR_DSP_RESERVED, /* DSP operation error. Cannot perform operation on this DSP as it is reserved by the system. */
- ERR_DSP_SILENCE, /* DSP return code from a DSP process query callback. Tells mixer silence would be produced from read, so go idle and not consume CPU. Use this to optimize the DSP graph. */
- ERR_DSP_TYPE, /* DSP operation cannot be performed on a DSP of this type. */
- ERR_FILE_BAD, /* Error loading file. */
- ERR_FILE_COULDNOTSEEK, /* Couldn't perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. */
- ERR_FILE_DISKEJECTED, /* Media was ejected while reading. */
- ERR_FILE_EOF, /* End of file unexpectedly reached while trying to read essential data (truncated?). */
- ERR_FILE_ENDOFDATA, /* End of current chunk reached while trying to read data. */
- ERR_FILE_NOTFOUND, /* File not found. */
- ERR_FORMAT, /* Unsupported file or audio format. */
- ERR_HEADER_MISMATCH, /* There is a version mismatch between the FMOD header and either the FMOD Studio library or the FMOD Low Level library. */
- ERR_HTTP, /* A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere. */
- ERR_HTTP_ACCESS, /* The specified resource requires authentication or is forbidden. */
- ERR_HTTP_PROXY_AUTH, /* Proxy authentication is required to access the specified resource. */
- ERR_HTTP_SERVER_ERROR, /* A HTTP server error occurred. */
- ERR_HTTP_TIMEOUT, /* The HTTP request timed out. */
- ERR_INITIALIZATION, /* FMOD was not initialized correctly to support this function. */
- ERR_INITIALIZED, /* Cannot call this command after System::init. */
- ERR_INTERNAL, /* An error occurred that wasn't supposed to. Contact support. */
- ERR_INVALID_FLOAT, /* Value passed in was a NaN, Inf or denormalized float. */
- ERR_INVALID_HANDLE, /* An invalid object handle was used. */
- ERR_INVALID_PARAM, /* An invalid parameter was passed to this function. */
- ERR_INVALID_POSITION, /* An invalid seek position was passed to this function. */
- ERR_INVALID_SPEAKER, /* An invalid speaker was passed to this function based on the current speaker mode. */
- ERR_INVALID_SYNCPOINT, /* The syncpoint did not come from this sound handle. */
- ERR_INVALID_THREAD, /* Tried to call a function on a thread that is not supported. */
- ERR_INVALID_VECTOR, /* The vectors passed in are not unit length, or perpendicular. */
- ERR_MAXAUDIBLE, /* Reached maximum audible playback count for this sound's soundgroup. */
- ERR_MEMORY, /* Not enough memory or resources. */
- ERR_MEMORY_CANTPOINT, /* Can't use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used. */
- ERR_NEEDS3D, /* Tried to call a command on a 2d sound when the command was meant for 3d sound. */
- ERR_NEEDSHARDWARE, /* Tried to use a feature that requires hardware support. */
- ERR_NET_CONNECT, /* Couldn't connect to the specified host. */
- ERR_NET_SOCKET_ERROR, /* A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere. */
- ERR_NET_URL, /* The specified URL couldn't be resolved. */
- ERR_NET_WOULD_BLOCK, /* Operation on a non-blocking socket could not complete immediately. */
- ERR_NOTREADY, /* Operation could not be performed because specified sound/DSP connection is not ready. */
- ERR_OUTPUT_ALLOCATED, /* Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */
- ERR_OUTPUT_CREATEBUFFER, /* Error creating hardware sound buffer. */
- ERR_OUTPUT_DRIVERCALL, /* A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. */
- ERR_OUTPUT_FORMAT, /* Soundcard does not support the specified format. */
- ERR_OUTPUT_INIT, /* Error initializing output device. */
- ERR_OUTPUT_NODRIVERS, /* The output device has no drivers installed. If pre-init, FMOD_OUTPUT_NOSOUND is selected as the output mode. If post-init, the function just fails. */
- ERR_PLUGIN, /* An unspecified error has been returned from a plugin. */
- ERR_PLUGIN_MISSING, /* A requested output, dsp unit type or codec was not available. */
- ERR_PLUGIN_RESOURCE, /* A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback) */
- ERR_PLUGIN_VERSION, /* A plugin was built with an unsupported SDK version. */
- ERR_RECORD, /* An error occurred trying to initialize the recording device. */
- ERR_REVERB_CHANNELGROUP, /* Reverb properties cannot be set on this channel because a parent channelgroup owns the reverb connection. */
- ERR_REVERB_INSTANCE, /* Specified instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because it is an invalid instance number or the reverb doesn't exist. */
- ERR_SUBSOUNDS, /* The error occurred because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound. */
- ERR_SUBSOUND_ALLOCATED, /* This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent's entry first. */
- ERR_SUBSOUND_CANTMOVE, /* Shared subsounds cannot be replaced or moved from their parent stream, such as when the parent stream is an FSB file. */
- ERR_TAGNOTFOUND, /* The specified tag could not be found or there are no tags. */
- ERR_TOOMANYCHANNELS, /* The sound created exceeds the allowable input channel count. This can be increased using the 'maxinputchannels' parameter in System::setSoftwareFormat. */
- ERR_TRUNCATED, /* The retrieved string is too long to fit in the supplied buffer and has been truncated. */
- ERR_UNIMPLEMENTED, /* Something in FMOD hasn't been implemented when it should be! contact support! */
- ERR_UNINITIALIZED, /* This command failed because System::init or System::setDriver was not called. */
- ERR_UNSUPPORTED, /* A command issued was not supported by this object. Possibly a plugin without certain callbacks specified. */
- ERR_VERSION, /* The version number of this file format is not supported. */
- ERR_EVENT_ALREADY_LOADED, /* The specified bank has already been loaded. */
- ERR_EVENT_LIVEUPDATE_BUSY, /* The live update connection failed due to the game already being connected. */
- ERR_EVENT_LIVEUPDATE_MISMATCH, /* The live update connection failed due to the game data being out of sync with the tool. */
- ERR_EVENT_LIVEUPDATE_TIMEOUT, /* The live update connection timed out. */
- ERR_EVENT_NOTFOUND, /* The requested event, bus or vca could not be found. */
- ERR_STUDIO_UNINITIALIZED, /* The Studio::System object is not yet initialized. */
- ERR_STUDIO_NOT_LOADED, /* The specified resource is not loaded, so it can't be unloaded. */
- ERR_INVALID_STRING, /* An invalid string was passed to this function. */
- ERR_ALREADY_LOCKED, /* The specified resource is already locked. */
- ERR_NOT_LOCKED, /* The specified resource is not locked, so it can't be unlocked. */
- ERR_RECORD_DISCONNECTED, /* The specified recording driver has been disconnected. */
- ERR_TOOMANYSAMPLES, /* The length provided exceed the allowable limit. */
- }
-
- public enum CHANNELCONTROL_TYPE : int
- {
- CHANNEL,
- CHANNELGROUP,
- MAX
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct VECTOR
- {
- public float x; /* X co-ordinate in 3D space. */
- public float y; /* Y co-ordinate in 3D space. */
- public float z; /* Z co-ordinate in 3D space. */
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ATTRIBUTES_3D
- {
- public VECTOR position;
- public VECTOR velocity;
- public VECTOR forward;
- public VECTOR up;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ASYNCREADINFO
- {
- public IntPtr handle; /* [r] The file handle that was filled out in the open callback. */
- public uint offset; /* [r] Seek position, make sure you read from this file offset. */
- public uint sizebytes; /* [r] how many bytes requested for read. */
- public int priority; /* [r] 0 = low importance. 100 = extremely important (ie 'must read now or stuttering may occur') */
-
- public IntPtr userdata; /* [r] User data pointer. */
- public IntPtr buffer; /* [w] Buffer to read file data into. */
- public uint bytesread; /* [w] Fill this in before setting result code to tell FMOD how many bytes were read. */
- public FILE_ASYNCDONE_FUNC done; /* [r] FMOD file system wake up function. Call this when user file read is finished. Pass result of file read as a parameter. */
- }
-
- public enum OUTPUTTYPE : int
- {
- AUTODETECT, /* Picks the best output mode for the platform. This is the default. */
-
- UNKNOWN, /* All - 3rd party plugin, unknown. This is for use with System::getOutput only. */
- NOSOUND, /* All - Perform all mixing but discard the final output. */
- WAVWRITER, /* All - Writes output to a .wav file. */
- NOSOUND_NRT, /* All - Non-realtime version of FMOD_OUTPUTTYPE_NOSOUND. User can drive mixer with System::update at whatever rate they want. */
- WAVWRITER_NRT, /* All - Non-realtime version of FMOD_OUTPUTTYPE_WAVWRITER. User can drive mixer with System::update at whatever rate they want. */
-
- WASAPI, /* Win / Xbox One - Windows Audio Session API. (Default on Windows and Xbox One) */
- ASIO, /* Win - Low latency ASIO 2.0. */
- PULSEAUDIO, /* Linux - Pulse Audio. (Default on Linux if available) */
- ALSA, /* Linux - Advanced Linux Sound Architecture. (Default on Linux if PulseAudio isn't available) */
- COREAUDIO, /* Mac / iOS - Core Audio. (Default on Mac and iOS) */
- AUDIOTRACK, /* Android - Java Audio Track. (Default on Android 2.2 and below) */
- OPENSL, /* Android - OpenSL ES. (Default on Android 2.3 and above) */
- AUDIOOUT, /* PS4 - Audio Out. (Default on PS4) */
- AUDIO3D, /* PS4 - Audio3D. */
- WEBAUDIO, /* Web Browser - JavaScript webaudio output. (Default on JavaScript) */
- NNAUDIO, /* Switch - nn::audio. (Default on Switch) */
- WINSONIC, /* Win10 / Xbox One - Windows Sonic. */
-
- MAX, /* Maximum number of output types supported. */
- }
-
- public enum DEBUG_MODE : int
- {
- TTY, /* Default log location per platform, i.e. Visual Studio output window, stderr, LogCat, etc */
- FILE, /* Write log to specified file path */
- CALLBACK, /* Call specified callback with log information */
- }
-
- [Flags]
- public enum DEBUG_FLAGS : uint
- {
- NONE = 0x00000000, /* Disable all messages */
- ERROR = 0x00000001, /* Enable only error messages. */
- WARNING = 0x00000002, /* Enable warning and error messages. */
- LOG = 0x00000004, /* Enable informational, warning and error messages (default). */
-
- TYPE_MEMORY = 0x00000100, /* Verbose logging for memory operations, only use this if you are debugging a memory related issue. */
- TYPE_FILE = 0x00000200, /* Verbose logging for file access, only use this if you are debugging a file related issue. */
- TYPE_CODEC = 0x00000400, /* Verbose logging for codec initialization, only use this if you are debugging a codec related issue. */
- TYPE_TRACE = 0x00000800, /* Verbose logging for internal errors, use this for tracking the origin of error codes. */
-
- DISPLAY_TIMESTAMPS = 0x00010000, /* Display the time stamp of the log message in milliseconds. */
- DISPLAY_LINENUMBERS = 0x00020000, /* Display the source code file and line number for where the message originated. */
- DISPLAY_THREAD = 0x00040000, /* Display the thread ID of the calling function that generated the message. */
- }
-
- [Flags]
- public enum MEMORY_TYPE : uint
- {
- NORMAL = 0x00000000, /* Standard memory. */
- STREAM_FILE = 0x00000001, /* Stream file buffer, size controllable with System::setStreamBufferSize. */
- STREAM_DECODE = 0x00000002, /* Stream decode buffer, size controllable with FMOD_CREATESOUNDEXINFO::decodebuffersize. */
- SAMPLEDATA = 0x00000004, /* Sample data buffer. Raw audio data, usually PCM/MPEG/ADPCM/XMA data. */
- DSP_BUFFER = 0x00000008, /* DSP memory block allocated when more than 1 output exists on a DSP node. */
- PLUGIN = 0x00000010, /* Memory allocated by a third party plugin. */
- PERSISTENT = 0x00200000, /* Persistent memory. Memory will be freed when System::release is called. */
- ALL = 0xFFFFFFFF
- }
-
- public enum SPEAKERMODE : int
- {
- DEFAULT, /* Default speaker mode for the chosen output mode which will resolve after System::init. */
- RAW, /* Assume there is no special mapping from a given channel to a speaker, channels map 1:1 in order. Use System::setSoftwareFormat to specify the speaker count. */
- MONO, /* 1 speaker setup (monaural). */
- STEREO, /* 2 speaker setup (stereo) front left, front right. */
- QUAD, /* 4 speaker setup (4.0) front left, front right, surround left, surround right. */
- SURROUND, /* 5 speaker setup (5.0) front left, front right, center, surround left, surround right. */
- _5POINT1, /* 6 speaker setup (5.1) front left, front right, center, low frequency, surround left, surround right. */
- _7POINT1, /* 8 speaker setup (7.1) front left, front right, center, low frequency, surround left, surround right, back left, back right. */
- _7POINT1POINT4, /* 12 speaker setup (7.1.4) front left, front right, center, low frequency, surround left, surround right, back left, back right, top front left, top front right, top back left, top back right. */
-
- MAX, /* Maximum number of speaker modes supported. */
- }
-
- public enum SPEAKER : int
- {
- FRONT_LEFT, /* The front left speaker */
- FRONT_RIGHT, /* The front right speaker */
- FRONT_CENTER, /* The front center speaker */
- LOW_FREQUENCY, /* The LFE or 'subwoofer' speaker */
- SURROUND_LEFT, /* The surround left (usually to the side) speaker */
- SURROUND_RIGHT, /* The surround right (usually to the side) speaker */
- BACK_LEFT, /* The back left speaker */
- BACK_RIGHT, /* The back right speaker */
- TOP_FRONT_LEFT, /* The top front left speaker */
- TOP_FRONT_RIGHT, /* The top front right speaker */
- TOP_BACK_LEFT, /* The top back left speaker */
- TOP_BACK_RIGHT, /* The top back right speaker */
-
- MAX, /* Maximum number of speaker types supported. */
- }
-
- [Flags]
- public enum CHANNELMASK : uint
- {
- FRONT_LEFT = 0x00000001,
- FRONT_RIGHT = 0x00000002,
- FRONT_CENTER = 0x00000004,
- LOW_FREQUENCY = 0x00000008,
- SURROUND_LEFT = 0x00000010,
- SURROUND_RIGHT = 0x00000020,
- BACK_LEFT = 0x00000040,
- BACK_RIGHT = 0x00000080,
- BACK_CENTER = 0x00000100,
-
- MONO = (FRONT_LEFT),
- STEREO = (FRONT_LEFT | FRONT_RIGHT),
- LRC = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER),
- QUAD = (FRONT_LEFT | FRONT_RIGHT | SURROUND_LEFT | SURROUND_RIGHT),
- SURROUND = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT),
- _5POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT),
- _5POINT1_REARS = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | BACK_LEFT | BACK_RIGHT),
- _7POINT0 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT),
- _7POINT1 = (FRONT_LEFT | FRONT_RIGHT | FRONT_CENTER | LOW_FREQUENCY | SURROUND_LEFT | SURROUND_RIGHT | BACK_LEFT | BACK_RIGHT)
- }
-
- public enum CHANNELORDER : int
- {
- DEFAULT, /* Left, Right, Center, LFE, Surround Left, Surround Right, Back Left, Back Right (see FMOD_SPEAKER enumeration) */
- WAVEFORMAT, /* Left, Right, Center, LFE, Back Left, Back Right, Surround Left, Surround Right (as per Microsoft .wav WAVEFORMAT structure master order) */
- PROTOOLS, /* Left, Center, Right, Surround Left, Surround Right, LFE */
- ALLMONO, /* Mono, Mono, Mono, Mono, Mono, Mono, ... (each channel all the way up to 32 channels are treated as if they were mono) */
- ALLSTEREO, /* Left, Right, Left, Right, Left, Right, ... (each pair of channels is treated as stereo all the way up to 32 channels) */
- ALSA, /* Left, Right, Surround Left, Surround Right, Center, LFE (as per Linux ALSA channel order) */
-
- MAX, /* Maximum number of channel orderings supported. */
- }
-
- public enum PLUGINTYPE : int
- {
- OUTPUT, /* The plugin type is an output module. FMOD mixed audio will play through one of these devices */
- CODEC, /* The plugin type is a file format codec. FMOD will use these codecs to load file formats for playback. */
- DSP, /* The plugin type is a DSP unit. FMOD will use these plugins as part of its DSP network to apply effects to output or generate sound in realtime. */
-
- MAX, /* Maximum number of plugin types supported. */
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct PLUGINLIST
- {
- PLUGINTYPE type;
- IntPtr description;
- }
-
- [Flags]
- public enum INITFLAGS : uint
- {
- NORMAL = 0x00000000, /* Initialize normally */
- STREAM_FROM_UPDATE = 0x00000001, /* No stream thread is created internally. Streams are driven from System::update. Mainly used with non-realtime outputs. */
- MIX_FROM_UPDATE = 0x00000002, /* FMOD Mixer thread is woken up to do a mix when System::update is called rather than waking periodically on its own timer. */
- _3D_RIGHTHANDED = 0x00000004, /* FMOD will treat +X as right, +Y as up and +Z as backwards (towards you). */
- CHANNEL_LOWPASS = 0x00000100, /* All FMOD_3D based voices will add a software lowpass filter effect into the DSP chain which is automatically used when Channel::set3DOcclusion is used or the geometry API. This also causes sounds to sound duller when the sound goes behind the listener, as a fake HRTF style effect. Use System::setAdvancedSettings to disable or adjust cutoff frequency for this feature. */
- CHANNEL_DISTANCEFILTER = 0x00000200, /* All FMOD_3D based voices will add a software lowpass and highpass filter effect into the DSP chain which will act as a distance-automated bandpass filter. Use System::setAdvancedSettings to adjust the center frequency. */
- PROFILE_ENABLE = 0x00010000, /* Enable TCP/IP based host which allows FMOD Designer or FMOD Profiler to connect to it, and view memory, CPU and the DSP network graph in real-time. */
- VOL0_BECOMES_VIRTUAL = 0x00020000, /* Any sounds that are 0 volume will go virtual and not be processed except for having their positions updated virtually. Use System::setAdvancedSettings to adjust what volume besides zero to switch to virtual at. */
- GEOMETRY_USECLOSEST = 0x00040000, /* With the geometry engine, only process the closest polygon rather than accumulating all polygons the sound to listener line intersects. */
- PREFER_DOLBY_DOWNMIX = 0x00080000, /* When using FMOD_SPEAKERMODE_5POINT1 with a stereo output device, use the Dolby Pro Logic II downmix algorithm instead of the default stereo downmix algorithm. */
- THREAD_UNSAFE = 0x00100000, /* Disables thread safety for API calls. Only use this if FMOD low level is being called from a single thread, and if Studio API is not being used! */
- PROFILE_METER_ALL = 0x00200000, /* Slower, but adds level metering for every single DSP unit in the graph. Use DSP::setMeteringEnabled to turn meters off individually. */
- }
-
- public enum SOUND_TYPE : int
- {
- UNKNOWN, /* 3rd party / unknown plugin format. */
- AIFF, /* AIFF. */
- ASF, /* Microsoft Advanced Systems Format (ie WMA/ASF/WMV). */
- DLS, /* Sound font / downloadable sound bank. */
- FLAC, /* FLAC lossless codec. */
- FSB, /* FMOD Sample Bank. */
- IT, /* Impulse Tracker. */
- MIDI, /* MIDI. extracodecdata is a pointer to an FMOD_MIDI_EXTRACODECDATA structure. */
- MOD, /* Protracker / Fasttracker MOD. */
- MPEG, /* MP2/MP3 MPEG. */
- OGGVORBIS, /* Ogg vorbis. */
- PLAYLIST, /* Information only from ASX/PLS/M3U/WAX playlists */
- RAW, /* Raw PCM data. */
- S3M, /* ScreamTracker 3. */
- USER, /* User created sound. */
- WAV, /* Microsoft WAV. */
- XM, /* FastTracker 2 XM. */
- XMA, /* Xbox One XMA */
- AUDIOQUEUE, /* iPhone hardware decoder, supports AAC, ALAC and MP3. extracodecdata is a pointer to an FMOD_AUDIOQUEUE_EXTRACODECDATA structure. */
- AT9, /* PS4 ATRAC 9 format */
- VORBIS, /* Vorbis */
- MEDIA_FOUNDATION,/* Windows Store Application built in system codecs */
- MEDIACODEC, /* Android MediaCodec */
- FADPCM, /* FMOD Adaptive Differential Pulse Code Modulation */
-
- MAX, /* Maximum number of sound types supported. */
- }
-
- public enum SOUND_FORMAT : int
- {
- NONE, /* Unitialized / unknown */
- PCM8, /* 8bit integer PCM data */
- PCM16, /* 16bit integer PCM data */
- PCM24, /* 24bit integer PCM data */
- PCM32, /* 32bit integer PCM data */
- PCMFLOAT, /* 32bit floating point PCM data */
- BITSTREAM, /* Sound data is in its native compressed format. */
-
- MAX /* Maximum number of sound formats supported. */
- }
-
- [Flags]
- public enum MODE : uint
- {
- DEFAULT = 0x00000000, /* Default for all modes listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_3D_WORLDRELATIVE, FMOD_3D_INVERSEROLLOFF */
- LOOP_OFF = 0x00000001, /* For non looping sounds. (default). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI. */
- LOOP_NORMAL = 0x00000002, /* For forward looping sounds. */
- LOOP_BIDI = 0x00000004, /* For bidirectional looping sounds. (only works on software mixed static sounds). */
- _2D = 0x00000008, /* Ignores any 3d processing. (default). */
- _3D = 0x00000010, /* Makes the sound positionable in 3D. Overrides FMOD_2D. */
- CREATESTREAM = 0x00000080, /* Decompress at runtime, streaming from the source provided (standard stream). Overrides FMOD_CREATESAMPLE. */
- CREATESAMPLE = 0x00000100, /* Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format. (standard sample). */
- CREATECOMPRESSEDSAMPLE = 0x00000200, /* Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Can only be used in combination with FMOD_SOFTWARE. */
- OPENUSER = 0x00000400, /* Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks. If a user created 'sample' is created with no read callback, the sample will be empty. Use FMOD_Sound_Lock and FMOD_Sound_Unlock to place sound data into the sound if this is the case. */
- OPENMEMORY = 0x00000800, /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. */
- OPENMEMORY_POINT = 0x10000000, /* "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used. */
- OPENRAW = 0x00001000, /* Will ignore file format and treat as raw pcm. User may need to declare if data is FMOD_SIGNED or FMOD_UNSIGNED */
- OPENONLY = 0x00002000, /* Just open the file, dont prebuffer or read. Good for fast opens for info, or when sound::readData is to be used. */
- ACCURATETIME = 0x00004000, /* For FMOD_CreateSound - for accurate FMOD_Sound_GetLength / FMOD_Channel_SetPosition on VBR MP3, AAC and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this. */
- MPEGSEARCH = 0x00008000, /* For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k. */
- NONBLOCKING = 0x00010000, /* For opening sounds and getting streamed subsounds (seeking) asyncronously. Use Sound::getOpenState to poll the state of the sound as it opens or retrieves the subsound in the background. */
- UNIQUE = 0x00020000, /* Unique sound, can only be played one at a time */
- _3D_HEADRELATIVE = 0x00040000, /* Make the sound's position, velocity and orientation relative to the listener. */
- _3D_WORLDRELATIVE = 0x00080000, /* Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) */
- _3D_INVERSEROLLOFF = 0x00100000, /* This sound will follow the inverse rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (DEFAULT) */
- _3D_LINEARROLLOFF = 0x00200000, /* This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. */
- _3D_LINEARSQUAREROLLOFF= 0x00400000, /* This sound will follow a linear-square rolloff model where mindistance = full volume, maxdistance = silence. Rolloffscale is ignored. */
- _3D_INVERSETAPEREDROLLOFF = 0x00800000, /* This sound will follow the inverse rolloff model at distances close to mindistance and a linear-square rolloff close to maxdistance. */
- _3D_CUSTOMROLLOFF = 0x04000000, /* This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff. */
- _3D_IGNOREGEOMETRY = 0x40000000, /* Is not affect by geometry occlusion. If not specified in Sound::setMode, or Channel::setMode, the flag is cleared and it is affected by geometry again. */
- IGNORETAGS = 0x02000000, /* Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance). */
- LOWMEM = 0x08000000, /* Removes some features from samples to give a lower memory overhead, like Sound::getName. */
- VIRTUAL_PLAYFROMSTART = 0x80000000 /* For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start. */
- }
-
- public enum OPENSTATE : int
- {
- READY = 0, /* Opened and ready to play */
- LOADING, /* Initial load in progress */
- ERROR, /* Failed to open - file not found, out of memory etc. See return value of Sound::getOpenState for what happened. */
- CONNECTING, /* Connecting to remote host (internet sounds only) */
- BUFFERING, /* Buffering data */
- SEEKING, /* Seeking to subsound and re-flushing stream buffer. */
- PLAYING, /* Ready and playing, but not possible to release at this time without stalling the main thread. */
- SETPOSITION, /* Seeking within a stream to a different position. */
-
- MAX, /* Maximum number of open state types. */
- }
-
- public enum SOUNDGROUP_BEHAVIOR : int
- {
- BEHAVIOR_FAIL, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will simply fail during System::playSound. */
- BEHAVIOR_MUTE, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will be silent, then if another sound in the group stops the sound that was silent before becomes audible again. */
- BEHAVIOR_STEALLOWEST, /* Any sound played that puts the sound count over the SoundGroup::setMaxAudible setting, will steal the quietest / least important sound playing in the group. */
-
- MAX, /* Maximum number of sound group behaviors. */
- }
-
- public enum CHANNELCONTROL_CALLBACK_TYPE : int
- {
- END, /* Called when a sound ends. */
- VIRTUALVOICE, /* Called when a voice is swapped out or swapped in. */
- SYNCPOINT, /* Called when a syncpoint is encountered. Can be from wav file markers. */
- OCCLUSION, /* Called when the channel has its geometry occlusion value calculated. Can be used to clamp or change the value. */
-
- MAX, /* Maximum number of callback types supported. */
- }
-
- public struct CHANNELCONTROL_DSP_INDEX
- {
- public const int HEAD = -1; /* Head of the DSP chain. Equivalent of index 0. */
- public const int FADER = -2; /* Built in fader DSP. */
- public const int TAIL = -3; /* Tail of the DSP chain. Equivalent of the number of dsps minus 1. */
- }
-
- public enum ERRORCALLBACK_INSTANCETYPE : int
- {
- NONE,
- SYSTEM,
- CHANNEL,
- CHANNELGROUP,
- CHANNELCONTROL,
- SOUND,
- SOUNDGROUP,
- DSP,
- DSPCONNECTION,
- GEOMETRY,
- REVERB3D,
- STUDIO_SYSTEM,
- STUDIO_EVENTDESCRIPTION,
- STUDIO_EVENTINSTANCE,
- STUDIO_PARAMETERINSTANCE,
- STUDIO_BUS,
- STUDIO_VCA,
- STUDIO_BANK,
- STUDIO_COMMANDREPLAY
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ERRORCALLBACK_INFO
- {
- public RESULT result; /* Error code result */
- public ERRORCALLBACK_INSTANCETYPE instancetype; /* Type of instance the error occurred on */
- public IntPtr instance; /* Instance pointer */
- public StringWrapper functionname; /* Function that the error occurred on */
- public StringWrapper functionparams; /* Function parameters that the error ocurred on */
- }
-
- [Flags]
- public enum SYSTEM_CALLBACK_TYPE : uint
- {
- DEVICELISTCHANGED = 0x00000001, /* Called from System::update when the enumerated list of devices has changed. */
- DEVICELOST = 0x00000002, /* Called from System::update when an output device has been lost due to control panel parameter changes and FMOD cannot automatically recover. */
- MEMORYALLOCATIONFAILED = 0x00000004, /* Called directly when a memory allocation fails somewhere in FMOD. (NOTE - 'system' will be NULL in this callback type.)*/
- THREADCREATED = 0x00000008, /* Called directly when a thread is created. (NOTE - 'system' will be NULL in this callback type.) */
- BADDSPCONNECTION = 0x00000010, /* Called when a bad connection was made with DSP::addInput. Usually called from mixer thread because that is where the connections are made. */
- PREMIX = 0x00000020, /* Called each tick before a mix update happens. */
- POSTMIX = 0x00000040, /* Called each tick after a mix update happens. */
- ERROR = 0x00000080, /* Called when each API function returns an error code, including delayed async functions. */
- MIDMIX = 0x00000100, /* Called each tick in mix update after clocks have been updated before the main mix occurs. */
- THREADDESTROYED = 0x00000200, /* Called directly when a thread is destroyed. */
- PREUPDATE = 0x00000400, /* Called at start of System::update function. */
- POSTUPDATE = 0x00000800, /* Called at end of System::update function. */
- RECORDLISTCHANGED = 0x00001000, /* Called from System::update when the enumerated list of recording devices has changed. */
- ALL = 0xFFFFFFFF, /* Pass this mask to System::setCallback to receive all callback types. */
- }
-
- /*
- FMOD Callbacks
- */
- public delegate RESULT DEBUG_CALLBACK (DEBUG_FLAGS flags, StringWrapper file, int line, StringWrapper func, StringWrapper message);
- public delegate RESULT SYSTEM_CALLBACK (IntPtr system, SYSTEM_CALLBACK_TYPE type, IntPtr commanddata1, IntPtr commanddata2, IntPtr userdata);
- public delegate RESULT CHANNELCONTROL_CALLBACK(IntPtr channelcontrol, CHANNELCONTROL_TYPE controltype, CHANNELCONTROL_CALLBACK_TYPE callbacktype, IntPtr commanddata1, IntPtr commanddata2);
- public delegate RESULT SOUND_NONBLOCK_CALLBACK (IntPtr sound, RESULT result);
- public delegate RESULT SOUND_PCMREAD_CALLBACK (IntPtr sound, IntPtr data, uint datalen);
- public delegate RESULT SOUND_PCMSETPOS_CALLBACK (IntPtr sound, int subsound, uint position, TIMEUNIT postype);
- public delegate RESULT FILE_OPEN_CALLBACK (StringWrapper name, ref uint filesize, ref IntPtr handle, IntPtr userdata);
- public delegate RESULT FILE_CLOSE_CALLBACK (IntPtr handle, IntPtr userdata);
- public delegate RESULT FILE_READ_CALLBACK (IntPtr handle, IntPtr buffer, uint sizebytes, ref uint bytesread, IntPtr userdata);
- public delegate RESULT FILE_SEEK_CALLBACK (IntPtr handle, uint pos, IntPtr userdata);
- public delegate RESULT FILE_ASYNCREAD_CALLBACK (IntPtr info, IntPtr userdata);
- public delegate RESULT FILE_ASYNCCANCEL_CALLBACK(IntPtr info, IntPtr userdata);
- public delegate RESULT FILE_ASYNCDONE_FUNC (IntPtr info, RESULT result);
- public delegate IntPtr MEMORY_ALLOC_CALLBACK (uint size, MEMORY_TYPE type, StringWrapper sourcestr);
- public delegate IntPtr MEMORY_REALLOC_CALLBACK (IntPtr ptr, uint size, MEMORY_TYPE type, StringWrapper sourcestr);
- public delegate void MEMORY_FREE_CALLBACK (IntPtr ptr, MEMORY_TYPE type, StringWrapper sourcestr);
- public delegate float CB_3D_ROLLOFF_CALLBACK (IntPtr channelcontrol, float distance);
-
- public enum DSP_RESAMPLER : int
- {
- DEFAULT, /* Default interpolation method. Currently equal to FMOD_DSP_RESAMPLER_LINEAR. */
- NOINTERP, /* No interpolation. High frequency aliasing hiss will be audible depending on the sample rate of the sound. */
- LINEAR, /* Linear interpolation (default method). Fast and good quality, causes very slight lowpass effect on low frequency sounds. */
- CUBIC, /* Cubic interpolation. Slower than linear interpolation but better quality. */
- SPLINE, /* 5 point spline interpolation. Slowest resampling method but best quality. */
-
- MAX, /* Maximum number of resample methods supported. */
- }
-
- public enum DSPCONNECTION_TYPE : int
- {
- STANDARD, /* Default connection type. Audio is mixed from the input to the output DSP's audible buffer. */
- SIDECHAIN, /* Sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer. */
- SEND, /* Send connection type. Audio is mixed from the input to the output DSP's audible buffer, but the input is NOT executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. */
- SEND_SIDECHAIN, /* Send sidechain connection type. Audio is mixed from the input to the output DSP's sidechain buffer, but the input is NOT executed, only copied from. A standard connection or sidechain needs to make an input execute to generate data. */
-
- MAX, /* Maximum number of DSP connection types supported. */
- }
-
- public enum TAGTYPE : int
- {
- UNKNOWN = 0,
- ID3V1,
- ID3V2,
- VORBISCOMMENT,
- SHOUTCAST,
- ICECAST,
- ASF,
- MIDI,
- PLAYLIST,
- FMOD,
- USER,
-
- MAX /* Maximum number of tag types supported. */
- }
-
- public enum TAGDATATYPE : int
- {
- BINARY = 0,
- INT,
- FLOAT,
- STRING,
- STRING_UTF16,
- STRING_UTF16BE,
- STRING_UTF8,
-
- MAX /* Maximum number of tag datatypes supported. */
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct TAG
- {
- public TAGTYPE type; /* [r] The type of this tag. */
- public TAGDATATYPE datatype; /* [r] The type of data that this tag contains */
- public StringWrapper name; /* [r] The name of this tag i.e. "TITLE", "ARTIST" etc. */
- public IntPtr data; /* [r] Pointer to the tag data - its format is determined by the datatype member */
- public uint datalen; /* [r] Length of the data contained in this tag */
- public bool updated; /* [r] True if this tag has been updated since last being accessed with Sound::getTag */
- }
-
- [Flags]
- public enum TIMEUNIT : uint
- {
- MS = 0x00000001, /* Milliseconds. */
- PCM = 0x00000002, /* PCM Samples, related to milliseconds * samplerate / 1000. */
- PCMBYTES = 0x00000004, /* Bytes, related to PCM samples * channels * datawidth (ie 16bit = 2 bytes). */
- RAWBYTES = 0x00000008, /* Raw file bytes of (compressed) sound data (does not include headers). Only used by Sound::getLength and Channel::getPosition. */
- PCMFRACTION = 0x00000010, /* Fractions of 1 PCM sample. Unsigned int range 0 to 0xFFFFFFFF. Used for sub-sample granularity for DSP purposes. */
- MODORDER = 0x00000100, /* MOD/S3M/XM/IT. Order in a sequenced module format. Use Sound::getFormat to determine the format. */
- MODROW = 0x00000200, /* MOD/S3M/XM/IT. Current row in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number if rows in the currently playing or seeked to pattern. */
- MODPATTERN = 0x00000400, /* MOD/S3M/XM/IT. Current pattern in a sequenced module format. Cannot use with Channel::setPosition. Sound::getLength will return the number of patterns in the song and Channel::getPosition will return the currently playing pattern. */
- }
-
- public struct PORT_INDEX
- {
- public const ulong NONE = 0xFFFFFFFFFFFFFFFF;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct CREATESOUNDEXINFO
- {
- public int cbsize; /* [w] Size of this structure. This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. */
- public uint length; /* [w] Optional. Specify 0 to ignore. Size in bytes of file to load, or sound to create (in this case only if FMOD_OPENUSER is used). Required if loading from memory. If 0 is specified, then it will use the size of the file (unless loading from memory then an error will be returned). */
- public uint fileoffset; /* [w] Optional. Specify 0 to ignore. Offset from start of the file to start loading from. This is useful for loading files from inside big data files. */
- public int numchannels; /* [w] Optional. Specify 0 to ignore. Number of channels in a sound specified only if OPENUSER is used. */
- public int defaultfrequency; /* [w] Optional. Specify 0 to ignore. Default frequency of sound in a sound specified only if OPENUSER is used. Other formats use the frequency determined by the file format. */
- public SOUND_FORMAT format; /* [w] Optional. Specify 0 or SOUND_FORMAT_NONE to ignore. Format of the sound specified only if OPENUSER is used. Other formats use the format determined by the file format. */
- public uint decodebuffersize; /* [w] Optional. Specify 0 to ignore. For streams. This determines the size of the double buffer (in PCM samples) that a stream uses. Use this for user created streams if you want to determine the size of the callback buffer passed to you. Specify 0 to use FMOD's default size which is currently equivalent to 400ms of the sound format created/loaded. */
- public int initialsubsound; /* [w] Optional. Specify 0 to ignore. In a multi-sample file format such as .FSB/.DLS/.SF2, specify the initial subsound to seek to, only if CREATESTREAM is used. */
- public int numsubsounds; /* [w] Optional. Specify 0 to ignore or have no subsounds. In a user created multi-sample sound, specify the number of subsounds within the sound that are accessable with Sound::getSubSound / SoundGetSubSound. */
- public IntPtr inclusionlist; /* [w] Optional. Specify 0 to ignore. In a multi-sample format such as .FSB/.DLS/.SF2 it may be desirable to specify only a subset of sounds to be loaded out of the whole file. This is an array of subsound indicies to load into memory when created. */
- public int inclusionlistnum; /* [w] Optional. Specify 0 to ignore. This is the number of integers contained within the */
- public SOUND_PCMREAD_CALLBACK pcmreadcallback; /* [w] Optional. Specify 0 to ignore. Callback to 'piggyback' on FMOD's read functions and accept or even write PCM data while FMOD is opening the sound. Used for user sounds created with OPENUSER or for capturing decoded data as FMOD reads it. */
- public SOUND_PCMSETPOS_CALLBACK pcmsetposcallback; /* [w] Optional. Specify 0 to ignore. Callback for when the user calls a seeking function such as Channel::setPosition within a multi-sample sound, and for when it is opened.*/
- public SOUND_NONBLOCK_CALLBACK nonblockcallback; /* [w] Optional. Specify 0 to ignore. Callback for successful completion, or error while loading a sound that used the FMOD_NONBLOCKING flag.*/
- public IntPtr dlsname; /* [w] Optional. Specify 0 to ignore. Filename for a DLS or SF2 sample set when loading a MIDI file. If not specified, on windows it will attempt to open /windows/system32/drivers/gm.dls, otherwise the MIDI will fail to open. */
- public IntPtr encryptionkey; /* [w] Optional. Specify 0 to ignore. Key for encrypted FSB file. Without this key an encrypted FSB file will not load. */
- public int maxpolyphony; /* [w] Optional. Specify 0 to ingore. For sequenced formats with dynamic channel allocation such as .MID and .IT, this specifies the maximum voice count allowed while playing. .IT defaults to 64. .MID defaults to 32. */
- public IntPtr userdata; /* [w] Optional. Specify 0 to ignore. This is user data to be attached to the sound during creation. Access via Sound::getUserData. */
- public SOUND_TYPE suggestedsoundtype; /* [w] Optional. Specify 0 or FMOD_SOUND_TYPE_UNKNOWN to ignore. Instead of scanning all codec types, use this to speed up loading by making it jump straight to this codec. */
- public FILE_OPEN_CALLBACK fileuseropen; /* [w] Optional. Specify 0 to ignore. Callback for opening this file. */
- public FILE_CLOSE_CALLBACK fileuserclose; /* [w] Optional. Specify 0 to ignore. Callback for closing this file. */
- public FILE_READ_CALLBACK fileuserread; /* [w] Optional. Specify 0 to ignore. Callback for reading from this file. */
- public FILE_SEEK_CALLBACK fileuserseek; /* [w] Optional. Specify 0 to ignore. Callback for seeking within this file. */
- public FILE_ASYNCREAD_CALLBACK fileuserasyncread; /* [w] Optional. Specify 0 to ignore. Callback for asyncronously reading from this file. */
- public FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel; /* [w] Optional. Specify 0 to ignore. Callback for cancelling an asyncronous read. */
- public IntPtr fileuserdata; /* [w] Optional. Specify 0 to ignore. User data to be passed into the file callbacks. */
- public int filebuffersize; /* [w] Optional. Specify 0 to ignore. Buffer size for reading the file, -1 to disable buffering, or 0 for system default. */
- public CHANNELORDER channelorder; /* [w] Optional. Specify 0 to ignore. Use this to differ the way fmod maps multichannel sounds to speakers. See FMOD_CHANNELORDER for more. */
- public IntPtr initialsoundgroup; /* [w] Optional. Specify 0 to ignore. Specify a sound group if required, to put sound in as it is created. */
- public uint initialseekposition; /* [w] Optional. Specify 0 to ignore. For streams. Specify an initial position to seek the stream to. */
- public TIMEUNIT initialseekpostype; /* [w] Optional. Specify 0 to ignore. For streams. Specify the time unit for the position set in initialseekposition. */
- public int ignoresetfilesystem; /* [w] Optional. Specify 0 to ignore. Set to 1 to use fmod's built in file system. Ignores setFileSystem callbacks and also FMOD_CREATESOUNEXINFO file callbacks. Useful for specific cases where you don't want to use your own file system but want to use fmod's file system (ie net streaming). */
- public uint audioqueuepolicy; /* [w] Optional. Specify 0 or FMOD_AUDIOQUEUE_CODECPOLICY_DEFAULT to ignore. Policy used to determine whether hardware or software is used for decoding, see FMOD_AUDIOQUEUE_CODECPOLICY for options (iOS >= 3.0 required, otherwise only hardware is available) */
- public uint minmidigranularity; /* [w] Optional. Specify 0 to ignore. Allows you to set a minimum desired MIDI mixer granularity. Values smaller than 512 give greater than default accuracy at the cost of more CPU and vise versa. Specify 0 for default (512 samples). */
- public int nonblockthreadid; /* [w] Optional. Specify 0 to ignore. Specifies a thread index to execute non blocking load on. Allows for up to 5 threads to be used for loading at once. This is to avoid one load blocking another. Maximum value = 4. */
- public IntPtr fsbguid; /* [r/w] Optional. Specify 0 to ignore. Allows you to provide the GUID lookup for cached FSB header info. Once loaded the GUID will be written back to the pointer. This is to avoid seeking and reading the FSB header. */
- }
-
-#pragma warning disable 414
- [StructLayout(LayoutKind.Sequential)]
- public struct REVERB_PROPERTIES
- { /* MIN MAX DEFAULT DESCRIPTION */
- public float DecayTime; /* [r/w] 0.0 20000.0 1500.0 Reverberation decay time in ms */
- public float EarlyDelay; /* [r/w] 0.0 300.0 7.0 Initial reflection delay time */
- public float LateDelay; /* [r/w] 0.0 100 11.0 Late reverberation delay time relative to initial reflection */
- public float HFReference; /* [r/w] 20.0 20000.0 5000 Reference high frequency (hz) */
- public float HFDecayRatio; /* [r/w] 10.0 100.0 50.0 High-frequency to mid-frequency decay time ratio */
- public float Diffusion; /* [r/w] 0.0 100.0 100.0 Value that controls the echo density in the late reverberation decay. */
- public float Density; /* [r/w] 0.0 100.0 100.0 Value that controls the modal density in the late reverberation decay */
- public float LowShelfFrequency; /* [r/w] 20.0 1000.0 250.0 Reference low frequency (hz) */
- public float LowShelfGain; /* [r/w] -36.0 12.0 0.0 Relative room effect level at low frequencies */
- public float HighCut; /* [r/w] 20.0 20000.0 20000.0 Relative room effect level at high frequencies */
- public float EarlyLateMix; /* [r/w] 0.0 100.0 50.0 Early reflections level relative to room effect */
- public float WetLevel; /* [r/w] -80.0 20.0 -6.0 Room effect level (at mid frequencies)
- * */
- #region wrapperinternal
- public REVERB_PROPERTIES(float decayTime, float earlyDelay, float lateDelay, float hfReference,
- float hfDecayRatio, float diffusion, float density, float lowShelfFrequency, float lowShelfGain,
- float highCut, float earlyLateMix, float wetLevel)
- {
- DecayTime = decayTime;
- EarlyDelay = earlyDelay;
- LateDelay = lateDelay;
- HFReference = hfReference;
- HFDecayRatio = hfDecayRatio;
- Diffusion = diffusion;
- Density = density;
- LowShelfFrequency = lowShelfFrequency;
- LowShelfGain = lowShelfGain;
- HighCut = highCut;
- EarlyLateMix = earlyLateMix;
- WetLevel = wetLevel;
- }
- #endregion
- }
-#pragma warning restore 414
-
- public class PRESET
- {
- /* Instance Env Diffus Room RoomHF RmLF DecTm DecHF DecLF Refl RefDel Revb RevDel ModTm ModDp HFRef LFRef Diffus Densty FLAGS */
- public static REVERB_PROPERTIES OFF() { return new REVERB_PROPERTIES( 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f );}
- public static REVERB_PROPERTIES GENERIC() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f );}
- public static REVERB_PROPERTIES PADDEDCELL() { return new REVERB_PROPERTIES( 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f );}
- public static REVERB_PROPERTIES ROOM() { return new REVERB_PROPERTIES( 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f );}
- public static REVERB_PROPERTIES BATHROOM() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f );}
- public static REVERB_PROPERTIES LIVINGROOM() { return new REVERB_PROPERTIES( 500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f );}
- public static REVERB_PROPERTIES STONEROOM() { return new REVERB_PROPERTIES( 2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f );}
- public static REVERB_PROPERTIES AUDITORIUM() { return new REVERB_PROPERTIES( 4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f );}
- public static REVERB_PROPERTIES CONCERTHALL() { return new REVERB_PROPERTIES( 3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f );}
- public static REVERB_PROPERTIES CAVE() { return new REVERB_PROPERTIES( 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f );}
- public static REVERB_PROPERTIES ARENA() { return new REVERB_PROPERTIES( 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f );}
- public static REVERB_PROPERTIES HANGAR() { return new REVERB_PROPERTIES( 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f );}
- public static REVERB_PROPERTIES CARPETTEDHALLWAY() { return new REVERB_PROPERTIES( 300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f );}
- public static REVERB_PROPERTIES HALLWAY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f );}
- public static REVERB_PROPERTIES STONECORRIDOR() { return new REVERB_PROPERTIES( 270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f );}
- public static REVERB_PROPERTIES ALLEY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f );}
- public static REVERB_PROPERTIES FOREST() { return new REVERB_PROPERTIES( 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f );}
- public static REVERB_PROPERTIES CITY() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f );}
- public static REVERB_PROPERTIES MOUNTAINS() { return new REVERB_PROPERTIES( 1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f );}
- public static REVERB_PROPERTIES QUARRY() { return new REVERB_PROPERTIES( 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f );}
- public static REVERB_PROPERTIES PLAIN() { return new REVERB_PROPERTIES( 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f );}
- public static REVERB_PROPERTIES PARKINGLOT() { return new REVERB_PROPERTIES( 1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f );}
- public static REVERB_PROPERTIES SEWERPIPE() { return new REVERB_PROPERTIES( 2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f );}
- public static REVERB_PROPERTIES UNDERWATER() { return new REVERB_PROPERTIES( 1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f );}
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct ADVANCEDSETTINGS
- {
- public int cbSize; /* [w] Size of this structure. Use sizeof(FMOD_ADVANCEDSETTINGS) */
- public int maxMPEGCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. MPEG codecs consume 30,528 bytes per instance and this number will determine how many MPEG channels can be played simultaneously. Default = 32. */
- public int maxADPCMCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. ADPCM codecs consume 3,128 bytes per instance and this number will determine how many ADPCM channels can be played simultaneously. Default = 32. */
- public int maxXMACodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. XMA codecs consume 14,836 bytes per instance and this number will determine how many XMA channels can be played simultaneously. Default = 32. */
- public int maxVorbisCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. Vorbis codecs consume 23,256 bytes per instance and this number will determine how many Vorbis channels can be played simultaneously. Default = 32. */
- public int maxAT9Codecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. AT9 codecs consume 8,720 bytes per instance and this number will determine how many AT9 channels can be played simultaneously. Default = 32. */
- public int maxFADPCMCodecs; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_CREATECOMPRESSEDSAMPLE only. This number will determine how many FADPCM channels can be played simultaneously. Default = 32. */
- public int maxPCMCodecs; /* [r/w] Unsupported. */
- public int ASIONumChannels; /* [r/w] Optional. Specify 0 to ignore. Number of channels available on the ASIO device. */
- public IntPtr ASIOChannelList; /* [r/w] Optional. Specify 0 to ignore. Pointer to an array of strings (number of entries defined by ASIONumChannels) with ASIO channel names. */
- public IntPtr ASIOSpeakerList; /* [r/w] Optional. Specify 0 to ignore. Pointer to a list of speakers that the ASIO channels map to. This can be called after System::init to remap ASIO output. */
- public float vol0virtualvol; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_VOL0_BECOMES_VIRTUAL. If this flag is used, and the volume is below this, then the sound will become virtual. Use this value to raise the threshold to a different point where a sound goes virtual. */
- public uint defaultDecodeBufferSize; /* [r/w] Optional. Specify 0 to ignore. For streams. This determines the default size of the double buffer (in milliseconds) that a stream uses. Default = 400ms */
- public ushort profilePort; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_PROFILE_ENABLE. Specify the port to listen on for connections by the profiler application. */
- public uint geometryMaxFadeTime; /* [r/w] Optional. Specify 0 to ignore. The maximum time in miliseconds it takes for a channel to fade to the new level when its occlusion changes. */
- public float distanceFilterCenterFreq; /* [r/w] Optional. Specify 0 to ignore. For use with FMOD_INIT_DISTANCE_FILTERING. The default center frequency in Hz for the distance filtering effect. Default = 1500.0. */
- public int reverb3Dinstance; /* [r/w] Optional. Specify 0 to ignore. Out of 0 to 3, 3d reverb spheres will create a phyical reverb unit on this instance slot. See FMOD_REVERB_PROPERTIES. */
- public int DSPBufferPoolSize; /* [r/w] Optional. Specify 0 to ignore. Number of buffers in DSP buffer pool. Each buffer will be DSPBlockSize * sizeof(float) * SpeakerModeChannelCount. ie 7.1 @ 1024 DSP block size = 8 * 1024 * 4 = 32kb. Default = 8. */
- public uint stackSizeStream; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD Stream thread in bytes. Useful for custom codecs that use excess stack. Default 49,152 (48kb) */
- public uint stackSizeNonBlocking; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD_NONBLOCKING loading thread. Useful for custom codecs that use excess stack. Default 65,536 (64kb) */
- public uint stackSizeMixer; /* [r/w] Optional. Specify 0 to ignore. Specify the stack size for the FMOD mixer thread. Useful for custom dsps that use excess stack. Default 49,152 (48kb) */
- public DSP_RESAMPLER resamplerMethod; /* [r/w] Optional. Specify 0 to ignore. Resampling method used with fmod's software mixer. See FMOD_DSP_RESAMPLER for details on methods. */
- public uint commandQueueSize; /* [r/w] Optional. Specify 0 to ignore. Specify the command queue size for thread safe processing. Default 2048 (2kb) */
- public uint randomSeed; /* [r/w] Optional. Specify 0 to ignore. Seed value that FMOD will use to initialize its internal random number generators. */
- }
-
- [Flags]
- public enum DRIVER_STATE : uint
- {
- CONNECTED = 0x00000001, /* Device is currently plugged in. */
- DEFAULT = 0x00000002, /* Device is the users preferred choice. */
- }
-
- /*
- FMOD System factory functions. Use this to create an FMOD System Instance. below you will see System init/close to get started.
- */
- public struct Factory
- {
- public static RESULT System_Create(out System system)
- {
- return FMOD5_System_Create(out system.handle);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Create(out IntPtr system);
-
- #endregion
- }
-
- public struct Memory
- {
- public static RESULT Initialize(IntPtr poolmem, int poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags = MEMORY_TYPE.ALL)
- {
- return FMOD5_Memory_Initialize(poolmem, poollen, useralloc, userrealloc, userfree, memtypeflags);
- }
-
- public static RESULT GetStats(out int currentalloced, out int maxalloced, bool blocking = true)
- {
- return FMOD5_Memory_GetStats(out currentalloced, out maxalloced, blocking);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Memory_Initialize(IntPtr poolmem, int poollen, MEMORY_ALLOC_CALLBACK useralloc, MEMORY_REALLOC_CALLBACK userrealloc, MEMORY_FREE_CALLBACK userfree, MEMORY_TYPE memtypeflags);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Memory_GetStats (out int currentalloced, out int maxalloced, bool blocking);
-
- #endregion
- }
-
- public struct Debug
- {
- public static RESULT Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode = DEBUG_MODE.TTY, DEBUG_CALLBACK callback = null, string filename = null)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_Debug_Initialize(flags, mode, callback, encoder.byteFromStringUTF8(filename));
- }
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Debug_Initialize(DEBUG_FLAGS flags, DEBUG_MODE mode, DEBUG_CALLBACK callback, byte[] filename);
-
- #endregion
- }
-
- /*
- 'System' API.
- */
- public struct System
- {
- public RESULT release()
- {
- return FMOD5_System_Release(this.handle);
- }
-
- // Pre-init functions.
- public RESULT setOutput(OUTPUTTYPE output)
- {
- return FMOD5_System_SetOutput(this.handle, output);
- }
- public RESULT getOutput(out OUTPUTTYPE output)
- {
- return FMOD5_System_GetOutput(this.handle, out output);
- }
- public RESULT getNumDrivers(out int numdrivers)
- {
- return FMOD5_System_GetNumDrivers(this.handle, out numdrivers);
- }
- public RESULT getDriverInfo(int id, out string name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_System_GetDriverInfo(this.handle, id, stringMem, namelen, out guid, out systemrate, out speakermode, out speakermodechannels);
- using (StringHelper.ThreadSafeEncoding encoding = StringHelper.GetFreeHelper())
- {
- name = encoding.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getDriverInfo(int id, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels)
- {
- return FMOD5_System_GetDriverInfo(this.handle, id, IntPtr.Zero, 0, out guid, out systemrate, out speakermode, out speakermodechannels);
- }
- public RESULT setDriver(int driver)
- {
- return FMOD5_System_SetDriver(this.handle, driver);
- }
- public RESULT getDriver(out int driver)
- {
- return FMOD5_System_GetDriver(this.handle, out driver);
- }
- public RESULT setSoftwareChannels(int numsoftwarechannels)
- {
- return FMOD5_System_SetSoftwareChannels(this.handle, numsoftwarechannels);
- }
- public RESULT getSoftwareChannels(out int numsoftwarechannels)
- {
- return FMOD5_System_GetSoftwareChannels(this.handle, out numsoftwarechannels);
- }
- public RESULT setSoftwareFormat(int samplerate, SPEAKERMODE speakermode, int numrawspeakers)
- {
- return FMOD5_System_SetSoftwareFormat(this.handle, samplerate, speakermode, numrawspeakers);
- }
- public RESULT getSoftwareFormat(out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers)
- {
- return FMOD5_System_GetSoftwareFormat(this.handle, out samplerate, out speakermode, out numrawspeakers);
- }
- public RESULT setDSPBufferSize(uint bufferlength, int numbuffers)
- {
- return FMOD5_System_SetDSPBufferSize(this.handle, bufferlength, numbuffers);
- }
- public RESULT getDSPBufferSize(out uint bufferlength, out int numbuffers)
- {
- return FMOD5_System_GetDSPBufferSize(this.handle, out bufferlength, out numbuffers);
- }
- public RESULT setFileSystem(FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign)
- {
- return FMOD5_System_SetFileSystem(this.handle, useropen, userclose, userread, userseek, userasyncread, userasynccancel, blockalign);
- }
- public RESULT attachFileSystem(FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek)
- {
- return FMOD5_System_AttachFileSystem(this.handle, useropen, userclose, userread, userseek);
- }
- public RESULT setAdvancedSettings(ref ADVANCEDSETTINGS settings)
- {
- settings.cbSize = Marshal.SizeOf(settings);
- return FMOD5_System_SetAdvancedSettings(this.handle, ref settings);
- }
- public RESULT getAdvancedSettings(ref ADVANCEDSETTINGS settings)
- {
- settings.cbSize = Marshal.SizeOf(settings);
- return FMOD5_System_GetAdvancedSettings(this.handle, ref settings);
- }
- public RESULT setCallback(SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask = SYSTEM_CALLBACK_TYPE.ALL)
- {
- return FMOD5_System_SetCallback(this.handle, callback, callbackmask);
- }
-
- // Plug-in support.
- public RESULT setPluginPath(string path)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_SetPluginPath(this.handle, encoder.byteFromStringUTF8(path));
- }
- }
- public RESULT loadPlugin(string filename, out uint handle, uint priority = 0)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_LoadPlugin(this.handle, encoder.byteFromStringUTF8(filename), out handle, priority);
- }
- }
- public RESULT unloadPlugin(uint handle)
- {
- return FMOD5_System_UnloadPlugin(this.handle, handle);
- }
- public RESULT getNumNestedPlugins(uint handle, out int count)
- {
- return FMOD5_System_GetNumNestedPlugins(this.handle, handle, out count);
- }
- public RESULT getNestedPlugin(uint handle, int index, out uint nestedhandle)
- {
- return FMOD5_System_GetNestedPlugin(this.handle, handle, index, out nestedhandle);
- }
- public RESULT getNumPlugins(PLUGINTYPE plugintype, out int numplugins)
- {
- return FMOD5_System_GetNumPlugins(this.handle, plugintype, out numplugins);
- }
- public RESULT getPluginHandle(PLUGINTYPE plugintype, int index, out uint handle)
- {
- return FMOD5_System_GetPluginHandle(this.handle, plugintype, index, out handle);
- }
- public RESULT getPluginInfo(uint handle, out PLUGINTYPE plugintype, out string name, int namelen, out uint version)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_System_GetPluginInfo(this.handle, handle, out plugintype, stringMem, namelen, out version);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getPluginInfo(uint handle, out PLUGINTYPE plugintype, out uint version)
- {
- return FMOD5_System_GetPluginInfo(this.handle, handle, out plugintype, IntPtr.Zero, 0, out version);
- }
- public RESULT setOutputByPlugin(uint handle)
- {
- return FMOD5_System_SetOutputByPlugin(this.handle, handle);
- }
- public RESULT getOutputByPlugin(out uint handle)
- {
- return FMOD5_System_GetOutputByPlugin(this.handle, out handle);
- }
- public RESULT createDSPByPlugin(uint handle, out DSP dsp)
- {
- return FMOD5_System_CreateDSPByPlugin(this.handle, handle, out dsp.handle);
- }
- public RESULT getDSPInfoByPlugin(uint handle, out IntPtr description)
- {
- return FMOD5_System_GetDSPInfoByPlugin(this.handle, handle, out description);
- }
- /*
- public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority)
- public RESULT registerCodec (ref CODEC_DESCRIPTION description, out uint handle, uint priority = 0)
- public RESULT registerCodec(ref CODEC_DESCRIPTION description, out uint handle, uint priority)
- {
- return FMOD5_System_RegisterCodec(this.handle, ref description, out handle, priority);
- }
- */
- public RESULT registerDSP(ref DSP_DESCRIPTION description, out uint handle)
- {
- return FMOD5_System_RegisterDSP(this.handle, ref description, out handle);
- }
- /*
- public RESULT registerOutput(ref OUTPUT_DESCRIPTION description, out uint handle)
- {
- return FMOD5_System_RegisterOutput(this.handle, ref description, out handle);
- }
- */
-
- // Init/Close.
- public RESULT init(int maxchannels, INITFLAGS flags, IntPtr extradriverdata)
- {
- return FMOD5_System_Init(this.handle, maxchannels, flags, extradriverdata);
- }
- public RESULT close()
- {
- return FMOD5_System_Close(this.handle);
- }
-
- // General post-init system functions.
- public RESULT update()
- {
- return FMOD5_System_Update(this.handle);
- }
- public RESULT setSpeakerPosition(SPEAKER speaker, float x, float y, bool active)
- {
- return FMOD5_System_SetSpeakerPosition(this.handle, speaker, x, y, active);
- }
- public RESULT getSpeakerPosition(SPEAKER speaker, out float x, out float y, out bool active)
- {
- return FMOD5_System_GetSpeakerPosition(this.handle, speaker, out x, out y, out active);
- }
- public RESULT setStreamBufferSize(uint filebuffersize, TIMEUNIT filebuffersizetype)
- {
- return FMOD5_System_SetStreamBufferSize(this.handle, filebuffersize, filebuffersizetype);
- }
- public RESULT getStreamBufferSize(out uint filebuffersize, out TIMEUNIT filebuffersizetype)
- {
- return FMOD5_System_GetStreamBufferSize(this.handle, out filebuffersize, out filebuffersizetype);
- }
- public RESULT set3DSettings(float dopplerscale, float distancefactor, float rolloffscale)
- {
- return FMOD5_System_Set3DSettings(this.handle, dopplerscale, distancefactor, rolloffscale);
- }
- public RESULT get3DSettings(out float dopplerscale, out float distancefactor, out float rolloffscale)
- {
- return FMOD5_System_Get3DSettings(this.handle, out dopplerscale, out distancefactor, out rolloffscale);
- }
- public RESULT set3DNumListeners(int numlisteners)
- {
- return FMOD5_System_Set3DNumListeners(this.handle, numlisteners);
- }
- public RESULT get3DNumListeners(out int numlisteners)
- {
- return FMOD5_System_Get3DNumListeners(this.handle, out numlisteners);
- }
- public RESULT set3DListenerAttributes(int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up)
- {
- return FMOD5_System_Set3DListenerAttributes(this.handle, listener, ref pos, ref vel, ref forward, ref up);
- }
- public RESULT get3DListenerAttributes(int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up)
- {
- return FMOD5_System_Get3DListenerAttributes(this.handle, listener, out pos, out vel, out forward, out up);
- }
- public RESULT set3DRolloffCallback(CB_3D_ROLLOFF_CALLBACK callback)
- {
- return FMOD5_System_Set3DRolloffCallback(this.handle, callback);
- }
- public RESULT mixerSuspend()
- {
- return FMOD5_System_MixerSuspend(this.handle);
- }
- public RESULT mixerResume()
- {
- return FMOD5_System_MixerResume(this.handle);
- }
- public RESULT getDefaultMixMatrix(SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop)
- {
- return FMOD5_System_GetDefaultMixMatrix(this.handle, sourcespeakermode, targetspeakermode, matrix, matrixhop);
- }
- public RESULT getSpeakerModeChannels(SPEAKERMODE mode, out int channels)
- {
- return FMOD5_System_GetSpeakerModeChannels(this.handle, mode, out channels);
- }
-
- // System information functions.
- public RESULT getVersion(out uint version)
- {
- return FMOD5_System_GetVersion(this.handle, out version);
- }
- public RESULT getOutputHandle(out IntPtr handle)
- {
- return FMOD5_System_GetOutputHandle(this.handle, out handle);
- }
- public RESULT getChannelsPlaying(out int channels)
- {
- return FMOD5_System_GetChannelsPlaying(this.handle, out channels, IntPtr.Zero);
- }
- public RESULT getChannelsPlaying(out int channels, out int realchannels)
- {
- return FMOD5_System_GetChannelsPlaying(this.handle, out channels, out realchannels);
- }
- public RESULT getCPUUsage(out float dsp, out float stream, out float geometry, out float update, out float total)
- {
- return FMOD5_System_GetCPUUsage(this.handle, out dsp, out stream, out geometry, out update, out total);
- }
- public RESULT getFileUsage(out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead)
- {
- return FMOD5_System_GetFileUsage(this.handle, out sampleBytesRead, out streamBytesRead, out otherBytesRead);
- }
-
- // Sound/DSP/Channel/FX creation and retrieval.
- public RESULT createSound(string name, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_CreateSound(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle);
- }
- }
- public RESULT createSound(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- return FMOD5_System_CreateSound(this.handle, data, mode, ref exinfo, out sound.handle);
- }
- public RESULT createSound(IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- return FMOD5_System_CreateSound(this.handle, name_or_data, mode, ref exinfo, out sound.handle);
- }
- public RESULT createSound(string name, MODE mode, out Sound sound)
- {
- CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
- exinfo.cbsize = Marshal.SizeOf(exinfo);
-
- return createSound(name, mode, ref exinfo, out sound);
- }
- public RESULT createStream(string name, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_CreateStream(this.handle, encoder.byteFromStringUTF8(name), mode, ref exinfo, out sound.handle);
- }
- }
- public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- return FMOD5_System_CreateStream(this.handle, data, mode, ref exinfo, out sound.handle);
- }
- public RESULT createStream(IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out Sound sound)
- {
- return FMOD5_System_CreateStream(this.handle, name_or_data, mode, ref exinfo, out sound.handle);
- }
- public RESULT createStream(string name, MODE mode, out Sound sound)
- {
- CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
- exinfo.cbsize = Marshal.SizeOf(exinfo);
-
- return createStream(name, mode, ref exinfo, out sound);
- }
- public RESULT createDSP(ref DSP_DESCRIPTION description, out DSP dsp)
- {
- return FMOD5_System_CreateDSP(this.handle, ref description, out dsp.handle);
- }
- public RESULT createDSPByType(DSP_TYPE type, out DSP dsp)
- {
- return FMOD5_System_CreateDSPByType(this.handle, type, out dsp.handle);
- }
- public RESULT createChannelGroup(string name, out ChannelGroup channelgroup)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_CreateChannelGroup(this.handle, encoder.byteFromStringUTF8(name), out channelgroup.handle);
- }
- }
- public RESULT createSoundGroup(string name, out SoundGroup soundgroup)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_CreateSoundGroup(this.handle, encoder.byteFromStringUTF8(name), out soundgroup.handle);
- }
- }
- public RESULT createReverb3D(out Reverb3D reverb)
- {
- return FMOD5_System_CreateReverb3D(this.handle, out reverb.handle);
- }
- public RESULT playSound(Sound sound, ChannelGroup channelgroup, bool paused, out Channel channel)
- {
- return FMOD5_System_PlaySound(this.handle, sound.handle, channelgroup.handle, paused, out channel.handle);
- }
- public RESULT playDSP(DSP dsp, ChannelGroup channelgroup, bool paused, out Channel channel)
- {
- return FMOD5_System_PlayDSP(this.handle, dsp.handle, channelgroup.handle, paused, out channel.handle);
- }
- public RESULT getChannel(int channelid, out Channel channel)
- {
- return FMOD5_System_GetChannel(this.handle, channelid, out channel.handle);
- }
- public RESULT getMasterChannelGroup(out ChannelGroup channelgroup)
- {
- return FMOD5_System_GetMasterChannelGroup(this.handle, out channelgroup.handle);
- }
- public RESULT getMasterSoundGroup(out SoundGroup soundgroup)
- {
- return FMOD5_System_GetMasterSoundGroup(this.handle, out soundgroup.handle);
- }
-
- // Routing to ports.
- public RESULT attachChannelGroupToPort(uint portType, ulong portIndex, ChannelGroup channelgroup, bool passThru = false)
- {
- return FMOD5_System_AttachChannelGroupToPort(this.handle, portType, portIndex, channelgroup.handle, passThru);
- }
- public RESULT detachChannelGroupFromPort(ChannelGroup channelgroup)
- {
- return FMOD5_System_DetachChannelGroupFromPort(this.handle, channelgroup.handle);
- }
-
- // Reverb api.
- public RESULT setReverbProperties(int instance, ref REVERB_PROPERTIES prop)
- {
- return FMOD5_System_SetReverbProperties(this.handle, instance, ref prop);
- }
- public RESULT getReverbProperties(int instance, out REVERB_PROPERTIES prop)
- {
- return FMOD5_System_GetReverbProperties(this.handle, instance, out prop);
- }
-
- // System level DSP functionality.
- public RESULT lockDSP()
- {
- return FMOD5_System_LockDSP(this.handle);
- }
- public RESULT unlockDSP()
- {
- return FMOD5_System_UnlockDSP(this.handle);
- }
-
- // Recording api
- public RESULT getRecordNumDrivers(out int numdrivers, out int numconnected)
- {
- return FMOD5_System_GetRecordNumDrivers(this.handle, out numdrivers, out numconnected);
- }
- public RESULT getRecordDriverInfo(int id, out string name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_System_GetRecordDriverInfo(this.handle, id, stringMem, namelen, out guid, out systemrate, out speakermode, out speakermodechannels, out state);
-
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getRecordDriverInfo(int id, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state)
- {
- return FMOD5_System_GetRecordDriverInfo(this.handle, id, IntPtr.Zero, 0, out guid, out systemrate, out speakermode, out speakermodechannels, out state);
- }
- public RESULT getRecordPosition(int id, out uint position)
- {
- return FMOD5_System_GetRecordPosition(this.handle, id, out position);
- }
- public RESULT recordStart(int id, Sound sound, bool loop)
- {
- return FMOD5_System_RecordStart(this.handle, id, sound.handle, loop);
- }
- public RESULT recordStop(int id)
- {
- return FMOD5_System_RecordStop(this.handle, id);
- }
- public RESULT isRecording(int id, out bool recording)
- {
- return FMOD5_System_IsRecording(this.handle, id, out recording);
- }
-
- // Geometry api
- public RESULT createGeometry(int maxpolygons, int maxvertices, out Geometry geometry)
- {
- return FMOD5_System_CreateGeometry(this.handle, maxpolygons, maxvertices, out geometry.handle);
- }
- public RESULT setGeometrySettings(float maxworldsize)
- {
- return FMOD5_System_SetGeometrySettings(this.handle, maxworldsize);
- }
- public RESULT getGeometrySettings(out float maxworldsize)
- {
- return FMOD5_System_GetGeometrySettings(this.handle, out maxworldsize);
- }
- public RESULT loadGeometry(IntPtr data, int datasize, out Geometry geometry)
- {
- return FMOD5_System_LoadGeometry(this.handle, data, datasize, out geometry.handle);
- }
- public RESULT getGeometryOcclusion(ref VECTOR listener, ref VECTOR source, out float direct, out float reverb)
- {
- return FMOD5_System_GetGeometryOcclusion(this.handle, ref listener, ref source, out direct, out reverb);
- }
-
- // Network functions
- public RESULT setNetworkProxy(string proxy)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_System_SetNetworkProxy(this.handle, encoder.byteFromStringUTF8(proxy));
- }
- }
- public RESULT getNetworkProxy(out string proxy, int proxylen)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(proxylen);
-
- RESULT result = FMOD5_System_GetNetworkProxy(this.handle, stringMem, proxylen);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- proxy = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT setNetworkTimeout(int timeout)
- {
- return FMOD5_System_SetNetworkTimeout(this.handle, timeout);
- }
- public RESULT getNetworkTimeout(out int timeout)
- {
- return FMOD5_System_GetNetworkTimeout(this.handle, out timeout);
- }
-
- // Userdata set/get
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_System_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_System_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Release (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetOutput (IntPtr system, OUTPUTTYPE output);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetOutput (IntPtr system, out OUTPUTTYPE output);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNumDrivers (IntPtr system, out int numdrivers);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetDriverInfo (IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetDriver (IntPtr system, int driver);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetDriver (IntPtr system, out int driver);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetSoftwareChannels (IntPtr system, int numsoftwarechannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetSoftwareChannels (IntPtr system, out int numsoftwarechannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetSoftwareFormat (IntPtr system, int samplerate, SPEAKERMODE speakermode, int numrawspeakers);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetSoftwareFormat (IntPtr system, out int samplerate, out SPEAKERMODE speakermode, out int numrawspeakers);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetDSPBufferSize (IntPtr system, uint bufferlength, int numbuffers);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetDSPBufferSize (IntPtr system, out uint bufferlength, out int numbuffers);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetFileSystem (IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek, FILE_ASYNCREAD_CALLBACK userasyncread, FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_AttachFileSystem (IntPtr system, FILE_OPEN_CALLBACK useropen, FILE_CLOSE_CALLBACK userclose, FILE_READ_CALLBACK userread, FILE_SEEK_CALLBACK userseek);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetAdvancedSettings (IntPtr system, ref ADVANCEDSETTINGS settings);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetAdvancedSettings (IntPtr system, ref ADVANCEDSETTINGS settings);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetCallback (IntPtr system, SYSTEM_CALLBACK callback, SYSTEM_CALLBACK_TYPE callbackmask);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetPluginPath (IntPtr system, byte[] path);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_LoadPlugin (IntPtr system, byte[] filename, out uint handle, uint priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_UnloadPlugin (IntPtr system, uint handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNumNestedPlugins (IntPtr system, uint handle, out int count);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNestedPlugin (IntPtr system, uint handle, int index, out uint nestedhandle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNumPlugins (IntPtr system, PLUGINTYPE plugintype, out int numplugins);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetPluginHandle (IntPtr system, PLUGINTYPE plugintype, int index, out uint handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetPluginInfo (IntPtr system, uint handle, out PLUGINTYPE plugintype, IntPtr name, int namelen, out uint version);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetOutputByPlugin (IntPtr system, uint handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetOutputByPlugin (IntPtr system, out uint handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateDSPByPlugin (IntPtr system, uint handle, out IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetDSPInfoByPlugin (IntPtr system, uint handle, out IntPtr description);
- //[DllImport(VERSION.dll)]
- //private static extern RESULT FMOD5_System_RegisterCodec (IntPtr system, out CODEC_DESCRIPTION description, out uint handle, uint priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_RegisterDSP (IntPtr system, ref DSP_DESCRIPTION description, out uint handle);
- //[DllImport(VERSION.dll)]
- //private static extern RESULT FMOD5_System_RegisterOutput (IntPtr system, ref OUTPUT_DESCRIPTION description, out uint handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Init (IntPtr system, int maxchannels, INITFLAGS flags, IntPtr extradriverdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Close (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Update (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetSpeakerPosition (IntPtr system, SPEAKER speaker, float x, float y, bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetSpeakerPosition (IntPtr system, SPEAKER speaker, out float x, out float y, out bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetStreamBufferSize (IntPtr system, uint filebuffersize, TIMEUNIT filebuffersizetype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetStreamBufferSize (IntPtr system, out uint filebuffersize, out TIMEUNIT filebuffersizetype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Set3DSettings (IntPtr system, float dopplerscale, float distancefactor, float rolloffscale);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Get3DSettings (IntPtr system, out float dopplerscale, out float distancefactor, out float rolloffscale);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Set3DNumListeners (IntPtr system, int numlisteners);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Get3DNumListeners (IntPtr system, out int numlisteners);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Set3DListenerAttributes (IntPtr system, int listener, ref VECTOR pos, ref VECTOR vel, ref VECTOR forward, ref VECTOR up);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Get3DListenerAttributes (IntPtr system, int listener, out VECTOR pos, out VECTOR vel, out VECTOR forward, out VECTOR up);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_Set3DRolloffCallback (IntPtr system, CB_3D_ROLLOFF_CALLBACK callback);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_MixerSuspend (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_MixerResume (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetDefaultMixMatrix (IntPtr system, SPEAKERMODE sourcespeakermode, SPEAKERMODE targetspeakermode, float[] matrix, int matrixhop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetSpeakerModeChannels (IntPtr system, SPEAKERMODE mode, out int channels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetVersion (IntPtr system, out uint version);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetOutputHandle (IntPtr system, out IntPtr handle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, IntPtr zero);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetChannelsPlaying (IntPtr system, out int channels, out int realchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetCPUUsage (IntPtr system, out float dsp, out float stream, out float geometry, out float update, out float total);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetFileUsage (IntPtr system, out Int64 sampleBytesRead, out Int64 streamBytesRead, out Int64 otherBytesRead);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateSound (IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateSound (IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateStream (IntPtr system, byte[] name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateStream (IntPtr system, IntPtr name_or_data, MODE mode, ref CREATESOUNDEXINFO exinfo, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateDSP (IntPtr system, ref DSP_DESCRIPTION description, out IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateDSPByType (IntPtr system, DSP_TYPE type, out IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateChannelGroup (IntPtr system, byte[] name, out IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateSoundGroup (IntPtr system, byte[] name, out IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateReverb3D (IntPtr system, out IntPtr reverb);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_PlaySound (IntPtr system, IntPtr sound, IntPtr channelgroup, bool paused, out IntPtr channel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_PlayDSP (IntPtr system, IntPtr dsp, IntPtr channelgroup, bool paused, out IntPtr channel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetChannel (IntPtr system, int channelid, out IntPtr channel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetMasterChannelGroup (IntPtr system, out IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetMasterSoundGroup (IntPtr system, out IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_AttachChannelGroupToPort (IntPtr system, uint portType, ulong portIndex, IntPtr channelgroup, bool passThru);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_DetachChannelGroupFromPort(IntPtr system, IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetReverbProperties (IntPtr system, int instance, ref REVERB_PROPERTIES prop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetReverbProperties (IntPtr system, int instance, out REVERB_PROPERTIES prop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_LockDSP (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_UnlockDSP (IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetRecordNumDrivers (IntPtr system, out int numdrivers, out int numconnected);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetRecordDriverInfo (IntPtr system, int id, IntPtr name, int namelen, out Guid guid, out int systemrate, out SPEAKERMODE speakermode, out int speakermodechannels, out DRIVER_STATE state);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetRecordPosition (IntPtr system, int id, out uint position);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_RecordStart (IntPtr system, int id, IntPtr sound, bool loop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_RecordStop (IntPtr system, int id);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_IsRecording (IntPtr system, int id, out bool recording);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_CreateGeometry (IntPtr system, int maxpolygons, int maxvertices, out IntPtr geometry);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetGeometrySettings (IntPtr system, float maxworldsize);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetGeometrySettings (IntPtr system, out float maxworldsize);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_LoadGeometry (IntPtr system, IntPtr data, int datasize, out IntPtr geometry);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetGeometryOcclusion (IntPtr system, ref VECTOR listener, ref VECTOR source, out float direct, out float reverb);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetNetworkProxy (IntPtr system, byte[] proxy);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNetworkProxy (IntPtr system, IntPtr proxy, int proxylen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetNetworkTimeout (IntPtr system, int timeout);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetNetworkTimeout (IntPtr system, out int timeout);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_SetUserData (IntPtr system, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_System_GetUserData (IntPtr system, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
-
- /*
- 'Sound' API.
- */
- public struct Sound
- {
- public RESULT release()
- {
- return FMOD5_Sound_Release(this.handle);
- }
- public RESULT getSystemObject(out System system)
- {
- return FMOD5_Sound_GetSystemObject(this.handle, out system.handle);
- }
-
- // Standard sound manipulation functions.
- public RESULT @lock(uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2)
- {
- return FMOD5_Sound_Lock(this.handle, offset, length, out ptr1, out ptr2, out len1, out len2);
- }
- public RESULT unlock(IntPtr ptr1, IntPtr ptr2, uint len1, uint len2)
- {
- return FMOD5_Sound_Unlock(this.handle, ptr1, ptr2, len1, len2);
- }
- public RESULT setDefaults(float frequency, int priority)
- {
- return FMOD5_Sound_SetDefaults(this.handle, frequency, priority);
- }
- public RESULT getDefaults(out float frequency, out int priority)
- {
- return FMOD5_Sound_GetDefaults(this.handle, out frequency, out priority);
- }
- public RESULT set3DMinMaxDistance(float min, float max)
- {
- return FMOD5_Sound_Set3DMinMaxDistance(this.handle, min, max);
- }
- public RESULT get3DMinMaxDistance(out float min, out float max)
- {
- return FMOD5_Sound_Get3DMinMaxDistance(this.handle, out min, out max);
- }
- public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
- {
- return FMOD5_Sound_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
- }
- public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
- {
- return FMOD5_Sound_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
- }
- public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
- {
- return FMOD5_Sound_Set3DCustomRolloff(this.handle, ref points, numpoints);
- }
- public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
- {
- return FMOD5_Sound_Get3DCustomRolloff(this.handle, out points, out numpoints);
- }
-
- public RESULT getSubSound(int index, out Sound subsound)
- {
- return FMOD5_Sound_GetSubSound(this.handle, index, out subsound.handle);
- }
- public RESULT getSubSoundParent(out Sound parentsound)
- {
- return FMOD5_Sound_GetSubSoundParent(this.handle, out parentsound.handle);
- }
- public RESULT getName(out string name, int namelen)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_Sound_GetName(this.handle, stringMem, namelen);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getLength(out uint length, TIMEUNIT lengthtype)
- {
- return FMOD5_Sound_GetLength(this.handle, out length, lengthtype);
- }
- public RESULT getFormat(out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits)
- {
- return FMOD5_Sound_GetFormat(this.handle, out type, out format, out channels, out bits);
- }
- public RESULT getNumSubSounds(out int numsubsounds)
- {
- return FMOD5_Sound_GetNumSubSounds(this.handle, out numsubsounds);
- }
- public RESULT getNumTags(out int numtags, out int numtagsupdated)
- {
- return FMOD5_Sound_GetNumTags(this.handle, out numtags, out numtagsupdated);
- }
- public RESULT getTag(string name, int index, out TAG tag)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_Sound_GetTag(this.handle, encoder.byteFromStringUTF8(name), index, out tag);
- }
- }
- public RESULT getOpenState(out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy)
- {
- return FMOD5_Sound_GetOpenState(this.handle, out openstate, out percentbuffered, out starving, out diskbusy);
- }
- public RESULT readData(IntPtr buffer, uint length, out uint read)
- {
- return FMOD5_Sound_ReadData(this.handle, buffer, length, out read);
- }
- public RESULT seekData(uint pcm)
- {
- return FMOD5_Sound_SeekData(this.handle, pcm);
- }
- public RESULT setSoundGroup(SoundGroup soundgroup)
- {
- return FMOD5_Sound_SetSoundGroup(this.handle, soundgroup.handle);
- }
- public RESULT getSoundGroup(out SoundGroup soundgroup)
- {
- return FMOD5_Sound_GetSoundGroup(this.handle, out soundgroup.handle);
- }
-
- // Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks.
- public RESULT getNumSyncPoints(out int numsyncpoints)
- {
- return FMOD5_Sound_GetNumSyncPoints(this.handle, out numsyncpoints);
- }
- public RESULT getSyncPoint(int index, out IntPtr point)
- {
- return FMOD5_Sound_GetSyncPoint(this.handle, index, out point);
- }
- public RESULT getSyncPointInfo(IntPtr point, out string name, int namelen, out uint offset, TIMEUNIT offsettype)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_Sound_GetSyncPointInfo(this.handle, point, stringMem, namelen, out offset, offsettype);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getSyncPointInfo(IntPtr point, out uint offset, TIMEUNIT offsettype)
- {
- return FMOD5_Sound_GetSyncPointInfo(this.handle, point, IntPtr.Zero, 0, out offset, offsettype);
- }
- public RESULT addSyncPoint(uint offset, TIMEUNIT offsettype, string name, out IntPtr point)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return FMOD5_Sound_AddSyncPoint(this.handle, offset, offsettype, encoder.byteFromStringUTF8(name), out point);
- }
- }
- public RESULT deleteSyncPoint(IntPtr point)
- {
- return FMOD5_Sound_DeleteSyncPoint(this.handle, point);
- }
-
- // Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time.
- public RESULT setMode(MODE mode)
- {
- return FMOD5_Sound_SetMode(this.handle, mode);
- }
- public RESULT getMode(out MODE mode)
- {
- return FMOD5_Sound_GetMode(this.handle, out mode);
- }
- public RESULT setLoopCount(int loopcount)
- {
- return FMOD5_Sound_SetLoopCount(this.handle, loopcount);
- }
- public RESULT getLoopCount(out int loopcount)
- {
- return FMOD5_Sound_GetLoopCount(this.handle, out loopcount);
- }
- public RESULT setLoopPoints(uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype)
- {
- return FMOD5_Sound_SetLoopPoints(this.handle, loopstart, loopstarttype, loopend, loopendtype);
- }
- public RESULT getLoopPoints(out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype)
- {
- return FMOD5_Sound_GetLoopPoints(this.handle, out loopstart, loopstarttype, out loopend, loopendtype);
- }
-
- // For MOD/S3M/XM/IT/MID sequenced formats only.
- public RESULT getMusicNumChannels(out int numchannels)
- {
- return FMOD5_Sound_GetMusicNumChannels(this.handle, out numchannels);
- }
- public RESULT setMusicChannelVolume(int channel, float volume)
- {
- return FMOD5_Sound_SetMusicChannelVolume(this.handle, channel, volume);
- }
- public RESULT getMusicChannelVolume(int channel, out float volume)
- {
- return FMOD5_Sound_GetMusicChannelVolume(this.handle, channel, out volume);
- }
- public RESULT setMusicSpeed(float speed)
- {
- return FMOD5_Sound_SetMusicSpeed(this.handle, speed);
- }
- public RESULT getMusicSpeed(out float speed)
- {
- return FMOD5_Sound_GetMusicSpeed(this.handle, out speed);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_Sound_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_Sound_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Release (IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSystemObject (IntPtr sound, out IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Lock (IntPtr sound, uint offset, uint length, out IntPtr ptr1, out IntPtr ptr2, out uint len1, out uint len2);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Unlock (IntPtr sound, IntPtr ptr1, IntPtr ptr2, uint len1, uint len2);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetDefaults (IntPtr sound, float frequency, int priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetDefaults (IntPtr sound, out float frequency, out int priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Set3DMinMaxDistance (IntPtr sound, float min, float max);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Get3DMinMaxDistance (IntPtr sound, out float min, out float max);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Set3DConeSettings (IntPtr sound, float insideconeangle, float outsideconeangle, float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Get3DConeSettings (IntPtr sound, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Set3DCustomRolloff (IntPtr sound, ref VECTOR points, int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_Get3DCustomRolloff (IntPtr sound, out IntPtr points, out int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSubSound (IntPtr sound, int index, out IntPtr subsound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSubSoundParent (IntPtr sound, out IntPtr parentsound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetName (IntPtr sound, IntPtr name, int namelen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetLength (IntPtr sound, out uint length, TIMEUNIT lengthtype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetFormat (IntPtr sound, out SOUND_TYPE type, out SOUND_FORMAT format, out int channels, out int bits);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetNumSubSounds (IntPtr sound, out int numsubsounds);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetNumTags (IntPtr sound, out int numtags, out int numtagsupdated);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetTag (IntPtr sound, byte[] name, int index, out TAG tag);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetOpenState (IntPtr sound, out OPENSTATE openstate, out uint percentbuffered, out bool starving, out bool diskbusy);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_ReadData (IntPtr sound, IntPtr buffer, uint length, out uint read);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SeekData (IntPtr sound, uint pcm);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetSoundGroup (IntPtr sound, IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSoundGroup (IntPtr sound, out IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetNumSyncPoints (IntPtr sound, out int numsyncpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSyncPoint (IntPtr sound, int index, out IntPtr point);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetSyncPointInfo (IntPtr sound, IntPtr point, IntPtr name, int namelen, out uint offset, TIMEUNIT offsettype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_AddSyncPoint (IntPtr sound, uint offset, TIMEUNIT offsettype, byte[] name, out IntPtr point);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_DeleteSyncPoint (IntPtr sound, IntPtr point);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetMode (IntPtr sound, MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetMode (IntPtr sound, out MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetLoopCount (IntPtr sound, int loopcount);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetLoopCount (IntPtr sound, out int loopcount);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetLoopPoints (IntPtr sound, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetLoopPoints (IntPtr sound, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetMusicNumChannels (IntPtr sound, out int numchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetMusicChannelVolume (IntPtr sound, int channel, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetMusicChannelVolume (IntPtr sound, int channel, out float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetMusicSpeed (IntPtr sound, float speed);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetMusicSpeed (IntPtr sound, out float speed);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_SetUserData (IntPtr sound, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Sound_GetUserData (IntPtr sound, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'ChannelControl' API
- */
- interface IChannelControl
- {
- RESULT getSystemObject (out System system);
-
- // General control functionality for Channels and ChannelGroups.
- RESULT stop ();
- RESULT setPaused (bool paused);
- RESULT getPaused (out bool paused);
- RESULT setVolume (float volume);
- RESULT getVolume (out float volume);
- RESULT setVolumeRamp (bool ramp);
- RESULT getVolumeRamp (out bool ramp);
- RESULT getAudibility (out float audibility);
- RESULT setPitch (float pitch);
- RESULT getPitch (out float pitch);
- RESULT setMute (bool mute);
- RESULT getMute (out bool mute);
- RESULT setReverbProperties (int instance, float wet);
- RESULT getReverbProperties (int instance, out float wet);
- RESULT setLowPassGain (float gain);
- RESULT getLowPassGain (out float gain);
- RESULT setMode (MODE mode);
- RESULT getMode (out MODE mode);
- RESULT setCallback (CHANNELCONTROL_CALLBACK callback);
- RESULT isPlaying (out bool isplaying);
-
- // Panning and level adjustment.
- RESULT setPan (float pan);
- RESULT setMixLevelsOutput (float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
- RESULT setMixLevelsInput (float[] levels, int numlevels);
- RESULT setMixMatrix (float[] matrix, int outchannels, int inchannels, int inchannel_hop);
- RESULT getMixMatrix (float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
-
- // Clock based functionality.
- RESULT getDSPClock (out ulong dspclock, out ulong parentclock);
- RESULT setDelay (ulong dspclock_start, ulong dspclock_end, bool stopchannels);
- RESULT getDelay (out ulong dspclock_start, out ulong dspclock_end);
- RESULT getDelay (out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
- RESULT addFadePoint (ulong dspclock, float volume);
- RESULT setFadePointRamp (ulong dspclock, float volume);
- RESULT removeFadePoints (ulong dspclock_start, ulong dspclock_end);
- RESULT getFadePoints (ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
-
- // DSP effects.
- RESULT getDSP (int index, out DSP dsp);
- RESULT addDSP (int index, DSP dsp);
- RESULT removeDSP (DSP dsp);
- RESULT getNumDSPs (out int numdsps);
- RESULT setDSPIndex (DSP dsp, int index);
- RESULT getDSPIndex (DSP dsp, out int index);
-
- // 3D functionality.
- RESULT set3DAttributes (ref VECTOR pos, ref VECTOR vel);
- RESULT get3DAttributes (out VECTOR pos, out VECTOR vel);
- RESULT set3DMinMaxDistance (float mindistance, float maxdistance);
- RESULT get3DMinMaxDistance (out float mindistance, out float maxdistance);
- RESULT set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume);
- RESULT get3DConeSettings (out float insideconeangle, out float outsideconeangle, out float outsidevolume);
- RESULT set3DConeOrientation (ref VECTOR orientation);
- RESULT get3DConeOrientation (out VECTOR orientation);
- RESULT set3DCustomRolloff (ref VECTOR points, int numpoints);
- RESULT get3DCustomRolloff (out IntPtr points, out int numpoints);
- RESULT set3DOcclusion (float directocclusion, float reverbocclusion);
- RESULT get3DOcclusion (out float directocclusion, out float reverbocclusion);
- RESULT set3DSpread (float angle);
- RESULT get3DSpread (out float angle);
- RESULT set3DLevel (float level);
- RESULT get3DLevel (out float level);
- RESULT set3DDopplerLevel (float level);
- RESULT get3DDopplerLevel (out float level);
- RESULT set3DDistanceFilter (bool custom, float customLevel, float centerFreq);
- RESULT get3DDistanceFilter (out bool custom, out float customLevel, out float centerFreq);
-
- // Userdata set/get.
- RESULT setUserData (IntPtr userdata);
- RESULT getUserData (out IntPtr userdata);
- }
-
- /*
- 'Channel' API
- */
- public struct Channel : IChannelControl
- {
- // Channel specific control functionality.
- public RESULT setFrequency(float frequency)
- {
- return FMOD5_Channel_SetFrequency(this.handle, frequency);
- }
- public RESULT getFrequency(out float frequency)
- {
- return FMOD5_Channel_GetFrequency(this.handle, out frequency);
- }
- public RESULT setPriority(int priority)
- {
- return FMOD5_Channel_SetPriority(this.handle, priority);
- }
- public RESULT getPriority(out int priority)
- {
- return FMOD5_Channel_GetPriority(this.handle, out priority);
- }
- public RESULT setPosition(uint position, TIMEUNIT postype)
- {
- return FMOD5_Channel_SetPosition(this.handle, position, postype);
- }
- public RESULT getPosition(out uint position, TIMEUNIT postype)
- {
- return FMOD5_Channel_GetPosition(this.handle, out position, postype);
- }
- public RESULT setChannelGroup(ChannelGroup channelgroup)
- {
- return FMOD5_Channel_SetChannelGroup(this.handle, channelgroup.handle);
- }
- public RESULT getChannelGroup(out ChannelGroup channelgroup)
- {
- return FMOD5_Channel_GetChannelGroup(this.handle, out channelgroup.handle);
- }
- public RESULT setLoopCount(int loopcount)
- {
- return FMOD5_Channel_SetLoopCount(this.handle, loopcount);
- }
- public RESULT getLoopCount(out int loopcount)
- {
- return FMOD5_Channel_GetLoopCount(this.handle, out loopcount);
- }
- public RESULT setLoopPoints(uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype)
- {
- return FMOD5_Channel_SetLoopPoints(this.handle, loopstart, loopstarttype, loopend, loopendtype);
- }
- public RESULT getLoopPoints(out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype)
- {
- return FMOD5_Channel_GetLoopPoints(this.handle, out loopstart, loopstarttype, out loopend, loopendtype);
- }
-
- // Information only functions.
- public RESULT isVirtual(out bool isvirtual)
- {
- return FMOD5_Channel_IsVirtual(this.handle, out isvirtual);
- }
- public RESULT getCurrentSound(out Sound sound)
- {
- return FMOD5_Channel_GetCurrentSound(this.handle, out sound.handle);
- }
- public RESULT getIndex(out int index)
- {
- return FMOD5_Channel_GetIndex(this.handle, out index);
- }
- public RESULT getSystemObject(out System system)
- {
- return FMOD5_Channel_GetSystemObject(this.handle, out system.handle);
- }
-
- // General control functionality for Channels and ChannelGroups.
- public RESULT stop()
- {
- return FMOD5_Channel_Stop(this.handle);
- }
- public RESULT setPaused(bool paused)
- {
- return FMOD5_Channel_SetPaused(this.handle, paused);
- }
- public RESULT getPaused(out bool paused)
- {
- return FMOD5_Channel_GetPaused(this.handle, out paused);
- }
- public RESULT setVolume(float volume)
- {
- return FMOD5_Channel_SetVolume(this.handle, volume);
- }
- public RESULT getVolume(out float volume)
- {
- return FMOD5_Channel_GetVolume(this.handle, out volume);
- }
- public RESULT setVolumeRamp(bool ramp)
- {
- return FMOD5_Channel_SetVolumeRamp(this.handle, ramp);
- }
- public RESULT getVolumeRamp(out bool ramp)
- {
- return FMOD5_Channel_GetVolumeRamp(this.handle, out ramp);
- }
- public RESULT getAudibility(out float audibility)
- {
- return FMOD5_Channel_GetAudibility(this.handle, out audibility);
- }
- public RESULT setPitch(float pitch)
- {
- return FMOD5_Channel_SetPitch(this.handle, pitch);
- }
- public RESULT getPitch(out float pitch)
- {
- return FMOD5_Channel_GetPitch(this.handle, out pitch);
- }
- public RESULT setMute(bool mute)
- {
- return FMOD5_Channel_SetMute(this.handle, mute);
- }
- public RESULT getMute(out bool mute)
- {
- return FMOD5_Channel_GetMute(this.handle, out mute);
- }
- public RESULT setReverbProperties(int instance, float wet)
- {
- return FMOD5_Channel_SetReverbProperties(this.handle, instance, wet);
- }
- public RESULT getReverbProperties(int instance, out float wet)
- {
- return FMOD5_Channel_GetReverbProperties(this.handle, instance, out wet);
- }
- public RESULT setLowPassGain(float gain)
- {
- return FMOD5_Channel_SetLowPassGain(this.handle, gain);
- }
- public RESULT getLowPassGain(out float gain)
- {
- return FMOD5_Channel_GetLowPassGain(this.handle, out gain);
- }
- public RESULT setMode(MODE mode)
- {
- return FMOD5_Channel_SetMode(this.handle, mode);
- }
- public RESULT getMode(out MODE mode)
- {
- return FMOD5_Channel_GetMode(this.handle, out mode);
- }
- public RESULT setCallback(CHANNELCONTROL_CALLBACK callback)
- {
- return FMOD5_Channel_SetCallback(this.handle, callback);
- }
- public RESULT isPlaying(out bool isplaying)
- {
- return FMOD5_Channel_IsPlaying(this.handle, out isplaying);
- }
-
- // Panning and level adjustment.
- public RESULT setPan(float pan)
- {
- return FMOD5_Channel_SetPan(this.handle, pan);
- }
- public RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright)
- {
- return FMOD5_Channel_SetMixLevelsOutput(this.handle, frontleft, frontright, center, lfe, surroundleft, surroundright, backleft, backright);
- }
- public RESULT setMixLevelsInput(float[] levels, int numlevels)
- {
- return FMOD5_Channel_SetMixLevelsInput(this.handle, levels, numlevels);
- }
- public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop = 0)
- {
- return FMOD5_Channel_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
- }
- public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop = 0)
- {
- return FMOD5_Channel_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
- }
-
- // Clock based functionality.
- public RESULT getDSPClock(out ulong dspclock, out ulong parentclock)
- {
- return FMOD5_Channel_GetDSPClock(this.handle, out dspclock, out parentclock);
- }
- public RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels = true)
- {
- return FMOD5_Channel_SetDelay(this.handle, dspclock_start, dspclock_end, stopchannels);
- }
- public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end)
- {
- return FMOD5_Channel_GetDelay(this.handle, out dspclock_start, out dspclock_end, IntPtr.Zero);
- }
- public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels)
- {
- return FMOD5_Channel_GetDelay(this.handle, out dspclock_start, out dspclock_end, out stopchannels);
- }
- public RESULT addFadePoint(ulong dspclock, float volume)
- {
- return FMOD5_Channel_AddFadePoint(this.handle, dspclock, volume);
- }
- public RESULT setFadePointRamp(ulong dspclock, float volume)
- {
- return FMOD5_Channel_SetFadePointRamp(this.handle, dspclock, volume);
- }
- public RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end)
- {
- return FMOD5_Channel_RemoveFadePoints(this.handle, dspclock_start, dspclock_end);
- }
- public RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume)
- {
- return FMOD5_Channel_GetFadePoints(this.handle, ref numpoints, point_dspclock, point_volume);
- }
-
- // DSP effects.
- public RESULT getDSP(int index, out DSP dsp)
- {
- return FMOD5_Channel_GetDSP(this.handle, index, out dsp.handle);
- }
- public RESULT addDSP(int index, DSP dsp)
- {
- return FMOD5_Channel_AddDSP(this.handle, index, dsp.handle);
- }
- public RESULT removeDSP(DSP dsp)
- {
- return FMOD5_Channel_RemoveDSP(this.handle, dsp.handle);
- }
- public RESULT getNumDSPs(out int numdsps)
- {
- return FMOD5_Channel_GetNumDSPs(this.handle, out numdsps);
- }
- public RESULT setDSPIndex(DSP dsp, int index)
- {
- return FMOD5_Channel_SetDSPIndex(this.handle, dsp.handle, index);
- }
- public RESULT getDSPIndex(DSP dsp, out int index)
- {
- return FMOD5_Channel_GetDSPIndex(this.handle, dsp.handle, out index);
- }
-
- // 3D functionality.
- public RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel)
- {
- return FMOD5_Channel_Set3DAttributes(this.handle, ref pos, ref vel);
- }
- public RESULT get3DAttributes(out VECTOR pos, out VECTOR vel)
- {
- return FMOD5_Channel_Get3DAttributes(this.handle, out pos, out vel);
- }
- public RESULT set3DMinMaxDistance(float mindistance, float maxdistance)
- {
- return FMOD5_Channel_Set3DMinMaxDistance(this.handle, mindistance, maxdistance);
- }
- public RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance)
- {
- return FMOD5_Channel_Get3DMinMaxDistance(this.handle, out mindistance, out maxdistance);
- }
- public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
- {
- return FMOD5_Channel_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
- }
- public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
- {
- return FMOD5_Channel_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
- }
- public RESULT set3DConeOrientation(ref VECTOR orientation)
- {
- return FMOD5_Channel_Set3DConeOrientation(this.handle, ref orientation);
- }
- public RESULT get3DConeOrientation(out VECTOR orientation)
- {
- return FMOD5_Channel_Get3DConeOrientation(this.handle, out orientation);
- }
- public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
- {
- return FMOD5_Channel_Set3DCustomRolloff(this.handle, ref points, numpoints);
- }
- public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
- {
- return FMOD5_Channel_Get3DCustomRolloff(this.handle, out points, out numpoints);
- }
- public RESULT set3DOcclusion(float directocclusion, float reverbocclusion)
- {
- return FMOD5_Channel_Set3DOcclusion(this.handle, directocclusion, reverbocclusion);
- }
- public RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion)
- {
- return FMOD5_Channel_Get3DOcclusion(this.handle, out directocclusion, out reverbocclusion);
- }
- public RESULT set3DSpread(float angle)
- {
- return FMOD5_Channel_Set3DSpread(this.handle, angle);
- }
- public RESULT get3DSpread(out float angle)
- {
- return FMOD5_Channel_Get3DSpread(this.handle, out angle);
- }
- public RESULT set3DLevel(float level)
- {
- return FMOD5_Channel_Set3DLevel(this.handle, level);
- }
- public RESULT get3DLevel(out float level)
- {
- return FMOD5_Channel_Get3DLevel(this.handle, out level);
- }
- public RESULT set3DDopplerLevel(float level)
- {
- return FMOD5_Channel_Set3DDopplerLevel(this.handle, level);
- }
- public RESULT get3DDopplerLevel(out float level)
- {
- return FMOD5_Channel_Get3DDopplerLevel(this.handle, out level);
- }
- public RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq)
- {
- return FMOD5_Channel_Set3DDistanceFilter(this.handle, custom, customLevel, centerFreq);
- }
- public RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq)
- {
- return FMOD5_Channel_Get3DDistanceFilter(this.handle, out custom, out customLevel, out centerFreq);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_Channel_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_Channel_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetFrequency (IntPtr channel, float frequency);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetFrequency (IntPtr channel, out float frequency);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetPriority (IntPtr channel, int priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetPriority (IntPtr channel, out int priority);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetPosition (IntPtr channel, uint position, TIMEUNIT postype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetPosition (IntPtr channel, out uint position, TIMEUNIT postype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetChannelGroup (IntPtr channel, IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetChannelGroup (IntPtr channel, out IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetLoopCount (IntPtr channel, int loopcount);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetLoopCount (IntPtr channel, out int loopcount);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetLoopPoints (IntPtr channel, uint loopstart, TIMEUNIT loopstarttype, uint loopend, TIMEUNIT loopendtype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetLoopPoints (IntPtr channel, out uint loopstart, TIMEUNIT loopstarttype, out uint loopend, TIMEUNIT loopendtype);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_IsVirtual (IntPtr channel, out bool isvirtual);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetCurrentSound (IntPtr channel, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetIndex (IntPtr channel, out int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetSystemObject (IntPtr channel, out IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Stop (IntPtr channel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetPaused (IntPtr channel, bool paused);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetPaused (IntPtr channel, out bool paused);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetVolume (IntPtr channel, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetVolume (IntPtr channel, out float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetVolumeRamp (IntPtr channel, bool ramp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetVolumeRamp (IntPtr channel, out bool ramp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetAudibility (IntPtr channel, out float audibility);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetPitch (IntPtr channel, float pitch);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetPitch (IntPtr channel, out float pitch);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetMute (IntPtr channel, bool mute);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetMute (IntPtr channel, out bool mute);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetReverbProperties (IntPtr channel, int instance, float wet);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetReverbProperties (IntPtr channel, int instance, out float wet);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetLowPassGain (IntPtr channel, float gain);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetLowPassGain (IntPtr channel, out float gain);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetMode (IntPtr channel, MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetMode (IntPtr channel, out MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetCallback (IntPtr channel, CHANNELCONTROL_CALLBACK callback);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_IsPlaying (IntPtr channel, out bool isplaying);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetPan (IntPtr channel, float pan);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetMixLevelsOutput (IntPtr channel, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetMixLevelsInput (IntPtr channel, float[] levels, int numlevels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetMixMatrix (IntPtr channel, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetMixMatrix (IntPtr channel, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetDSPClock (IntPtr channel, out ulong dspclock, out ulong parentclock);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetDelay (IntPtr channel, ulong dspclock_start, ulong dspclock_end, bool stopchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetDelay (IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetDelay (IntPtr channel, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_AddFadePoint (IntPtr channel, ulong dspclock, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetFadePointRamp (IntPtr channel, ulong dspclock, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_RemoveFadePoints (IntPtr channel, ulong dspclock_start, ulong dspclock_end);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetFadePoints (IntPtr channel, ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetDSP (IntPtr channel, int index, out IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_AddDSP (IntPtr channel, int index, IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_RemoveDSP (IntPtr channel, IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetNumDSPs (IntPtr channel, out int numdsps);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetDSPIndex (IntPtr channel, IntPtr dsp, int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetDSPIndex (IntPtr channel, IntPtr dsp, out int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DAttributes (IntPtr channel, ref VECTOR pos, ref VECTOR vel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DAttributes (IntPtr channel, out VECTOR pos, out VECTOR vel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DMinMaxDistance (IntPtr channel, float mindistance, float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DMinMaxDistance (IntPtr channel, out float mindistance, out float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DConeSettings (IntPtr channel, float insideconeangle, float outsideconeangle, float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DConeSettings (IntPtr channel, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DConeOrientation (IntPtr channel, ref VECTOR orientation);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DConeOrientation (IntPtr channel, out VECTOR orientation);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DCustomRolloff (IntPtr channel, ref VECTOR points, int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DCustomRolloff (IntPtr channel, out IntPtr points, out int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DOcclusion (IntPtr channel, float directocclusion, float reverbocclusion);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DOcclusion (IntPtr channel, out float directocclusion, out float reverbocclusion);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DSpread (IntPtr channel, float angle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DSpread (IntPtr channel, out float angle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DLevel (IntPtr channel, float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DLevel (IntPtr channel, out float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DDopplerLevel (IntPtr channel, float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DDopplerLevel (IntPtr channel, out float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Set3DDistanceFilter (IntPtr channel, bool custom, float customLevel, float centerFreq);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_Get3DDistanceFilter (IntPtr channel, out bool custom, out float customLevel, out float centerFreq);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_SetUserData (IntPtr channel, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Channel_GetUserData (IntPtr channel, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'ChannelGroup' API
- */
- public struct ChannelGroup : IChannelControl
- {
- public RESULT release()
- {
- return FMOD5_ChannelGroup_Release(this.handle);
- }
-
- // Nested channel groups.
- public RESULT addGroup(ChannelGroup group, bool propagatedspclock = true)
- {
- return FMOD5_ChannelGroup_AddGroup(this.handle, group.handle, propagatedspclock, IntPtr.Zero);
- }
- public RESULT addGroup(ChannelGroup group, bool propagatedspclock, out DSPConnection connection)
- {
- return FMOD5_ChannelGroup_AddGroup(this.handle, group.handle, propagatedspclock, out connection.handle);
- }
- public RESULT getNumGroups(out int numgroups)
- {
- return FMOD5_ChannelGroup_GetNumGroups(this.handle, out numgroups);
- }
- public RESULT getGroup(int index, out ChannelGroup group)
- {
- return FMOD5_ChannelGroup_GetGroup(this.handle, index, out group.handle);
- }
- public RESULT getParentGroup(out ChannelGroup group)
- {
- return FMOD5_ChannelGroup_GetParentGroup(this.handle, out group.handle);
- }
-
- // Information only functions.
- public RESULT getName(out string name, int namelen)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_ChannelGroup_GetName(this.handle, stringMem, namelen);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getNumChannels(out int numchannels)
- {
- return FMOD5_ChannelGroup_GetNumChannels(this.handle, out numchannels);
- }
- public RESULT getChannel(int index, out Channel channel)
- {
- return FMOD5_ChannelGroup_GetChannel(this.handle, index, out channel.handle);
- }
-
- public RESULT getSystemObject(out System system)
- {
- return FMOD5_ChannelGroup_GetSystemObject(this.handle, out system.handle);
- }
-
- // General control functionality for Channels and ChannelGroups.
- public RESULT stop()
- {
- return FMOD5_ChannelGroup_Stop(this.handle);
- }
- public RESULT setPaused(bool paused)
- {
- return FMOD5_ChannelGroup_SetPaused(this.handle, paused);
- }
- public RESULT getPaused(out bool paused)
- {
- return FMOD5_ChannelGroup_GetPaused(this.handle, out paused);
- }
- public RESULT setVolume(float volume)
- {
- return FMOD5_ChannelGroup_SetVolume(this.handle, volume);
- }
- public RESULT getVolume(out float volume)
- {
- return FMOD5_ChannelGroup_GetVolume(this.handle, out volume);
- }
- public RESULT setVolumeRamp(bool ramp)
- {
- return FMOD5_ChannelGroup_SetVolumeRamp(this.handle, ramp);
- }
- public RESULT getVolumeRamp(out bool ramp)
- {
- return FMOD5_ChannelGroup_GetVolumeRamp(this.handle, out ramp);
- }
- public RESULT getAudibility(out float audibility)
- {
- return FMOD5_ChannelGroup_GetAudibility(this.handle, out audibility);
- }
- public RESULT setPitch(float pitch)
- {
- return FMOD5_ChannelGroup_SetPitch(this.handle, pitch);
- }
- public RESULT getPitch(out float pitch)
- {
- return FMOD5_ChannelGroup_GetPitch(this.handle, out pitch);
- }
- public RESULT setMute(bool mute)
- {
- return FMOD5_ChannelGroup_SetMute(this.handle, mute);
- }
- public RESULT getMute(out bool mute)
- {
- return FMOD5_ChannelGroup_GetMute(this.handle, out mute);
- }
- public RESULT setReverbProperties(int instance, float wet)
- {
- return FMOD5_ChannelGroup_SetReverbProperties(this.handle, instance, wet);
- }
- public RESULT getReverbProperties(int instance, out float wet)
- {
- return FMOD5_ChannelGroup_GetReverbProperties(this.handle, instance, out wet);
- }
- public RESULT setLowPassGain(float gain)
- {
- return FMOD5_ChannelGroup_SetLowPassGain(this.handle, gain);
- }
- public RESULT getLowPassGain(out float gain)
- {
- return FMOD5_ChannelGroup_GetLowPassGain(this.handle, out gain);
- }
- public RESULT setMode(MODE mode)
- {
- return FMOD5_ChannelGroup_SetMode(this.handle, mode);
- }
- public RESULT getMode(out MODE mode)
- {
- return FMOD5_ChannelGroup_GetMode(this.handle, out mode);
- }
- public RESULT setCallback(CHANNELCONTROL_CALLBACK callback)
- {
- return FMOD5_ChannelGroup_SetCallback(this.handle, callback);
- }
- public RESULT isPlaying(out bool isplaying)
- {
- return FMOD5_ChannelGroup_IsPlaying(this.handle, out isplaying);
- }
-
- // Panning and level adjustment.
- public RESULT setPan(float pan)
- {
- return FMOD5_ChannelGroup_SetPan(this.handle, pan);
- }
- public RESULT setMixLevelsOutput(float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright)
- {
- return FMOD5_ChannelGroup_SetMixLevelsOutput(this.handle, frontleft, frontright, center, lfe, surroundleft, surroundright, backleft, backright);
- }
- public RESULT setMixLevelsInput(float[] levels, int numlevels)
- {
- return FMOD5_ChannelGroup_SetMixLevelsInput(this.handle, levels, numlevels);
- }
- public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop)
- {
- return FMOD5_ChannelGroup_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
- }
- public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop)
- {
- return FMOD5_ChannelGroup_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
- }
-
- // Clock based functionality.
- public RESULT getDSPClock(out ulong dspclock, out ulong parentclock)
- {
- return FMOD5_ChannelGroup_GetDSPClock(this.handle, out dspclock, out parentclock);
- }
- public RESULT setDelay(ulong dspclock_start, ulong dspclock_end, bool stopchannels)
- {
- return FMOD5_ChannelGroup_SetDelay(this.handle, dspclock_start, dspclock_end, stopchannels);
- }
- public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end)
- {
- return FMOD5_ChannelGroup_GetDelay(this.handle, out dspclock_start, out dspclock_end, IntPtr.Zero);
- }
- public RESULT getDelay(out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels)
- {
- return FMOD5_ChannelGroup_GetDelay(this.handle, out dspclock_start, out dspclock_end, out stopchannels);
- }
- public RESULT addFadePoint(ulong dspclock, float volume)
- {
- return FMOD5_ChannelGroup_AddFadePoint(this.handle, dspclock, volume);
- }
- public RESULT setFadePointRamp(ulong dspclock, float volume)
- {
- return FMOD5_ChannelGroup_SetFadePointRamp(this.handle, dspclock, volume);
- }
- public RESULT removeFadePoints(ulong dspclock_start, ulong dspclock_end)
- {
- return FMOD5_ChannelGroup_RemoveFadePoints(this.handle, dspclock_start, dspclock_end);
- }
- public RESULT getFadePoints(ref uint numpoints, ulong[] point_dspclock, float[] point_volume)
- {
- return FMOD5_ChannelGroup_GetFadePoints(this.handle, ref numpoints, point_dspclock, point_volume);
- }
-
- // DSP effects.
- public RESULT getDSP(int index, out DSP dsp)
- {
- return FMOD5_ChannelGroup_GetDSP(this.handle, index, out dsp.handle);
- }
- public RESULT addDSP(int index, DSP dsp)
- {
- return FMOD5_ChannelGroup_AddDSP(this.handle, index, dsp.handle);
- }
- public RESULT removeDSP(DSP dsp)
- {
- return FMOD5_ChannelGroup_RemoveDSP(this.handle, dsp.handle);
- }
- public RESULT getNumDSPs(out int numdsps)
- {
- return FMOD5_ChannelGroup_GetNumDSPs(this.handle, out numdsps);
- }
- public RESULT setDSPIndex(DSP dsp, int index)
- {
- return FMOD5_ChannelGroup_SetDSPIndex(this.handle, dsp.handle, index);
- }
- public RESULT getDSPIndex(DSP dsp, out int index)
- {
- return FMOD5_ChannelGroup_GetDSPIndex(this.handle, dsp.handle, out index);
- }
-
- // 3D functionality.
- public RESULT set3DAttributes(ref VECTOR pos, ref VECTOR vel)
- {
- return FMOD5_ChannelGroup_Set3DAttributes(this.handle, ref pos, ref vel);
- }
- public RESULT get3DAttributes(out VECTOR pos, out VECTOR vel)
- {
- return FMOD5_ChannelGroup_Get3DAttributes(this.handle, out pos, out vel);
- }
- public RESULT set3DMinMaxDistance(float mindistance, float maxdistance)
- {
- return FMOD5_ChannelGroup_Set3DMinMaxDistance(this.handle, mindistance, maxdistance);
- }
- public RESULT get3DMinMaxDistance(out float mindistance, out float maxdistance)
- {
- return FMOD5_ChannelGroup_Get3DMinMaxDistance(this.handle, out mindistance, out maxdistance);
- }
- public RESULT set3DConeSettings(float insideconeangle, float outsideconeangle, float outsidevolume)
- {
- return FMOD5_ChannelGroup_Set3DConeSettings(this.handle, insideconeangle, outsideconeangle, outsidevolume);
- }
- public RESULT get3DConeSettings(out float insideconeangle, out float outsideconeangle, out float outsidevolume)
- {
- return FMOD5_ChannelGroup_Get3DConeSettings(this.handle, out insideconeangle, out outsideconeangle, out outsidevolume);
- }
- public RESULT set3DConeOrientation(ref VECTOR orientation)
- {
- return FMOD5_ChannelGroup_Set3DConeOrientation(this.handle, ref orientation);
- }
- public RESULT get3DConeOrientation(out VECTOR orientation)
- {
- return FMOD5_ChannelGroup_Get3DConeOrientation(this.handle, out orientation);
- }
- public RESULT set3DCustomRolloff(ref VECTOR points, int numpoints)
- {
- return FMOD5_ChannelGroup_Set3DCustomRolloff(this.handle, ref points, numpoints);
- }
- public RESULT get3DCustomRolloff(out IntPtr points, out int numpoints)
- {
- return FMOD5_ChannelGroup_Get3DCustomRolloff(this.handle, out points, out numpoints);
- }
- public RESULT set3DOcclusion(float directocclusion, float reverbocclusion)
- {
- return FMOD5_ChannelGroup_Set3DOcclusion(this.handle, directocclusion, reverbocclusion);
- }
- public RESULT get3DOcclusion(out float directocclusion, out float reverbocclusion)
- {
- return FMOD5_ChannelGroup_Get3DOcclusion(this.handle, out directocclusion, out reverbocclusion);
- }
- public RESULT set3DSpread(float angle)
- {
- return FMOD5_ChannelGroup_Set3DSpread(this.handle, angle);
- }
- public RESULT get3DSpread(out float angle)
- {
- return FMOD5_ChannelGroup_Get3DSpread(this.handle, out angle);
- }
- public RESULT set3DLevel(float level)
- {
- return FMOD5_ChannelGroup_Set3DLevel(this.handle, level);
- }
- public RESULT get3DLevel(out float level)
- {
- return FMOD5_ChannelGroup_Get3DLevel(this.handle, out level);
- }
- public RESULT set3DDopplerLevel(float level)
- {
- return FMOD5_ChannelGroup_Set3DDopplerLevel(this.handle, level);
- }
- public RESULT get3DDopplerLevel(out float level)
- {
- return FMOD5_ChannelGroup_Get3DDopplerLevel(this.handle, out level);
- }
- public RESULT set3DDistanceFilter(bool custom, float customLevel, float centerFreq)
- {
- return FMOD5_ChannelGroup_Set3DDistanceFilter(this.handle, custom, customLevel, centerFreq);
- }
- public RESULT get3DDistanceFilter(out bool custom, out float customLevel, out float centerFreq)
- {
- return FMOD5_ChannelGroup_Get3DDistanceFilter(this.handle, out custom, out customLevel, out centerFreq);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_ChannelGroup_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_ChannelGroup_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Release (IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_AddGroup (IntPtr channelgroup, IntPtr group, bool propagatedspclock, IntPtr zero);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_AddGroup (IntPtr channelgroup, IntPtr group, bool propagatedspclock, out IntPtr connection);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetNumGroups (IntPtr channelgroup, out int numgroups);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetGroup (IntPtr channelgroup, int index, out IntPtr group);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetParentGroup (IntPtr channelgroup, out IntPtr group);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetName (IntPtr channelgroup, IntPtr name, int namelen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetNumChannels (IntPtr channelgroup, out int numchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetChannel (IntPtr channelgroup, int index, out IntPtr channel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetSystemObject (IntPtr channelgroup, out IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Stop (IntPtr channelgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetPaused (IntPtr channelgroup, bool paused);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetPaused (IntPtr channelgroup, out bool paused);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetVolume (IntPtr channelgroup, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetVolume (IntPtr channelgroup, out float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetVolumeRamp (IntPtr channelgroup, bool ramp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetVolumeRamp (IntPtr channelgroup, out bool ramp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetAudibility (IntPtr channelgroup, out float audibility);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetPitch (IntPtr channelgroup, float pitch);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetPitch (IntPtr channelgroup, out float pitch);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetMute (IntPtr channelgroup, bool mute);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetMute (IntPtr channelgroup, out bool mute);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetReverbProperties (IntPtr channelgroup, int instance, float wet);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetReverbProperties (IntPtr channelgroup, int instance, out float wet);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetLowPassGain (IntPtr channelgroup, float gain);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetLowPassGain (IntPtr channelgroup, out float gain);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetMode (IntPtr channelgroup, MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetMode (IntPtr channelgroup, out MODE mode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetCallback (IntPtr channelgroup, CHANNELCONTROL_CALLBACK callback);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_IsPlaying (IntPtr channelgroup, out bool isplaying);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetPan (IntPtr channelgroup, float pan);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsOutput (IntPtr channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetMixLevelsInput (IntPtr channelgroup, float[] levels, int numlevels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetMixMatrix (IntPtr channelgroup, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetMixMatrix (IntPtr channelgroup, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetDSPClock (IntPtr channelgroup, out ulong dspclock, out ulong parentclock);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetDelay (IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end, bool stopchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetDelay (IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, IntPtr zero);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetDelay (IntPtr channelgroup, out ulong dspclock_start, out ulong dspclock_end, out bool stopchannels);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_AddFadePoint (IntPtr channelgroup, ulong dspclock, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetFadePointRamp (IntPtr channelgroup, ulong dspclock, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_RemoveFadePoints (IntPtr channelgroup, ulong dspclock_start, ulong dspclock_end);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetFadePoints (IntPtr channelgroup, ref uint numpoints, ulong[] point_dspclock, float[] point_volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetDSP (IntPtr channelgroup, int index, out IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_AddDSP (IntPtr channelgroup, int index, IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_RemoveDSP (IntPtr channelgroup, IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetNumDSPs (IntPtr channelgroup, out int numdsps);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetDSPIndex (IntPtr channelgroup, IntPtr dsp, int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetDSPIndex (IntPtr channelgroup, IntPtr dsp, out int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DAttributes (IntPtr channelgroup, ref VECTOR pos, ref VECTOR vel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DAttributes (IntPtr channelgroup, out VECTOR pos, out VECTOR vel);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DMinMaxDistance (IntPtr channelgroup, float mindistance, float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DMinMaxDistance (IntPtr channelgroup, out float mindistance, out float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DConeSettings (IntPtr channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DConeSettings (IntPtr channelgroup, out float insideconeangle, out float outsideconeangle, out float outsidevolume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DConeOrientation(IntPtr channelgroup, ref VECTOR orientation);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DConeOrientation(IntPtr channelgroup, out VECTOR orientation);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DCustomRolloff (IntPtr channelgroup, ref VECTOR points, int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DCustomRolloff (IntPtr channelgroup, out IntPtr points, out int numpoints);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DOcclusion (IntPtr channelgroup, float directocclusion, float reverbocclusion);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DOcclusion (IntPtr channelgroup, out float directocclusion, out float reverbocclusion);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DSpread (IntPtr channelgroup, float angle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DSpread (IntPtr channelgroup, out float angle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DLevel (IntPtr channelgroup, float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DLevel (IntPtr channelgroup, out float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DDopplerLevel (IntPtr channelgroup, float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DDopplerLevel (IntPtr channelgroup, out float level);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Set3DDistanceFilter (IntPtr channelgroup, bool custom, float customLevel, float centerFreq);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_Get3DDistanceFilter (IntPtr channelgroup, out bool custom, out float customLevel, out float centerFreq);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_SetUserData (IntPtr channelgroup, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_ChannelGroup_GetUserData (IntPtr channelgroup, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'SoundGroup' API
- */
- public struct SoundGroup
- {
- public RESULT release()
- {
- return FMOD5_SoundGroup_Release(this.handle);
- }
-
- public RESULT getSystemObject(out System system)
- {
- return FMOD5_SoundGroup_GetSystemObject(this.handle, out system.handle);
- }
-
- // SoundGroup control functions.
- public RESULT setMaxAudible(int maxaudible)
- {
- return FMOD5_SoundGroup_SetMaxAudible(this.handle, maxaudible);
- }
- public RESULT getMaxAudible(out int maxaudible)
- {
- return FMOD5_SoundGroup_GetMaxAudible(this.handle, out maxaudible);
- }
- public RESULT setMaxAudibleBehavior(SOUNDGROUP_BEHAVIOR behavior)
- {
- return FMOD5_SoundGroup_SetMaxAudibleBehavior(this.handle, behavior);
- }
- public RESULT getMaxAudibleBehavior(out SOUNDGROUP_BEHAVIOR behavior)
- {
- return FMOD5_SoundGroup_GetMaxAudibleBehavior(this.handle, out behavior);
- }
- public RESULT setMuteFadeSpeed(float speed)
- {
- return FMOD5_SoundGroup_SetMuteFadeSpeed(this.handle, speed);
- }
- public RESULT getMuteFadeSpeed(out float speed)
- {
- return FMOD5_SoundGroup_GetMuteFadeSpeed(this.handle, out speed);
- }
- public RESULT setVolume(float volume)
- {
- return FMOD5_SoundGroup_SetVolume(this.handle, volume);
- }
- public RESULT getVolume(out float volume)
- {
- return FMOD5_SoundGroup_GetVolume(this.handle, out volume);
- }
- public RESULT stop()
- {
- return FMOD5_SoundGroup_Stop(this.handle);
- }
-
- // Information only functions.
- public RESULT getName(out string name, int namelen)
- {
- IntPtr stringMem = Marshal.AllocHGlobal(namelen);
-
- RESULT result = FMOD5_SoundGroup_GetName(this.handle, stringMem, namelen);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(stringMem);
- }
- Marshal.FreeHGlobal(stringMem);
-
- return result;
- }
- public RESULT getNumSounds(out int numsounds)
- {
- return FMOD5_SoundGroup_GetNumSounds(this.handle, out numsounds);
- }
- public RESULT getSound(int index, out Sound sound)
- {
- return FMOD5_SoundGroup_GetSound(this.handle, index, out sound.handle);
- }
- public RESULT getNumPlaying(out int numplaying)
- {
- return FMOD5_SoundGroup_GetNumPlaying(this.handle, out numplaying);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_SoundGroup_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_SoundGroup_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_Release (IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetSystemObject (IntPtr soundgroup, out IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_SetMaxAudible (IntPtr soundgroup, int maxaudible);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetMaxAudible (IntPtr soundgroup, out int maxaudible);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_SetMaxAudibleBehavior (IntPtr soundgroup, SOUNDGROUP_BEHAVIOR behavior);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetMaxAudibleBehavior (IntPtr soundgroup, out SOUNDGROUP_BEHAVIOR behavior);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_SetMuteFadeSpeed (IntPtr soundgroup, float speed);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetMuteFadeSpeed (IntPtr soundgroup, out float speed);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_SetVolume (IntPtr soundgroup, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetVolume (IntPtr soundgroup, out float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_Stop (IntPtr soundgroup);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetName (IntPtr soundgroup, IntPtr name, int namelen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetNumSounds (IntPtr soundgroup, out int numsounds);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetSound (IntPtr soundgroup, int index, out IntPtr sound);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetNumPlaying (IntPtr soundgroup, out int numplaying);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_SetUserData (IntPtr soundgroup, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_SoundGroup_GetUserData (IntPtr soundgroup, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'DSP' API
- */
- public struct DSP
- {
- public RESULT release()
- {
- return FMOD5_DSP_Release(this.handle);
- }
- public RESULT getSystemObject(out System system)
- {
- return FMOD5_DSP_GetSystemObject(this.handle, out system.handle);
- }
-
- // Connection / disconnection / input and output enumeration.
- public RESULT addInput(DSP input)
- {
- return FMOD5_DSP_AddInput(this.handle, input.handle, IntPtr.Zero, DSPCONNECTION_TYPE.STANDARD);
- }
- public RESULT addInput(DSP input, out DSPConnection connection, DSPCONNECTION_TYPE type = DSPCONNECTION_TYPE.STANDARD)
- {
- return FMOD5_DSP_AddInput(this.handle, input.handle, out connection.handle, type);
- }
- public RESULT disconnectFrom(DSP target, DSPConnection connection)
- {
- return FMOD5_DSP_DisconnectFrom(this.handle, target.handle, connection.handle);
- }
- public RESULT disconnectAll(bool inputs, bool outputs)
- {
- return FMOD5_DSP_DisconnectAll(this.handle, inputs, outputs);
- }
- public RESULT getNumInputs(out int numinputs)
- {
- return FMOD5_DSP_GetNumInputs(this.handle, out numinputs);
- }
- public RESULT getNumOutputs(out int numoutputs)
- {
- return FMOD5_DSP_GetNumOutputs(this.handle, out numoutputs);
- }
- public RESULT getInput(int index, out DSP input, out DSPConnection inputconnection)
- {
- return FMOD5_DSP_GetInput(this.handle, index, out input.handle, out inputconnection.handle);
- }
- public RESULT getOutput(int index, out DSP output, out DSPConnection outputconnection)
- {
- return FMOD5_DSP_GetOutput(this.handle, index, out output.handle, out outputconnection.handle);
- }
-
- // DSP unit control.
- public RESULT setActive(bool active)
- {
- return FMOD5_DSP_SetActive(this.handle, active);
- }
- public RESULT getActive(out bool active)
- {
- return FMOD5_DSP_GetActive(this.handle, out active);
- }
- public RESULT setBypass(bool bypass)
- {
- return FMOD5_DSP_SetBypass(this.handle, bypass);
- }
- public RESULT getBypass(out bool bypass)
- {
- return FMOD5_DSP_GetBypass(this.handle, out bypass);
- }
- public RESULT setWetDryMix(float prewet, float postwet, float dry)
- {
- return FMOD5_DSP_SetWetDryMix(this.handle, prewet, postwet, dry);
- }
- public RESULT getWetDryMix(out float prewet, out float postwet, out float dry)
- {
- return FMOD5_DSP_GetWetDryMix(this.handle, out prewet, out postwet, out dry);
- }
- public RESULT setChannelFormat(CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode)
- {
- return FMOD5_DSP_SetChannelFormat(this.handle, channelmask, numchannels, source_speakermode);
- }
- public RESULT getChannelFormat(out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode)
- {
- return FMOD5_DSP_GetChannelFormat(this.handle, out channelmask, out numchannels, out source_speakermode);
- }
- public RESULT getOutputChannelFormat(CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode)
- {
- return FMOD5_DSP_GetOutputChannelFormat(this.handle, inmask, inchannels, inspeakermode, out outmask, out outchannels, out outspeakermode);
- }
- public RESULT reset()
- {
- return FMOD5_DSP_Reset(this.handle);
- }
-
- // DSP parameter control.
- public RESULT setParameterFloat(int index, float value)
- {
- return FMOD5_DSP_SetParameterFloat(this.handle, index, value);
- }
- public RESULT setParameterInt(int index, int value)
- {
- return FMOD5_DSP_SetParameterInt(this.handle, index, value);
- }
- public RESULT setParameterBool(int index, bool value)
- {
- return FMOD5_DSP_SetParameterBool(this.handle, index, value);
- }
- public RESULT setParameterData(int index, byte[] data)
- {
- return FMOD5_DSP_SetParameterData(this.handle, index, Marshal.UnsafeAddrOfPinnedArrayElement(data, 0), (uint)data.Length);
- }
- public RESULT getParameterFloat(int index, out float value)
- {
- return FMOD5_DSP_GetParameterFloat(this.handle, index, out value, IntPtr.Zero, 0);
- }
- public RESULT getParameterInt(int index, out int value)
- {
- return FMOD5_DSP_GetParameterInt(this.handle, index, out value, IntPtr.Zero, 0);
- }
- public RESULT getParameterBool(int index, out bool value)
- {
- return FMOD5_DSP_GetParameterBool(this.handle, index, out value, IntPtr.Zero, 0);
- }
- public RESULT getParameterData(int index, out IntPtr data, out uint length)
- {
- return FMOD5_DSP_GetParameterData(this.handle, index, out data, out length, IntPtr.Zero, 0);
- }
- public RESULT getNumParameters(out int numparams)
- {
- return FMOD5_DSP_GetNumParameters(this.handle, out numparams);
- }
- public RESULT getParameterInfo(int index, out DSP_PARAMETER_DESC desc)
- {
- return FMOD5_DSP_GetParameterInfo(this.handle, index, out desc);
- }
- public RESULT getDataParameterIndex(int datatype, out int index)
- {
- return FMOD5_DSP_GetDataParameterIndex(this.handle, datatype, out index);
- }
- public RESULT showConfigDialog(IntPtr hwnd, bool show)
- {
- return FMOD5_DSP_ShowConfigDialog(this.handle, hwnd, show);
- }
-
- // DSP attributes.
- public RESULT getInfo(out string name, out uint version, out int channels, out int configwidth, out int configheight)
- {
- IntPtr nameMem = Marshal.AllocHGlobal(32);
-
- RESULT result = FMOD5_DSP_GetInfo(this.handle, nameMem, out version, out channels, out configwidth, out configheight);
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- name = encoder.stringFromNative(nameMem);
- }
- Marshal.FreeHGlobal(nameMem);
- return result;
- }
- public RESULT getInfo(out uint version, out int channels, out int configwidth, out int configheight)
- {
- return FMOD5_DSP_GetInfo(this.handle, IntPtr.Zero, out version, out channels, out configwidth, out configheight); ;
- }
- public RESULT getType(out DSP_TYPE type)
- {
- return FMOD5_DSP_GetType(this.handle, out type);
- }
- public RESULT getIdle(out bool idle)
- {
- return FMOD5_DSP_GetIdle(this.handle, out idle);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_DSP_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_DSP_GetUserData(this.handle, out userdata);
- }
-
- // Metering.
- public RESULT setMeteringEnabled(bool inputEnabled, bool outputEnabled)
- {
- return FMOD5_DSP_SetMeteringEnabled(this.handle, inputEnabled, outputEnabled);
- }
- public RESULT getMeteringEnabled(out bool inputEnabled, out bool outputEnabled)
- {
- return FMOD5_DSP_GetMeteringEnabled(this.handle, out inputEnabled, out outputEnabled);
- }
-
- public RESULT getMeteringInfo(IntPtr zero, out DSP_METERING_INFO outputInfo)
- {
- return FMOD5_DSP_GetMeteringInfo(this.handle, zero, out outputInfo);
- }
- public RESULT getMeteringInfo(out DSP_METERING_INFO inputInfo, IntPtr zero)
- {
- return FMOD5_DSP_GetMeteringInfo(this.handle, out inputInfo, zero);
- }
- public RESULT getMeteringInfo(out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo)
- {
- return FMOD5_DSP_GetMeteringInfo(this.handle, out inputInfo, out outputInfo);
- }
-
- public RESULT getCPUUsage(out uint exclusive, out uint inclusive)
- {
- return FMOD5_DSP_GetCPUUsage(this.handle, out exclusive, out inclusive);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_Release (IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetSystemObject (IntPtr dsp, out IntPtr system);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_AddInput (IntPtr dsp, IntPtr input, IntPtr zero, DSPCONNECTION_TYPE type);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_AddInput (IntPtr dsp, IntPtr input, out IntPtr connection, DSPCONNECTION_TYPE type);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_DisconnectFrom (IntPtr dsp, IntPtr target, IntPtr connection);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_DisconnectAll (IntPtr dsp, bool inputs, bool outputs);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetNumInputs (IntPtr dsp, out int numinputs);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetNumOutputs (IntPtr dsp, out int numoutputs);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetInput (IntPtr dsp, int index, out IntPtr input, out IntPtr inputconnection);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetOutput (IntPtr dsp, int index, out IntPtr output, out IntPtr outputconnection);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetActive (IntPtr dsp, bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetActive (IntPtr dsp, out bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetBypass (IntPtr dsp, bool bypass);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetBypass (IntPtr dsp, out bool bypass);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetWetDryMix (IntPtr dsp, float prewet, float postwet, float dry);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetWetDryMix (IntPtr dsp, out float prewet, out float postwet, out float dry);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetChannelFormat (IntPtr dsp, CHANNELMASK channelmask, int numchannels, SPEAKERMODE source_speakermode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetChannelFormat (IntPtr dsp, out CHANNELMASK channelmask, out int numchannels, out SPEAKERMODE source_speakermode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetOutputChannelFormat (IntPtr dsp, CHANNELMASK inmask, int inchannels, SPEAKERMODE inspeakermode, out CHANNELMASK outmask, out int outchannels, out SPEAKERMODE outspeakermode);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_Reset (IntPtr dsp);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetParameterFloat (IntPtr dsp, int index, float value);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetParameterInt (IntPtr dsp, int index, int value);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetParameterBool (IntPtr dsp, int index, bool value);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetParameterData (IntPtr dsp, int index, IntPtr data, uint length);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetParameterFloat (IntPtr dsp, int index, out float value, IntPtr valuestr, int valuestrlen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetParameterInt (IntPtr dsp, int index, out int value, IntPtr valuestr, int valuestrlen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetParameterBool (IntPtr dsp, int index, out bool value, IntPtr valuestr, int valuestrlen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetParameterData (IntPtr dsp, int index, out IntPtr data, out uint length, IntPtr valuestr, int valuestrlen);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetNumParameters (IntPtr dsp, out int numparams);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetParameterInfo (IntPtr dsp, int index, out DSP_PARAMETER_DESC desc);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetDataParameterIndex (IntPtr dsp, int datatype, out int index);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_ShowConfigDialog (IntPtr dsp, IntPtr hwnd, bool show);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetInfo (IntPtr dsp, IntPtr name, out uint version, out int channels, out int configwidth, out int configheight);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetType (IntPtr dsp, out DSP_TYPE type);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetIdle (IntPtr dsp, out bool idle);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_SetUserData (IntPtr dsp, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSP_GetUserData (IntPtr dsp, out IntPtr userdata);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_SetMeteringEnabled (IntPtr dsp, bool inputEnabled, bool outputEnabled);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_GetMeteringEnabled (IntPtr dsp, out bool inputEnabled, out bool outputEnabled);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, IntPtr zero, out DSP_METERING_INFO outputInfo);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, out DSP_METERING_INFO inputInfo, IntPtr zero);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_GetMeteringInfo (IntPtr dsp, out DSP_METERING_INFO inputInfo, out DSP_METERING_INFO outputInfo);
- [DllImport(VERSION.dll)]
- public static extern RESULT FMOD5_DSP_GetCPUUsage (IntPtr dsp, out uint exclusive, out uint inclusive);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'DSPConnection' API
- */
- public struct DSPConnection
- {
- public RESULT getInput(out DSP input)
- {
- return FMOD5_DSPConnection_GetInput(this.handle, out input.handle);
- }
- public RESULT getOutput(out DSP output)
- {
- return FMOD5_DSPConnection_GetOutput(this.handle, out output.handle);
- }
- public RESULT setMix(float volume)
- {
- return FMOD5_DSPConnection_SetMix(this.handle, volume);
- }
- public RESULT getMix(out float volume)
- {
- return FMOD5_DSPConnection_GetMix(this.handle, out volume);
- }
- public RESULT setMixMatrix(float[] matrix, int outchannels, int inchannels, int inchannel_hop = 0)
- {
- return FMOD5_DSPConnection_SetMixMatrix(this.handle, matrix, outchannels, inchannels, inchannel_hop);
- }
- public RESULT getMixMatrix(float[] matrix, out int outchannels, out int inchannels, int inchannel_hop = 0)
- {
- return FMOD5_DSPConnection_GetMixMatrix(this.handle, matrix, out outchannels, out inchannels, inchannel_hop);
- }
- public RESULT getType(out DSPCONNECTION_TYPE type)
- {
- return FMOD5_DSPConnection_GetType(this.handle, out type);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_DSPConnection_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_DSPConnection_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetInput (IntPtr dspconnection, out IntPtr input);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetOutput (IntPtr dspconnection, out IntPtr output);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_SetMix (IntPtr dspconnection, float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetMix (IntPtr dspconnection, out float volume);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_SetMixMatrix (IntPtr dspconnection, float[] matrix, int outchannels, int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetMixMatrix (IntPtr dspconnection, float[] matrix, out int outchannels, out int inchannels, int inchannel_hop);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetType (IntPtr dspconnection, out DSPCONNECTION_TYPE type);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_SetUserData (IntPtr dspconnection, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_DSPConnection_GetUserData (IntPtr dspconnection, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'Geometry' API
- */
- public struct Geometry
- {
- public RESULT release()
- {
- return FMOD5_Geometry_Release(this.handle);
- }
-
- // Polygon manipulation.
- public RESULT addPolygon(float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex)
- {
- return FMOD5_Geometry_AddPolygon(this.handle, directocclusion, reverbocclusion, doublesided, numvertices, vertices, out polygonindex);
- }
- public RESULT getNumPolygons(out int numpolygons)
- {
- return FMOD5_Geometry_GetNumPolygons(this.handle, out numpolygons);
- }
- public RESULT getMaxPolygons(out int maxpolygons, out int maxvertices)
- {
- return FMOD5_Geometry_GetMaxPolygons(this.handle, out maxpolygons, out maxvertices);
- }
- public RESULT getPolygonNumVertices(int index, out int numvertices)
- {
- return FMOD5_Geometry_GetPolygonNumVertices(this.handle, index, out numvertices);
- }
- public RESULT setPolygonVertex(int index, int vertexindex, ref VECTOR vertex)
- {
- return FMOD5_Geometry_SetPolygonVertex(this.handle, index, vertexindex, ref vertex);
- }
- public RESULT getPolygonVertex(int index, int vertexindex, out VECTOR vertex)
- {
- return FMOD5_Geometry_GetPolygonVertex(this.handle, index, vertexindex, out vertex);
- }
- public RESULT setPolygonAttributes(int index, float directocclusion, float reverbocclusion, bool doublesided)
- {
- return FMOD5_Geometry_SetPolygonAttributes(this.handle, index, directocclusion, reverbocclusion, doublesided);
- }
- public RESULT getPolygonAttributes(int index, out float directocclusion, out float reverbocclusion, out bool doublesided)
- {
- return FMOD5_Geometry_GetPolygonAttributes(this.handle, index, out directocclusion, out reverbocclusion, out doublesided);
- }
-
- // Object manipulation.
- public RESULT setActive(bool active)
- {
- return FMOD5_Geometry_SetActive(this.handle, active);
- }
- public RESULT getActive(out bool active)
- {
- return FMOD5_Geometry_GetActive(this.handle, out active);
- }
- public RESULT setRotation(ref VECTOR forward, ref VECTOR up)
- {
- return FMOD5_Geometry_SetRotation(this.handle, ref forward, ref up);
- }
- public RESULT getRotation(out VECTOR forward, out VECTOR up)
- {
- return FMOD5_Geometry_GetRotation(this.handle, out forward, out up);
- }
- public RESULT setPosition(ref VECTOR position)
- {
- return FMOD5_Geometry_SetPosition(this.handle, ref position);
- }
- public RESULT getPosition(out VECTOR position)
- {
- return FMOD5_Geometry_GetPosition(this.handle, out position);
- }
- public RESULT setScale(ref VECTOR scale)
- {
- return FMOD5_Geometry_SetScale(this.handle, ref scale);
- }
- public RESULT getScale(out VECTOR scale)
- {
- return FMOD5_Geometry_GetScale(this.handle, out scale);
- }
- public RESULT save(IntPtr data, out int datasize)
- {
- return FMOD5_Geometry_Save(this.handle, data, out datasize);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_Geometry_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_Geometry_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_Release (IntPtr geometry);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_AddPolygon (IntPtr geometry, float directocclusion, float reverbocclusion, bool doublesided, int numvertices, VECTOR[] vertices, out int polygonindex);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetNumPolygons (IntPtr geometry, out int numpolygons);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetMaxPolygons (IntPtr geometry, out int maxpolygons, out int maxvertices);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetPolygonNumVertices(IntPtr geometry, int index, out int numvertices);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetPolygonVertex (IntPtr geometry, int index, int vertexindex, ref VECTOR vertex);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetPolygonVertex (IntPtr geometry, int index, int vertexindex, out VECTOR vertex);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetPolygonAttributes (IntPtr geometry, int index, float directocclusion, float reverbocclusion, bool doublesided);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetPolygonAttributes (IntPtr geometry, int index, out float directocclusion, out float reverbocclusion, out bool doublesided);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetActive (IntPtr geometry, bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetActive (IntPtr geometry, out bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetRotation (IntPtr geometry, ref VECTOR forward, ref VECTOR up);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetRotation (IntPtr geometry, out VECTOR forward, out VECTOR up);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetPosition (IntPtr geometry, ref VECTOR position);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetPosition (IntPtr geometry, out VECTOR position);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetScale (IntPtr geometry, ref VECTOR scale);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetScale (IntPtr geometry, out VECTOR scale);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_Save (IntPtr geometry, IntPtr data, out int datasize);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_SetUserData (IntPtr geometry, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Geometry_GetUserData (IntPtr geometry, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- /*
- 'Reverb3D' API
- */
- public struct Reverb3D
- {
- public RESULT release()
- {
- return FMOD5_Reverb3D_Release(this.handle);
- }
-
- // Reverb manipulation.
- public RESULT set3DAttributes(ref VECTOR position, float mindistance, float maxdistance)
- {
- return FMOD5_Reverb3D_Set3DAttributes(this.handle, ref position, mindistance, maxdistance);
- }
- public RESULT get3DAttributes(ref VECTOR position, ref float mindistance, ref float maxdistance)
- {
- return FMOD5_Reverb3D_Get3DAttributes(this.handle, ref position, ref mindistance, ref maxdistance);
- }
- public RESULT setProperties(ref REVERB_PROPERTIES properties)
- {
- return FMOD5_Reverb3D_SetProperties(this.handle, ref properties);
- }
- public RESULT getProperties(ref REVERB_PROPERTIES properties)
- {
- return FMOD5_Reverb3D_GetProperties(this.handle, ref properties);
- }
- public RESULT setActive(bool active)
- {
- return FMOD5_Reverb3D_SetActive(this.handle, active);
- }
- public RESULT getActive(out bool active)
- {
- return FMOD5_Reverb3D_GetActive(this.handle, out active);
- }
-
- // Userdata set/get.
- public RESULT setUserData(IntPtr userdata)
- {
- return FMOD5_Reverb3D_SetUserData(this.handle, userdata);
- }
- public RESULT getUserData(out IntPtr userdata)
- {
- return FMOD5_Reverb3D_GetUserData(this.handle, out userdata);
- }
-
- #region importfunctions
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_Release (IntPtr reverb3d);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_Set3DAttributes (IntPtr reverb3d, ref VECTOR position, float mindistance, float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_Get3DAttributes (IntPtr reverb3d, ref VECTOR position, ref float mindistance, ref float maxdistance);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_SetProperties (IntPtr reverb3d, ref REVERB_PROPERTIES properties);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_GetProperties (IntPtr reverb3d, ref REVERB_PROPERTIES properties);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_SetActive (IntPtr reverb3d, bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_GetActive (IntPtr reverb3d, out bool active);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_SetUserData (IntPtr reverb3d, IntPtr userdata);
- [DllImport(VERSION.dll)]
- private static extern RESULT FMOD5_Reverb3D_GetUserData (IntPtr reverb3d, out IntPtr userdata);
- #endregion
-
- #region wrapperinternal
-
- public IntPtr handle;
-
- public bool hasHandle() { return this.handle != IntPtr.Zero; }
- public void clearHandle() { this.handle = IntPtr.Zero; }
-
- #endregion
- }
-
- #region String Helper Functions
- [StructLayout(LayoutKind.Sequential)]
- public struct StringWrapper
- {
- IntPtr nativeUtf8Ptr;
-
- public static implicit operator string(StringWrapper fstring)
- {
- using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
- {
- return encoder.stringFromNative(fstring.nativeUtf8Ptr);
- }
- }
- }
-
- static class StringHelper
- {
- public class ThreadSafeEncoding : IDisposable
- {
- UTF8Encoding encoding = new UTF8Encoding();
- byte[] encodedBuffer = new byte[128];
- char[] decodedBuffer = new char[128];
- bool inUse;
-
- public bool InUse() { return inUse; }
- public void SetInUse() { inUse = true; }
-
- private int roundUpPowerTwo(int number)
- {
- int newNumber = 1;
- while (newNumber <= number)
- {
- newNumber *= 2;
- }
-
- return newNumber;
- }
-
- public byte[] byteFromStringUTF8(string s)
- {
- if (s == null)
- {
- return null;
- }
-
- int maximumLength = encoding.GetMaxByteCount(s.Length) + 1; // +1 for null terminator
- if (maximumLength > encodedBuffer.Length)
- {
- int encodedLength = encoding.GetByteCount(s) + 1; // +1 for null terminator
- if (encodedLength > encodedBuffer.Length)
- {
- encodedBuffer = new byte[roundUpPowerTwo(encodedLength)];
- }
- }
-
- int byteCount = encoding.GetBytes(s, 0, s.Length, encodedBuffer, 0);
- encodedBuffer[byteCount] = 0; // Apply null terminator
-
- return encodedBuffer;
- }
-
- public string stringFromNative(IntPtr nativePtr)
- {
- if (nativePtr == IntPtr.Zero)
- {
- return "";
- }
-
- int nativeLen = 0;
- while (Marshal.ReadByte(nativePtr, nativeLen) != 0)
- {
- nativeLen++;
- }
-
- if (nativeLen == 0)
- {
- return "";
- }
-
- if (nativeLen > encodedBuffer.Length)
- {
- encodedBuffer = new byte[roundUpPowerTwo(nativeLen)];
- }
-
- Marshal.Copy(nativePtr, encodedBuffer, 0, nativeLen);
-
- int maximumLength = encoding.GetMaxCharCount(nativeLen);
- if (maximumLength > decodedBuffer.Length)
- {
- int decodedLength = encoding.GetCharCount(encodedBuffer, 0, nativeLen);
- if (decodedLength > decodedBuffer.Length)
- {
- decodedBuffer = new char[roundUpPowerTwo(decodedLength)];
- }
- }
-
- int charCount = encoding.GetChars(encodedBuffer, 0, nativeLen, decodedBuffer, 0);
-
- return new String(decodedBuffer, 0, charCount);
- }
-
- public void Dispose()
- {
- lock (encoders)
- {
- inUse = false;
- }
- }
- }
-
- static List encoders = new List(1);
-
- public static ThreadSafeEncoding GetFreeHelper()
- {
- lock (encoders)
- {
- ThreadSafeEncoding helper = null;
- // Search for not in use helper
- for (int i = 0; i < encoders.Count; i++)
- {
- if (!encoders[i].InUse())
- {
- helper = encoders[i];
- break;
- }
- }
- // Otherwise create another helper
- if (helper == null)
- {
- helper = new ThreadSafeEncoding();
- encoders.Add(helper);
- }
- helper.SetInUse();
- return helper;
- }
- }
- }
-
- #endregion
-}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Listener3D.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Listener3D.cs
deleted file mode 100644
index a3dd2d0..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Listener3D.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-using System.Collections.Generic;
-using Microsoft.Xna.Framework;
-
-namespace ChaiFoxes.FMODAudio
-{
- ///
- /// Sound listener in 3D space. Listens to positioned 3D sounds.
- ///
- /// NOTE: Do not mess with low-level listeners if you're using those.
- /// It *probably* should be fine, but you're doing that at your own risk.
- ///
- public class Listener3D
- {
- ///
- /// List of all listeners. Used to keep track of indices.
- ///
- private static List _listeners = new List();
-
- ///
- /// Listener index. Used to communicate with low-level API.
- ///
- private int _index;
-
-
- ///
- /// Listener position in 3D space. Used for panning and attenuation
- ///
- public Vector3 Position3D
- {
- get
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- return position;
- }
- set
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- SetAttributes(value, velocity, forwardVector, upVector);
- }
- }
-
- ///
- /// Listener velocity in 3D space. Used for doppler effect.
- ///
- public Vector3 Velocity3D
- {
- get
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- return velocity;
- }
- set
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- SetAttributes(position, value, forwardVector, upVector);
- }
- }
-
- ///
- /// Forwards orientation, must be of unit length (1.0) and perpendicular to up.
- /// UnitY by default.
- ///
- public Vector3 ForwardOrientation
- {
- get
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- return forwardVector;
- }
- set
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- SetAttributes(position, velocity, value, upVector);
- }
- }
-
-
- ///
- /// Upwards orientation, must be of unit length (1.0) and perpendicular to forward.
- /// UnitZ by default.
- ///
- public Vector3 UpOrientation
- {
- get
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- return upVector;
- }
- set
- {
- GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- SetAttributes(position, velocity, forwardVector, value);
- }
- }
-
-
- ///
- /// Gets all listener attributes at once.
- ///
- public void GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector)
- {
- AudioMgr.FMODSystem.get3DListenerAttributes(
- _index,
- out FMOD.VECTOR pos,
- out FMOD.VECTOR vel,
- out FMOD.VECTOR forward,
- out FMOD.VECTOR up
- );
- position = pos.ToVector3();
- velocity = vel.ToVector3();
- forwardVector = forward.ToVector3();
- upVector = up.ToVector3();
- }
-
-
- ///
- /// Sets all listener attributes at once.
- ///
- public void SetAttributes(Vector3 position, Vector3 velocity, Vector3 forwardVector, Vector3 upVector)
- {
- var pos = position.ToFmodVector();
- var vel = velocity.ToFmodVector();
- var forw = forwardVector.ToFmodVector();
- var up = upVector.ToFmodVector();
- AudioMgr.FMODSystem.set3DListenerAttributes(
- _index,
- ref pos,
- ref vel,
- ref forw,
- ref up
- );
- }
-
-
- private Listener3D()
- {
- _index = _listeners.Count;
- _listeners.Add(this);
- AudioMgr.FMODSystem.set3DNumListeners(_listeners.Count);
-
- SetAttributes(Vector3.Zero, Vector3.Zero, Vector3.UnitY, Vector3.UnitZ);
- }
-
- ///
- /// Creates a new listener.
- ///
- ///
- public static Listener3D Create()
- {
- return new Listener3D();
- }
-
- ///
- /// Destroys the listener.
- ///
- public void Destroy()
- {
- if (_index != _listeners.Count - 1)
- {
- // Listener's index is its only link to its low-level attributes.
- // We don't have access to actual low-level listener objects -
- // if they even exist - and have to resort to this.
- // Basically, if user decides to destroy a listener from the middle of
- // listener list, we take the very last listener and place it instead
- // of the destoyed listener.
-
- var last = _listeners[_listeners.Count - 1];
-
- // Saving attribute.
- last.GetAttributes(out Vector3 position, out Vector3 velocity, out Vector3 forwardVector, out Vector3 upVector);
- // Replacing index.
- last._index = _index;
- // Copying attributes over.
- last.SetAttributes(position, velocity, forwardVector, upVector);
-
- // Changing last element's place in listener list.
- _listeners.RemoveAt(_listeners.Count - 1);
- _listeners.Insert(last._index, last);
- }
-
- _listeners.Remove(this);
- AudioMgr.FMODSystem.set3DNumListeners(_listeners.Count);
-
- _index = -1;
- }
-
-
- }
-}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Sound.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Sound.cs
deleted file mode 100644
index d7829d6..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/Sound.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-using Microsoft.Xna.Framework;
-using System.Runtime.InteropServices;
-
-// DO NOT include FMOD namespace in ANY of your classes.
-// Use FMOD.SomeClass instead.
-// FMOD classes seriously interfere with System namespace.
-
-namespace ChaiFoxes.FMODAudio
-{
- ///
- /// Sound class. Can play sound with given attributes.
- ///
- public class Sound
- {
- protected FMOD.Sound _FMODSound {get; private set;}
-
-
- ///
- /// Tells if sound is looping.
- ///
- public bool Looping
- {
- get => (Loops == -1);
- set
- {
- if (value)
- {
- Loops = -1;
- }
- else
- {
- Loops = 0;
- }
- }
- }
-
- ///
- /// Amount of loops.
- /// > 0 - Specific count.
- /// 0 - No loops.
- /// -1 - Infinite loops.
- ///
- public int Loops = 0;
-
- ///
- /// Sound pitch. Affects speed too.
- /// 1 - Normal pitch.
- /// More than 1 - Higher pitch.
- /// Less than 1 - Lower pitch.
- ///
- public float Pitch = 1;
-
- ///
- /// Sound volume.
- /// 1 - Normal volume.
- /// 0 - Muted.
- ///
- public float Volume = 1;
-
- ///
- /// Low pass filter. Makes sound muffled.
- /// 1 - No filtering.
- /// 0 - Full filtering.
- ///
- public float LowPass = 1;
-
- ///
- /// Sound mode.
- ///
- public FMOD.MODE Mode = FMOD.MODE.DEFAULT;
-
- ///
- /// Sound's default channel group.
- ///
- public FMOD.ChannelGroup ChannelGroup;
-
- ///
- /// If true, allows sound to be positioned in 3D space.
- ///
- public bool Is3D = false;
-
- ///
- /// Sound's position in 3D space. Can be used only id 3D positioning is enabled.
- ///
- public Vector3 Position3D = Vector3.Zero;
-
- ///
- /// Sound's velocity in 3D space. Can be used only id 3D positioning is enabled.
- ///
- public Vector3 Velocity3D = Vector3.Zero;
-
- ///
- /// Distance from the source where attenuation begins.
- ///
- public float MinDistance3D;
-
- ///
- /// Distance from the source where attenuation ends.
- ///
- public float MaxDistance3D;
-
-
- ///
- /// Sound buffer. Used for streamed sounds, which point to this memory.
- /// In otehr words, we need to just reference it somewhere to prevent
- /// garbage collector from collecting it.
- /// This memory is also pinned, so GC won't move it anywhere.
- ///
- /// If any unexpected crashes emerge, this is the first suspect.
- ///
- private byte[] _buffer;
-
- ///
- /// Buffer's handle.
- ///
- private GCHandle _bufferHandle;
-
-
- public Sound(FMOD.Sound sound, byte[] buffer, GCHandle bufferHandle)
- {
- _FMODSound = sound;
- _buffer = buffer;
- _bufferHandle = bufferHandle;
- }
-
- public Sound(FMOD.Sound sound)
- {
- _FMODSound = sound;
- _buffer = null;
- }
-
- public SoundChannel Play(bool paused = false) =>
- Play(ChannelGroup, paused);
-
-
- public SoundChannel Play(FMOD.ChannelGroup group, bool paused = false)
- {
- AudioMgr.FMODSystem.playSound(_FMODSound, group, paused, out FMOD.Channel fmodChannel);
- return new SoundChannel(this, fmodChannel);
- }
-
-
- ///
- /// Unloads the sound and frees its handles.
- ///
- public void Unload()
- {
- _FMODSound.release();
- if (_buffer != null)
- {
- _bufferHandle.Free();
- }
- }
-
-
- }
-}
diff --git a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/SoundChannel.cs b/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/SoundChannel.cs
deleted file mode 100644
index 01843d9..0000000
--- a/ChaiFoxes.FMODAudio/ChaiFoxes.FMODAudio/SoundChannel.cs
+++ /dev/null
@@ -1,285 +0,0 @@
-using Microsoft.Xna.Framework;
-
-// DO NOT include FMOD namespace in ANY of your classes.
-// Use FMOD.SomeClass instead.
-// FMOD classes seriously interfere with System namespace.
-
-namespace ChaiFoxes.FMODAudio
-{
- ///
- /// FMOD sound channel wrapper. Takes horrible FMOD wrapper and makes it look pretty.
- /// Basically, a playing sound instance.
- ///
- public class SoundChannel
- {
- ///
- /// FMOD channel object. Use it if you need full FMOD functionality.
- ///
- public FMOD.Channel Channel => _channel;
- protected FMOD.Channel _channel; // Can't use "out" on properties.
-
- ///
- /// Sound, from which this channel has been created.
- ///
- public readonly Sound Sound;
-
-
- ///
- /// Tells if channel is looping.
- ///
- public bool Looping
- {
- get
- {
- _channel.getLoopCount(out int loops);
- return (loops == -1);
- }
- set
- {
- if (value)
- {
- Loops = -1;
- }
- else
- {
- Loops = 0;
- }
- }
- }
-
- ///
- /// Amount of loops.
- /// > 0 - Specific count.
- /// 0 - No loops.
- /// -1 - Infinite loops.
- ///
- public int Loops
- {
- get
- {
- // Do you have some lööps, bröther?
- _channel.getLoopCount(out int loops);
- return loops;
- }
- set
- {
- if (value == 0)
- {
- Mode = FMOD.MODE.LOOP_OFF;
- }
- else
- {
- Mode = FMOD.MODE.LOOP_NORMAL;
- }
-
- _channel.setLoopCount(value);
- }
- }
-
- ///
- /// Sound pitch. Affects speed too.
- /// 1 - Normal pitch.
- /// More than 1 - Higher pitch.
- /// Less than 1 - Lower pitch.
- ///
- public float Pitch
- {
- get
- {
- _channel.getPitch(out float pitch);
- return pitch;
- }
- set =>
- _channel.setPitch(value);
- }
-
- ///
- /// Sound volume.
- /// 1 - Normal volume.
- /// 0 - Muted.
- ///
- public float Volume
- {
- get
- {
- _channel.getVolume(out float volume);
- return volume;
- }
- set =>
- _channel.setVolume(value);
- }
-
- ///
- /// Low pass filter. Makes sound muffled.
- /// 1 - No filtering.
- /// 0 - Full filtering.
- ///
- public float LowPass
- {
- get
- {
- _channel.getLowPassGain(out float lowPassGain);
- return lowPassGain;
- }
- set =>
- _channel.setLowPassGain(value);
- }
-
- ///
- /// Sound mode. Mainly used for 3D sound.
- ///
- public FMOD.MODE Mode
- {
- get
- {
- _channel.getMode(out FMOD.MODE mode);
- return mode;
- }
- set =>
- _channel.setMode(value);
- }
-
-
- ///
- /// If true, allows sound to be positioned in 3D space.
- ///
- public bool Is3D
- {
- get =>
- (Mode & FMOD.MODE._3D) != 0;
- set
- {
- if (value)
- {
- Mode = FMOD.MODE._3D;
- }
- else
- {
- Mode = FMOD.MODE._2D;
- }
- }
- }
-
- ///
- /// Sound's position in 3D space. Can be used only id 3D positioning is enabled.
- ///
- public Vector3 Position3D
- {
- get
- {
- _channel.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
- return pos.ToVector3();
- }
- set
- {
- var fmodPos = value.ToFmodVector();
- var fmodVel = Velocity3D.ToFmodVector();
- _channel.set3DAttributes(ref fmodPos, ref fmodVel);
- }
- }
-
- ///
- /// Sound's velocity in 3D space. Can be used only id 3D positioning is enabled.
- ///
- public Vector3 Velocity3D
- {
- get
- {
- _channel.get3DAttributes(out FMOD.VECTOR pos, out FMOD.VECTOR vel);
- return vel.ToVector3();
- }
- set
- {
- var fmodPos = Position3D.ToFmodVector();
- var fmodVel = value.ToFmodVector();
- _channel.set3DAttributes(ref fmodPos, ref fmodVel);
- }
- }
-
- ///
- /// Distance from the source where attenuation begins.
- ///
- public float MinDistance3D
- {
- get
- {
- _channel.get3DMinMaxDistance(out float minDistance, out float maxDistance);
- return minDistance;
- }
- set =>
- _channel.set3DMinMaxDistance(value, MaxDistance3D);
- }
-
- ///
- /// Distance from the source where attenuation ends.
- ///
- public float MaxDistance3D
- {
- get
- {
- _channel.get3DMinMaxDistance(out float minDistance, out float maxDistance);
- return maxDistance;
- }
- set =>
- _channel.set3DMinMaxDistance(MinDistance3D, value);
- }
-
-
-
- ///
- /// Tells if sound is playing.
- ///
- public bool IsPlaying
- {
- get
- {
- _channel.isPlaying(out bool isPlaying);
- return isPlaying;
- }
- }
-
- ///
- /// Track position in milliseconds.
- ///
- public uint TrackPosition
- {
- get
- {
- _channel.getPosition(out uint position, FMOD.TIMEUNIT.MS);
- return position;
- }
- set =>
- _channel.setPosition(value, FMOD.TIMEUNIT.MS);
- }
-
-
-
- public SoundChannel(Sound sound, FMOD.Channel channel)
- {
- Sound = sound;
- _channel = channel;
-
- Loops = Sound.Loops;
- Volume = Sound.Volume;
- Pitch = Sound.Pitch;
- LowPass = sound.LowPass;
- Mode = sound.Mode;
- Is3D = sound.Is3D;
- Position3D = sound.Position3D;
- Velocity3D = sound.Velocity3D;
- MinDistance3D = sound.MinDistance3D;
- MaxDistance3D = sound.MaxDistance3D;
- }
-
-
- public void Pause() =>
- _channel.setPaused(true);
-
- public void Resume() =>
- _channel.setPaused(false);
-
- public void Stop() =>
- _channel.stop();
-
- }
-}
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..7344925
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/Icon/icon.png b/Icon/icon.png
index 9b9b65d..e3c4127 100644
Binary files a/Icon/icon.png and b/Icon/icon.png differ
diff --git a/LICENSE b/LICENSE.md
similarity index 100%
rename from LICENSE
rename to LICENSE.md
diff --git a/NuGet.Config b/NuGet.Config
new file mode 100644
index 0000000..3f0e003
--- /dev/null
+++ b/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Nuspec.props b/Nuspec.props
new file mode 100644
index 0000000..157597b
--- /dev/null
+++ b/Nuspec.props
@@ -0,0 +1,14 @@
+
+
+ 2.0.0.0
+ $(PackageVersion)
+ Martenfur, StinkBrigade
+ ChaiFoxes
+ ChaiFoxes.FMODAudio
+ git
+ https://github.com/Martenfur/ChaiFoxes.FMODAudio
+ $(ProjectUrl)
+ A crossplatform FMOD audio wrapper for Monogame.
+ LICENSE.md
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 909bdba..5b24652 100644
--- a/README.md
+++ b/README.md
@@ -1,62 +1,49 @@
-# ChaiFoxes.FMODAudio
+
+
+![logo](/Icon/icon.png)
*I suffer so you won't have to.*
-The time has come. You're finally witnessing a high-level cross-platform C# library,
-which makes Monogame and FMOD best friends.
+The time has come. You're finally witnessing a high-level cross-platform C# library, which makes Monogame and FMOD best friends.
![header](/pics/ebites.png)
+In case you came here and the only thing you got so far was that hilarious doge meme, [FMOD](http://fmod.org) is quite powerful cross-platform audio engine, which is pretty much the only hope to have any decent audio in Monogame.
-In case you came here and the only thing you got so far was that hilarious doge meme,
-[FMOD](http://fmod.org) is quite powerful cross-platform audio engine, which is
-pretty much the only hope to have any decent audio in Monogame.
-
-The catch is - FMOD is written in C++, and the only thing C# overlords have
-is a bare-bones C# wrapper. No tutorials, no setup guides. Only you and DllImport.
+The catch is - FMOD is written in C++, and the only thing C# overlords have is a bare-bones C# wrapper. No tutorials, no setup guides. Only you and DllImport.
![send help](/pics/help.png)
-This is why this library exists. It does the tough part for you, and provides
-basic high-level interface.
+That's why this library exists. It does the tough part for you, and provides basic high-level interface.
-Also note that even though the primary target of this library is Monogame, its sources
-will be very useful if you want to use FMOD in some other C#-based project.
+Also note that even though the primary target of this library is Monogame, its sources will be very useful if you want to use FMOD in some other C#-based project.
## Setup
-Setting things up is a little fiddly. Here's the thing - the FMOD license prohibits
-me from distributing their libraries in my Nuget package - so you have to
-download them yourself.
+Initial setup is a little fiddly. Here's the thing - the FMOD license prohibits me from distributing their libraries in my Nuget package - so you have to download them yourself. But fear not, I've put together a detailed guide. With pictures.
+
+### Preparations
-### Preparations.
+Visit the [FMOD Download page](https://www.fmod.com/download) (accessing it requires registration), find the FMOD Studio API downloads and get APIs for Windows, Linux and Android. If you're going to set up all three, of course.
-Go to the [FMOD Download page](https://www.fmod.com/download) (accessing it requires
-registration), find the FMOD Studio API downloads and download APIs for Windows, Linux
-and Android. If you're going to set up all three, of course.
+**NOTE: Current version of the library was tested on FMOD v2.00.08. I really recommend getting it. Later versions will probably also work, but I have no guarantee.**
-Windows API requires installation, Linux and Android doesn't. You can drop them near
-the Windows API just to have everything in one place.
+Windows API requires installation, Linux and Android don't. You can drop them near the Windows API just to have everything in one place.
![setup1](/pics/setup1.png)
### Windows & Linux
1. Open your DesktopGL or SharpDX Monogame project.
-2. Install the NuGet package [ChaiFoxes.FMODAudio.Desktop](https://www.nuget.org/packages/ChaiFoxes.FMODAudio.Desktop/). Alternatively, you can compile
-it from sources.
-3. Navigate to your FMOD Windows API installation. From there navigate to `\api\core\lib`.
-You will see two directories: `x64` and `x86`. Each one will contain this:
+2. Install the NuGet package [ChaiFoxes.FMODAudio.Desktop](https://www.nuget.org/packages/ChaiFoxes.FMODAudio.Desktop/). Alternatively, you can plug repo as a submodule and reference projects directly.
+3. Navigate to your FMOD Windows API installation. From there navigate to `\api\core\lib`. You will see two directories: `x64` and `x86`. Each one will contain this:
![setup2](/pics/setup2.png)
-Out of all the files you'll need only `fmod.dll` from both `x86` and `x64` directories.
-Your Monogame project should already have `x86` and `x64` directories
-(if it doesn't - just create them). Copy corresponding versions of `fmod.dll`
-into them. You should end up with it looking like this:
+Out of all the files you'll need only `fmod.dll` from both `x86` and `x64` directories. Your Monogame project should already have `x86` and `x64` directories (if it doesn't - just create them). Copy corresponding versions of `fmod.dll` into them. You should end up with it looking like this:
![setup3](/pics/setup3.png)
@@ -65,54 +52,66 @@ Make sure dll files will be copied to the output directory:
![setup4](/pics/setup4.png)
-4. Navigate to your FMOD Linux API installation. From there navigate to `\api\core\lib`.
-This time you will see four directories:
+4. Navigate to your FMOD Linux API installation. From there navigate to `\api\core\lib`. This time you will see four directories:
![setup5](/pics/setup5.png)
-
+
You'll need only `x86` and `x86_64`.
Each directory contains this:
![setup6](/pics/setup6.png)
-You will only need `libfmod` files - those without L. Copy fmod files from `x86`
-directory to `x86` directory of your project, and then copy files from `x86_64`
-to your `x64` directory. You'll end up with this:
+You will only need `libfmod` files - the ones without L. Copy fmod files from `x86` directory to `x86` directory of your project, and then copy files from `x86_64` to your `x64` directory. You'll end up with this:
![setup7](/pics/setup7.png)
*NOTE: If you're going for Linux-only build, you can exclude fmod.dll files.*
-Again, make sure all the files you've just added will be copied
-to the output directory:
+Again, make sure all the files you've just added will be copied to the output directory:
![setup4](/pics/setup4.png)
-And that's it - you've gotten yourself cross-platform desktop FMOD!
+And that's it - you've gotten yourself cross-platform desktop FMOD! Dllmap for Linux is already done internally, no need to worry about that.
### Android
1. Open your Monogame Android project.
-2. Install NuGet package [ChaiFoxes.FMODAudio.Android](https://www.nuget.org/packages/ChaiFoxes.FMODAudio.Android/). Alternatively, you can compile
-it from sources.
+2. Install NuGet package [ChaiFoxes.FMODAudio.Android](https://www.nuget.org/packages/ChaiFoxes.FMODAudio.Android/). Alternatively, you can plug repo as a submodule and reference projects directly.
3. Create `libs` directory in the root of your project.
-4. Navigate to your FMOD Android API installation. From there navigate to
-`\api\core\lib`. You will see this:
+4. Navigate to your FMOD Android API installation. From there navigate to `\api\core\lib`. You will see this:
![setup8](/pics/setup8.png)
5. Each folder contains `libfmod.so` and `libfmodL.so`.
-You need only `libfmod.so` from each directory. Copy everything except `.jar` file over to your `libs`
-directory. You'll end up with this:
+You need only `libfmod.so` from each directory. Copy everything except `.jar` file over to your `libs` directory. Don't lose this jar, tho. We'll need it later. You'll end up with this:
![setup9](/pics/setup9.png)
-6. Select each `.so` file you've just copied, open their Properties and set their
-Build Action to `AndroidNativeLibrary`.
+6. Select each `.so` file you've just copied, open their Properties and set their Build Action to `AndroidNativeLibrary`.
![setup10](/pics/setup10.png)
+7. Create an **Android Bindings Project**.
+
+ ![setup12](/pics/setup12.png)
+
+ Remember that jar from earlier? Now you need to copy it into the Jars directory and make sure its Build Action is set to `EmbeddedJar`.
+
+ ![setup13](/pics/setup13.png)
+
+ Now reference Bindings project to your main Android project - and you're golden.
+
+ ![setup14](/pics/setup14.png)
+
+ And yes. Whole separate project for a single file. Thanks, Xamarin. There is actually a way to do this without creating a Bindings project, but that's up to you to figure out. : - )
+
+### Studio setup
+
+FMOD Studio setup process is exactly the same, but you'll need to look into `studio` instead of `core` directories. **It's also extremely important that ALL your dlls and jar are taken form the same version. FMOD doesn't like version mixup. Foxes don't like version mixup. Nobody does.**
+
+If you still have questions, take a look at the [Demos project](/ChaiFoxes.FMODAudio.Demos).
+
## Playing some tunes!
So, after you've set everything up, it's time to bop some pops, as kids say these days.
@@ -124,18 +123,36 @@ So, after you've set everything up, it's time to bop some pops, as kids say thes
3. Include the `ChaiFoxes.FMODAudio` namespace and paste the following code into your
Initialize() method:
-```
-AudioMgr.Init("Content");
+```c#
+FMODManager.Init(FMODMode.CoreAndStudio, "Content");
-var sound = AudioMgr.LoadStreamedSound("test.mp3");
+var sound = CoreSystem.LoadStreamedSound("test.mp3");
var channel = sound.Play();
channel.Looping = true;
```
4. Compile and hope that you (and me) did everything right.
-You can also check out demo project included in sources. Though, note that it requires
-main library project to be present and compiled in Debug. You can also replace project reference
-with Nuget packages.
+You can also check out the incluided [Demos project](/ChaiFoxes.FMODAudio.Demos).
+
+## Bait-and-switch
+
+As you could notice, there are only two nugets - Desktop and Android. But what if you want to use FMOD in a netstandard library? Since there is no crossplatform core FMOD library, this becomes a problem, right? Well, yeah. First-party C# bindings are made in a way that makes it impossible to extract core API without rewriting literally everything from scratch. I am not willing to do that. So, instead we will use a little trick.
+
+Bait-and switch! :0
+
+We don't have a crossplatform library. But *we can fool* the project into thinking we have one. Open up your netstandard library's `csproj` and add this:
+
+```xml
+
+ All
+
+```
+
+But wait, what's this? We are adding a desktop nuget into the crossplatform project? Why?
+
+That's the trick - we aren't actually using it! `All` makes it so the nuget's dll file is not copied over to the output directory. We are only using this nuget at compile-time - and then switching it to a platform-specific version, which is installed in your platform project.
+
+Hacky? Yes. (:
## But what about other platforms?
@@ -156,6 +173,10 @@ royalties required. Just leave a credit. ; - )
But the show's main star is a bit different. FMOD has its own [license](https://fmod.com/licensing#faq),
which is much less permissive than mine.
-Demo [music](https://www.youtube.com/watch?v=zZ81qi90E-Y) is provided by Agrofox.
+Demo [music](https://www.youtube.com/watch?v=zZ81qi90E-Y) is provided by Agrofox and FMOD team.
+
+
+
+Also big thanque to [StinkBrigade](https://github.com/StinkBrigade) who helped a ton in adding FMOD Studio support.
-*don't forget to pet your foxes*
+*don't forget to pet your foxes*
\ No newline at end of file
diff --git a/pack.bat b/pack.bat
deleted file mode 100644
index 91741c5..0000000
--- a/pack.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-nuget pack ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Desktop\ChaiFoxes.FMODAudio.Desktop.csproj -Properties Configuration=Release -Build -OutputDirectory Release\
-nuget pack ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Android\ChaiFoxes.FMODAudio.Android.csproj -Properties Configuration=Release -Build -OutputDirectory Release\
diff --git a/pack.ps1 b/pack.ps1
new file mode 100644
index 0000000..156262f
--- /dev/null
+++ b/pack.ps1
@@ -0,0 +1,9 @@
+
+Function Build([string] $target)
+{
+ $solutionPath = "ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.sln"
+ msbuild -t:$target -p:Configuration=Release -nologo $solutionPath
+}
+
+Build("restore")
+Build("pack")
diff --git a/packDebug.bat b/packDebug.bat
deleted file mode 100644
index 7c21313..0000000
--- a/packDebug.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-nuget pack ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Desktop\ChaiFoxes.FMODAudio.Desktop.csproj -Properties Configuration=Release -OutputDirectory Release\
-nuget pack ChaiFoxes.FMODAudio\ChaiFoxes.FMODAudio.Android\ChaiFoxes.FMODAudio.Android.csproj -Properties Configuration=Release -OutputDirectory Release\
diff --git a/pics/setup1.png b/pics/setup1.png
index e80ecba..38cc5e3 100644
Binary files a/pics/setup1.png and b/pics/setup1.png differ
diff --git a/pics/setup12.png b/pics/setup12.png
new file mode 100644
index 0000000..116cc38
Binary files /dev/null and b/pics/setup12.png differ
diff --git a/pics/setup13.png b/pics/setup13.png
new file mode 100644
index 0000000..8a3b9fb
Binary files /dev/null and b/pics/setup13.png differ
diff --git a/pics/setup14.png b/pics/setup14.png
new file mode 100644
index 0000000..a987801
Binary files /dev/null and b/pics/setup14.png differ
diff --git a/pics/setup2.png b/pics/setup2.png
index 9d84c8c..5954821 100644
Binary files a/pics/setup2.png and b/pics/setup2.png differ
diff --git a/pics/setup5.png b/pics/setup5.png
index a8babb7..e06fe85 100644
Binary files a/pics/setup5.png and b/pics/setup5.png differ
diff --git a/pics/setup6.png b/pics/setup6.png
index 17b63e1..e527b73 100644
Binary files a/pics/setup6.png and b/pics/setup6.png differ
diff --git a/pics/setup7.png b/pics/setup7.png
index 30897c2..df49dd4 100644
Binary files a/pics/setup7.png and b/pics/setup7.png differ
diff --git a/pics/setup8.png b/pics/setup8.png
index 50ff349..72a30e4 100644
Binary files a/pics/setup8.png and b/pics/setup8.png differ
diff --git a/pics/setup9.png b/pics/setup9.png
index e530696..541b5b8 100644
Binary files a/pics/setup9.png and b/pics/setup9.png differ