Skip to content

Commit 1f80da3

Browse files
committed
Added component to update AudioLink
Cleaned up a bit Added UnityEditor target
1 parent 709326f commit 1f80da3

File tree

13 files changed

+388
-1081
lines changed

13 files changed

+388
-1081
lines changed

AudioCapture/AudioCapture.vcxproj

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@
1717
<Configuration>Release</Configuration>
1818
<Platform>x64</Platform>
1919
</ProjectConfiguration>
20+
<ProjectConfiguration Include="UnityEditorDebug|Win32">
21+
<Configuration>UnityEditorDebug</Configuration>
22+
<Platform>Win32</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="UnityEditorDebug|x64">
25+
<Configuration>UnityEditorDebug</Configuration>
26+
<Platform>x64</Platform>
27+
</ProjectConfiguration>
28+
<ProjectConfiguration Include="UnityEditor|Win32">
29+
<Configuration>UnityEditor</Configuration>
30+
<Platform>Win32</Platform>
31+
</ProjectConfiguration>
32+
<ProjectConfiguration Include="UnityEditor|x64">
33+
<Configuration>UnityEditor</Configuration>
34+
<Platform>x64</Platform>
35+
</ProjectConfiguration>
2036
</ItemGroup>
2137
<ItemGroup>
2238
<ClCompile Include="Src\AudioCapture.cpp" />
@@ -54,6 +70,20 @@
5470
<WholeProgramOptimization>true</WholeProgramOptimization>
5571
<CharacterSet>Unicode</CharacterSet>
5672
</PropertyGroup>
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|Win32'" Label="Configuration">
74+
<ConfigurationType>DynamicLibrary</ConfigurationType>
75+
<UseDebugLibraries>false</UseDebugLibraries>
76+
<PlatformToolset>v143</PlatformToolset>
77+
<WholeProgramOptimization>true</WholeProgramOptimization>
78+
<CharacterSet>Unicode</CharacterSet>
79+
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|Win32'" Label="Configuration">
81+
<ConfigurationType>DynamicLibrary</ConfigurationType>
82+
<UseDebugLibraries>false</UseDebugLibraries>
83+
<PlatformToolset>v143</PlatformToolset>
84+
<WholeProgramOptimization>true</WholeProgramOptimization>
85+
<CharacterSet>Unicode</CharacterSet>
86+
</PropertyGroup>
5787
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
5888
<ConfigurationType>DynamicLibrary</ConfigurationType>
5989
<UseDebugLibraries>true</UseDebugLibraries>
@@ -67,6 +97,20 @@
6797
<WholeProgramOptimization>true</WholeProgramOptimization>
6898
<CharacterSet>Unicode</CharacterSet>
6999
</PropertyGroup>
100+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|x64'" Label="Configuration">
101+
<ConfigurationType>DynamicLibrary</ConfigurationType>
102+
<UseDebugLibraries>false</UseDebugLibraries>
103+
<PlatformToolset>v143</PlatformToolset>
104+
<WholeProgramOptimization>true</WholeProgramOptimization>
105+
<CharacterSet>Unicode</CharacterSet>
106+
</PropertyGroup>
107+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|x64'" Label="Configuration">
108+
<ConfigurationType>DynamicLibrary</ConfigurationType>
109+
<UseDebugLibraries>false</UseDebugLibraries>
110+
<PlatformToolset>v143</PlatformToolset>
111+
<WholeProgramOptimization>true</WholeProgramOptimization>
112+
<CharacterSet>Unicode</CharacterSet>
113+
</PropertyGroup>
70114
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
71115
<ImportGroup Label="ExtensionSettings">
72116
</ImportGroup>
@@ -78,12 +122,24 @@
78122
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
79123
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
80124
</ImportGroup>
125+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|Win32'" Label="PropertySheets">
126+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
127+
</ImportGroup>
128+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|Win32'" Label="PropertySheets">
129+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
130+
</ImportGroup>
81131
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82132
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
83133
</ImportGroup>
84134
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85135
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
86136
</ImportGroup>
137+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|x64'" Label="PropertySheets">
138+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
139+
</ImportGroup>
140+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|x64'" Label="PropertySheets">
141+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
142+
</ImportGroup>
87143
<PropertyGroup Label="UserMacros" />
88144
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
89145
<ClCompile>
@@ -121,6 +177,46 @@
121177
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
122178
</Link>
123179
</ItemDefinitionGroup>
180+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|Win32'">
181+
<ClCompile>
182+
<WarningLevel>Level3</WarningLevel>
183+
<FunctionLevelLinking>true</FunctionLevelLinking>
184+
<IntrinsicFunctions>true</IntrinsicFunctions>
185+
<SDLCheck>true</SDLCheck>
186+
<PreprocessorDefinitions>WIN32;NDEBUG;AC2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
187+
<ConformanceMode>true</ConformanceMode>
188+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
189+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
190+
</ClCompile>
191+
<Link>
192+
<SubSystem>Windows</SubSystem>
193+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
194+
<OptimizeReferences>true</OptimizeReferences>
195+
<GenerateDebugInformation>true</GenerateDebugInformation>
196+
<EnableUAC>false</EnableUAC>
197+
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
198+
</Link>
199+
</ItemDefinitionGroup>
200+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|Win32'">
201+
<ClCompile>
202+
<WarningLevel>Level3</WarningLevel>
203+
<FunctionLevelLinking>true</FunctionLevelLinking>
204+
<IntrinsicFunctions>true</IntrinsicFunctions>
205+
<SDLCheck>true</SDLCheck>
206+
<PreprocessorDefinitions>WIN32;NDEBUG;AC2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
207+
<ConformanceMode>true</ConformanceMode>
208+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
209+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
210+
</ClCompile>
211+
<Link>
212+
<SubSystem>Windows</SubSystem>
213+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
214+
<OptimizeReferences>true</OptimizeReferences>
215+
<GenerateDebugInformation>true</GenerateDebugInformation>
216+
<EnableUAC>false</EnableUAC>
217+
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
218+
</Link>
219+
</ItemDefinitionGroup>
124220
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
125221
<ClCompile>
126222
<WarningLevel>Level3</WarningLevel>
@@ -157,6 +253,46 @@
157253
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
158254
</Link>
159255
</ItemDefinitionGroup>
256+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditor|x64'">
257+
<ClCompile>
258+
<WarningLevel>Level3</WarningLevel>
259+
<FunctionLevelLinking>true</FunctionLevelLinking>
260+
<IntrinsicFunctions>true</IntrinsicFunctions>
261+
<SDLCheck>true</SDLCheck>
262+
<PreprocessorDefinitions>NDEBUG;AC2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
263+
<ConformanceMode>true</ConformanceMode>
264+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
265+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
266+
</ClCompile>
267+
<Link>
268+
<SubSystem>Windows</SubSystem>
269+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
270+
<OptimizeReferences>true</OptimizeReferences>
271+
<GenerateDebugInformation>true</GenerateDebugInformation>
272+
<EnableUAC>false</EnableUAC>
273+
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
274+
</Link>
275+
</ItemDefinitionGroup>
276+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnityEditorDebug|x64'">
277+
<ClCompile>
278+
<WarningLevel>Level3</WarningLevel>
279+
<FunctionLevelLinking>true</FunctionLevelLinking>
280+
<IntrinsicFunctions>true</IntrinsicFunctions>
281+
<SDLCheck>true</SDLCheck>
282+
<PreprocessorDefinitions>NDEBUG;AC2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
283+
<ConformanceMode>true</ConformanceMode>
284+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
285+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
286+
</ClCompile>
287+
<Link>
288+
<SubSystem>Windows</SubSystem>
289+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
290+
<OptimizeReferences>true</OptimizeReferences>
291+
<GenerateDebugInformation>true</GenerateDebugInformation>
292+
<EnableUAC>false</EnableUAC>
293+
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);Winmm.lib;Avrt.lib</AdditionalDependencies>
294+
</Link>
295+
</ItemDefinitionGroup>
160296
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
161297
<ImportGroup Label="ExtensionTargets">
162298
</ImportGroup>

FriesBSCam.sln

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,32 @@ EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1212
Debug|Any CPU = Debug|Any CPU
13-
Debug|x64 = Debug|x64
14-
Debug|x86 = Debug|x86
1513
Plugin|Any CPU = Plugin|Any CPU
16-
Plugin|x64 = Plugin|x64
17-
Plugin|x86 = Plugin|x86
1814
Release|Any CPU = Release|Any CPU
19-
Release|x64 = Release|x64
20-
Release|x86 = Release|x86
15+
UnityEditor|Any CPU = UnityEditor|Any CPU
16+
UnityEditorDebug|Any CPU = UnityEditorDebug|Any CPU
2117
EndGlobalSection
2218
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2319
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2420
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|x64.ActiveCfg = Debug|Any CPU
26-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|x64.Build.0 = Debug|Any CPU
27-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|x86.ActiveCfg = Debug|Any CPU
28-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Debug|x86.Build.0 = Debug|Any CPU
2921
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|Any CPU.ActiveCfg = Debug|Any CPU
3022
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|Any CPU.Build.0 = Debug|Any CPU
31-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|x64.ActiveCfg = Debug|Any CPU
32-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|x64.Build.0 = Debug|Any CPU
33-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|x86.ActiveCfg = Release|Any CPU
34-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Plugin|x86.Build.0 = Release|Any CPU
3523
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|Any CPU.ActiveCfg = Release|Any CPU
3624
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|x64.ActiveCfg = Release|Any CPU
38-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|x64.Build.0 = Release|Any CPU
39-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|x86.ActiveCfg = Release|Any CPU
40-
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.Release|x86.Build.0 = Release|Any CPU
25+
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.UnityEditor|Any CPU.ActiveCfg = UnityEditor|Any CPU
26+
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.UnityEditor|Any CPU.Build.0 = UnityEditor|Any CPU
27+
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.UnityEditorDebug|Any CPU.ActiveCfg = UnityEditorDebug|Any CPU
28+
{B7D82AFE-AB72-465E-A639-94FFD6BAF29B}.UnityEditorDebug|Any CPU.Build.0 = UnityEditorDebug|Any CPU
4129
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|Any CPU.ActiveCfg = Debug|x64
4230
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|Any CPU.Build.0 = Debug|x64
43-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|x64.ActiveCfg = Debug|x64
44-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|x64.Build.0 = Debug|x64
45-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|x86.ActiveCfg = Debug|Win32
46-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Debug|x86.Build.0 = Debug|Win32
4731
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|Any CPU.ActiveCfg = Debug|x64
4832
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|Any CPU.Build.0 = Debug|x64
49-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|x64.ActiveCfg = Debug|x64
50-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|x64.Build.0 = Debug|x64
51-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|x86.ActiveCfg = Debug|Win32
52-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Plugin|x86.Build.0 = Debug|Win32
5333
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|Any CPU.ActiveCfg = Release|x64
5434
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|Any CPU.Build.0 = Release|x64
55-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|x64.ActiveCfg = Release|x64
56-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|x64.Build.0 = Release|x64
57-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|x86.ActiveCfg = Release|Win32
58-
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.Release|x86.Build.0 = Release|Win32
35+
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.UnityEditor|Any CPU.ActiveCfg = UnityEditor|x64
36+
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.UnityEditor|Any CPU.Build.0 = UnityEditor|x64
37+
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.UnityEditorDebug|Any CPU.ActiveCfg = UnityEditorDebug|x64
38+
{C8B9EA07-7F05-4729-AA28-5090CF65CAC0}.UnityEditorDebug|Any CPU.Build.0 = UnityEditorDebug|x64
5939
EndGlobalSection
6040
GlobalSection(SolutionProperties) = preSolution
6141
HideSolutionNode = FALSE

TestProject/FriesBSCameraPlugin.csproj

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<LangVersion>latest</LangVersion>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8+
<Configurations>Debug;Release;UnityEditor;UnityEditorDebug</Configurations>
89
</PropertyGroup>
910

11+
12+
<ItemGroup Condition="'$(Configuration)'=='UnityEditor'">
13+
<Compile Remove="Src\MyCameraPlugin.cs" />
14+
<Compile Remove="Src\Camera\CameraData.cs" />
15+
<Compile Remove="Src\Camera\CameraTransition.cs" />
16+
</ItemGroup>
17+
<ItemGroup Condition="'$(Configuration)'=='UnityEditorDebug'">
18+
<Compile Remove="Src\MyCameraPlugin.cs" />
19+
<Compile Remove="Src\Camera\CameraData.cs" />
20+
<Compile Remove="Src\Camera\CameraTransition.cs" />
21+
</ItemGroup>
22+
23+
24+
<ItemGroup Condition="'$(Configuration)'=='UnityEditorDebug'">
25+
<Compile Remove="Src\MyCameraPlugin.cs" />
26+
</ItemGroup>
27+
1028
<ItemGroup>
1129
<None Remove="Src\AudioLink\Bundle" />
1230
</ItemGroup>

TestProject/Src/AttributeParser.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,31 @@ public enum eReflectionTokenType
99
INVALID, OPEN_BRACE, CLOSE_BRACE, IGNORED, INVERTED_COMMA, IDENT, EQUAL, STRING
1010
};
1111

12+
public static class AttrExten
13+
{
14+
public static float ParseFloat(this ReflectionToken token, float def = 0.0f)
15+
{
16+
float outFloat = 0.0f;
17+
if (float.TryParse(token.mValue, out outFloat))
18+
{
19+
return outFloat;
20+
}
21+
22+
return def;
23+
}
24+
25+
public static bool ParseBool(this ReflectionToken token, bool def = false)
26+
{
27+
bool outBool = false;
28+
if (bool.TryParse(token.mValue, out outBool))
29+
{
30+
return outBool;
31+
}
32+
33+
return def;
34+
}
35+
}
36+
1237
public class ReflectionToken
1338
{
1439
public eReflectionTokenType mTokenType;

TestProject/Src/AudioLink/AssetBundleManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ internal static void LoadFromMemoryAsync()
1919
byte[] bytes;
2020

2121
//var names = typeof(AssetBundleManager).Assembly.GetManifestResourceNames();
22-
//MyCameraPlugin.Log("Names: ");
22+
//Logger.Log("Names: ");
2323
//foreach (var name in names)
2424
//{
25-
// MyCameraPlugin.Log(name);
25+
// Logger.Log(name);
2626
//}
2727

2828
using (Stream stream = typeof(AssetBundleManager).Assembly.GetManifestResourceStream(PATH)!)
@@ -36,9 +36,9 @@ internal static void LoadFromMemoryAsync()
3636
Material = bundle.LoadAsset<Material>("assets/audioLink/materials/mat_audiolink.mat");
3737
RenderTexture = bundle.LoadAsset<RenderTexture>("assets/audiolink/rendertextures/rt_audiolink.asset");
3838

39-
MyCameraPlugin.Log("Created Assets:" );
40-
MyCameraPlugin.Log(" " + Material.name);
41-
MyCameraPlugin.Log(" " + RenderTexture.name);
39+
Logger.Log("Created Assets:" );
40+
Logger.Log(" " + Material.name);
41+
Logger.Log(" " + RenderTexture.name);
4242
}
4343
}
4444
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using System.Runtime.InteropServices;
5+
6+
namespace FriesBSCameraPlugin
7+
{
8+
static class AudioCapture
9+
{
10+
[DllImport("AudioCapture.dll")]
11+
public static extern int Init([MarshalAs(UnmanagedType.BStr)] string device);
12+
13+
[DllImport("AudioCapture.dll")]
14+
public static extern int GetNumChannels();
15+
16+
[DllImport("AudioCapture.dll")]
17+
public static extern int Shutdown();
18+
19+
[DllImport("AudioCapture.dll")]
20+
public static extern bool HasError();
21+
22+
[DllImport("AudioCapture.dll")]
23+
public static extern int ReadData([Out] byte[] data, int size);
24+
25+
[DllImport("AudioCapture.dll", CallingConvention = CallingConvention.Cdecl)]
26+
[return: MarshalAs(UnmanagedType.BStr)]
27+
public static extern string GetDeviceName(int index);
28+
29+
[DllImport("AudioCapture.dll", CallingConvention = CallingConvention.Cdecl)]
30+
[return: MarshalAs(UnmanagedType.BStr)]
31+
public static extern string GetSelectedDeviceName();
32+
33+
[DllImport("AudioCapture.dll")]
34+
public static extern int GetNumDevices();
35+
36+
37+
}
38+
}

0 commit comments

Comments
 (0)