diff --git a/README.md b/README.md index e20cca02969f4a894f714a3f5f8cc7c84d553ef5..99fa1dde64dfb1ede149f63341bd00522b632f7a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # VAUnity -VAUnity provides scripts to ease usage of the VA C# binding within Unity. For example, you can use the VAUSoundSource script and drop it on a sound source object in order to connect it with a VA sound source. +VAUnity provides scripts to ease usage of the VA C# binding ([VACS](http://git.rwth-aachen.de/ita/VACS)) within Unity. For example, you can use the VAUSoundSource script and drop it on a sound source object in order to link it with a VA sound source. # Quick build guide @@ -8,11 +8,11 @@ Clone the repository into the assets folder of your Unity scene. # Howto -If you see the VAU* scripts in your Unity scene, you can start to extend your objects by sound source and listener(s). +If you see the VAU* scripts in your Unity scene, you can start to extend your objects by sound sources and listener(s). ## Connect to VA -To connect to VA, drag&drop the VAUAdapter script on any GameObject. It is recommended to create a top level empty GameObject named "VAConnection". +To connect to VA, drag&drop the VAUAdapter script on any GameObject,. It is recommended to create an empty top level GameObject named "VAConnection". ## Listener @@ -32,4 +32,4 @@ Unity has the possibility to create so called prefabs, that combine GameObjects, # Extensions -Have a look at the VAUnityExtensions project to get 3D user interfaces that control VA using menues, like muting, sound level control, direkt auralization mode manipulation and more. +Have a look at the [VAUnityExtensions](http://git.rwth-aachen.de/ita/VAUnityExtensions) project to get 3D user interfaces that control VA using menus, like muting, sound level control, direct auralization mode manipulation and more. diff --git a/VACS.cs b/VACS.cs deleted file mode 100644 index 8ca0117064f9d3f4d6f5209604fed82ea22036bb..0000000000000000000000000000000000000000 --- a/VACS.cs +++ /dev/null @@ -1,498 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using UnityEngine; - -namespace VA -{ - public class VANet - { - private IntPtr _NetClient; - - public VANet() - { - _NetClient = NativeCreateNetClient(); - } - - ~VANet() - { - NativeDisposeNetClient(_NetClient); - } - - public bool Connect() - { - bool b = NativeConnectLocalNetClient(_NetClient); - Debug.Assert(b, "Couldn't connect to VA."); - return b; - } - - public bool Connect( string HostIP , int Port ) - { - bool b = NativeConnectNetClient(_NetClient, HostIP, Port); - Debug.Assert(b, "[VAU]Couldn't connect to VA."); - return b; - } - - public bool IsConnected() - { - return NativeIsConnectedNetClient(_NetClient); - } - - public void Disconnect() - { - NativeDisconnectNetClient(_NetClient); - } - - public void Reset() - { - NativeReset(_NetClient); - } - // Listener - /** - * Create a listener (returns ID) - */ - public int CreateListener( string Name) - { - return NativeCreateListener(_NetClient, Name); - } - - public void SetListenerPosition(int Listener, double x, double y, double z) - { - NativeSetListenerPosition(_NetClient, Listener, x, y, z); - } - - public void SetListenerOrientationYPR(int iListenerID, double yaw, double pitch, double roll) - { - NativeSetListenerOrientationYPR(_NetClient, iListenerID, yaw, pitch, roll); - } - - public void SetListenerOrientationVU( int iListenerID, - double vx, double vy, double vz, - double ux, double uy, double uz) - { - NativeSetListenerOrientationVU(_NetClient, iListenerID, vx, vy, vz, ux, uy, uz); - } - - public int CreateSoundSource(string sName, int iAuralizationMode, double dVolume) - { - return NativeCreateSoundSource(_NetClient, sName, iAuralizationMode, dVolume); - } - - public void SetSoundSourcePosition(int iSoundSourceID, double x, double y, double z) - { - NativeSetSoundSourcePosition(_NetClient, iSoundSourceID, x, y, z); - } - public void SetSoundSourceOrientationYPR(int iSoundSourceID, double yaw, double pitch, double roll) - { - NativeSetSoundSourceOrientationYPR(_NetClient, iSoundSourceID, yaw, pitch, roll); - } - - public void SetSoundSourceOrientationVU(int iSoundSourceID, - double vx, double vy, double vz, - double ux, double uy, double uz) - { - NativeSetListenerOrientationVU(_NetClient, iSoundSourceID, vx, vy, vz, ux, uy, uz); - } - - public int LoadHRIRDataset(string FilePath, string Name) - { - - int b = NativeLoadHRIRDataset(_NetClient, FilePath, Name); - Debug.Assert(b != -1,"[VAU]HRIRDataset konnte nicht geladen werden."); - return b; - } - - public void FreeHRIRDataset( int HRIR ) - { - NativeFreeHRIRDataset(_NetClient, HRIR); - } - - public void SetAudiofileSignalSourcePlaybackAction(string sSignalSourceID, string sPlayState) - { - NativeSetAudiofileSignalSourcePlaybackAction(_NetClient, sSignalSourceID, sPlayState); - } - - public void SetAudiofileSignalSourcePlaybackPosition(string sSignalSourceID, double dPlaybackPosition) - { - NativeSetAudiofileSignalSourcePlaybackPosition(_NetClient, sSignalSourceID, dPlaybackPosition); - } - - public bool GetAudiofileSignalSourceIsLooping(string sSignalSourceID) - { - return NativeGetAudiofileSignalSourceIsLooping(_NetClient, sSignalSourceID); - } - - public void SetAudiofileSignalSourceIsLooping(string sSignalSourceID, bool bLooping) - { - NativeSetAudiofileSignalSourceIsLooping(_NetClient, sSignalSourceID, bLooping); - } - - public void GetSoundSourceSignalSource(int iSoundSourceID) - { - NativeGetSoundSourceSignalSource(_NetClient, iSoundSourceID); - } - - public void SetSoundSourceSignalSource(int iSoundSourceID, string sSignalSourceID) - { - NativeSetSoundSourceSignalSource(_NetClient, iSoundSourceID, sSignalSourceID); - } - - public int DeleteListener(int iListenerID) - { - return NativeDeleteListener(_NetClient, iListenerID); - } - public bool DeleteSignalSource(string sIdentifier) - { - return NativeDeleteSignalSource(_NetClient, sIdentifier); - } - public int DeleteSoundSource(int iSoundSourceID) - { - return NativeDeleteSoundSource(_NetClient, iSoundSourceID); - } - - - public string CreateAudiofileSignalSource(string FilePath, string Name) - { - StringBuilder sIdentifier = new StringBuilder(256); - int b = NativeCreateAudiofileSignalSource(_NetClient, FilePath, Name, sIdentifier); - Debug.Assert(b > 0); - Debug.Assert(sIdentifier.Length > 0); - return sIdentifier.ToString(); - } - - public void SetSoundSourceVolume(int iSoundSourceID, double dGain) - { - NativeSetSoundSourceVolume(_NetClient, iSoundSourceID, dGain); - } - - public void SetSoundSourceMuted(int iSoundSourceID, bool bMuted) - { - NativeSetSoundSourceMuted(_NetClient, iSoundSourceID, bMuted); - } - - public int LoadDirectivity(string sFileName, string sName) - { - return NativeLoadDirectivity(_NetClient, sFileName, sName); - } - public bool FreeDirectivity(int iDirID) - { - return NativeFreeDirectivity(_NetClient, iDirID); - } - public int LoadSound(string sFileName, string sName) - { - return NativeLoadSound(_NetClient, sFileName, sName); - } - public bool FreeSound(int iSoundID) - { - return NativeFreeSound(_NetClient, iSoundID); - } - public void SetSoundSourceEnabled(int iSoundSourceID, bool bEnabled) - { - NativeSetSoundSourceEnabled(_NetClient, iSoundSourceID, bEnabled); - } - public void SetListenerEnabled(int iListenerID, bool bEnabled) - { - NativeSetListenerEnabled(_NetClient, iListenerID, bEnabled); - } - public void SetListenerHRIRDataset(int iListenerID, int iHRIRDatasetID) - { - NativeSetListenerHRIRDataset(_NetClient,iListenerID, iHRIRDatasetID); - } - public void GetListenerPositionOrientationVU(int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz) - { - NativeGetListenerPositionOrientationVU(_NetClient, iListenerID, px, py, pz, vx, vy, vz, ux, uy, uz); - } - public void SetListenerPositionOrientationVU(int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz) - { - NativeSetListenerPositionOrientationVU(_NetClient, iListenerID, px, py, pz, vx, vy, vz, ux, uy, uz); - } - - public void SetSoundSourceDirectivity(int iSoundSourceID, int iDirectivityID) - { - NativeSetSoundSourceDirectivity(_NetClient, iSoundSourceID, iDirectivityID); - } - - public void SetSoundSourcePositionOrientationVU(int iSoundSourceID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz) - { - NativeSetSoundSourcePositionOrientationVU(_NetClient, iSoundSourceID, - px, py, pz, - vx, vy, vz, - ux, uy, uz); - } - - public void SetGlobalAuralizationMode(string sAuralizationMode) - { - NativeSetGlobalAuralizationMode(_NetClient, sAuralizationMode); - } - - public void SetListenerAuralizationMode(int iListenerID, string sAuralizationMode) - { - NativeSetListenerAuralizationMode(_NetClient, iListenerID, sAuralizationMode); - } - - public void SetSoundSourceAuralizationMode(int iSoundSourceID, string sAuralizationMode) - { - NativeSetSoundSourceAuralizationMode(_NetClient, iSoundSourceID, sAuralizationMode); - } - - public void SetArtificalReverbarationTime(string Renderer, double ReverbTime) - { - NativeSetArtificalReverbarationTime(_NetClient, Renderer, ReverbTime); - } - - public void SetInputMuted(bool bMuted) - { - NativeSetInputMuted(_NetClient, bMuted); - } - - public void SetOutputMuted(bool bMuted) - { - NativeSetOutputMuted(_NetClient, bMuted); - } - - public bool AddSearchPath(string SearchPath) - { - return NativeAddSearchPath(_NetClient, SearchPath); - } - public void SetRenderingModuleMuted(string sModuleID, bool bMuted) - { - NativeSetRenderingModuleMuted(_NetClient, sModuleID, bMuted); - } - public bool IsRenderingModuleMuted(IntPtr pClient, string sModuleID) - { - return NativeIsRenderingModuleMuted(_NetClient, sModuleID); - } - /* - * Native imported functions from C++ unmanaged library declared private, so they can not be accessed - * directly through C# class method - * - */ - - [DllImport( "VANetCSWrapper" ) ] private static extern IntPtr NativeCreateNetClient(); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeConnectLocalNetClient( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeConnectNetClient( IntPtr pClient, string sServerIP, int iPort ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsConnectedNetClient( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeDisconnectNetClient( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeDisposeNetClient( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetState( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeInitialize( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeFinalize( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeReset( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeAddSearchPath(IntPtr pClient, string sSearchPath); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeEnumerateModules( IntPtr pClient, std::vector& viModuleInfos ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeCallModule( IntPtr pClient, char pcModuleID, const CVAStruct& oArgs, CVAStruct& oReturn ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeLoadDirectivity( IntPtr pClient, string sFileName, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeFreeDirectivity( IntPtr pClient, int iDirID ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetDirectivityInfo( IntPtr pClient, int iDirID, CVADirectivityInfo& ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetDirectivityInfos( IntPtr pClient, std::vector& vdiDest ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeLoadHRIRDataset( IntPtr pClient, string sFileName, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeFreeHRIRDataset( IntPtr pClient, int iHRIRID ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetHRIRInfo( IntPtr pClient, int iHRIRID, CVAHRIRInfo& ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetHRIRInfos( IntPtr pClient, std::vector< CVAHRIRInfo >& vhiDest ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeLoadSound( IntPtr pClient, string sFileName, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeFreeSound( IntPtr pClient, int iSoundID ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundInfo( IntPtr pClient, int iSoundID, CVASoundInfo& ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundInfos( IntPtr pClient, std::vector& vsiDest ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativePlaySound( IntPtr pClient, int iSoundID, double dVolume ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeCreateAudiofileSignalSource( IntPtr pClient, string sFileName, string sName, StringBuilder sIdentifier ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeCreateSequencerSignalSource( IntPtr pClient, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeCreateNetworkStreamSignalSource( IntPtr pClient, string sInterface, int iPort, string sIdentifier ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeCreateEngineSignalSource( IntPtr pClient, string sIdentifier ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeCreateMachineSignalSource( IntPtr pClient, string sIdentifier ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeDeleteSignalSource( IntPtr pClient, string sIdentifier ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSignalSourceInfo( IntPtr pClient, string sSignalSourceID, CVASignalSourceInfo& ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSignalSourceInfos( IntPtr pClient, std::vector& vssiDest ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetAudiofileSignalSourcePlaybackState( IntPtr pClient, string sSignalSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetAudiofileSignalSourcePlaybackAction( IntPtr pClient, string sSignalSourceID, string sPlayState ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetAudiofileSignalSourcePlaybackPosition( IntPtr pClient, string sSignalSourceID, double dPlaybackPosition ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeGetAudiofileSignalSourceIsLooping( IntPtr pClient, string sSignalSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetAudiofileSignalSourceIsLooping( IntPtr pClient, string sSignalSourceID, bool bLooping ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeAddSoundPlayback( IntPtr pClient, string sSignalSourceID, int iSoundID, int iFlags, double dTimecode ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeRemoveSoundPlayback( IntPtr pClient, int iPlaybackID ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSignalSourceParameters( IntPtr pClient, string sSignalSourceID, CVAStruct& oParams, CVAStruct& oResult ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsSceneLocked( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeLockScene( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeUnlockScene( IntPtr pClient ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourceIDs( IntPtr pClient, std::vector& vSoundSourceIDs ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeCreateSoundSource( IntPtr pClient, string sName, int iAuralizationMode, double dVolume ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeCreateSoundSourceExplicitRenderer( IntPtr pClient, string sName, string sRendererID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeDeleteSoundSource( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceEnabled( IntPtr pClient, int iSoundSourceID, bool bEnabled ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeGetSoundSourceEnabled( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourceName( IntPtr pClient, int iSoundSourceID, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceName( IntPtr pClient, int iSoundSourceID, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourceSignalSource( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceSignalSource( IntPtr pClient, int iSoundSourceID, string sSignalSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetSoundSourceAuralizationMode( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceAuralizationMode( IntPtr pClient, int iSoundSourceID, string iAuralizationMode ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void GetSoundSourceParameters( IntPtr pClient, int iID, CVAStruct oArgs ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceParameters( IntPtr pClient, int iID, CVAStruct oParams, CVAStruct& oResult ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetSoundSourceDirectivity( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceDirectivity( IntPtr pClient, int iSoundSourceID, int iDirectivityID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetSoundSourceVolume( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceVolume( IntPtr pClient, int iSoundSourceID, double dGain ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsSoundSourceMuted( IntPtr pClient, int iSoundSourceID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceMuted( IntPtr pClient, int iSoundSourceID, bool bMuted ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourcePosition( IntPtr pClient, int iSoundSourceID, double x, double y, double z ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourceOrientationYPR( IntPtr pClient, int iSoundSourceID, double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourceOrientationVU( IntPtr pClient, int iSoundSourceID, double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourcePositionOrientationYPR( IntPtr pClient, int iSoundSourceID, - double x, double y, double z, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourcePositionOrientationVU( IntPtr pClient, int iSoundSourceID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourcePositionOrientationVelocityYPR( IntPtr pClient, int iSoundSourceID, - double dPosX, double dPosY, double dPosZ, - double dYaw, double dPitch, double dRoll, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSoundSourcePositionOrientationVelocityVU( IntPtr pClient, int iSoundSourceID, - double dPosX, double dPosY, double dPosZ, - double dViewX, double dViewY, double dViewZ, - double dUpX, double dUpY, double dUpZ, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourcePosition( IntPtr pClient, int iSoundSourceID, double x, double y, double z ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceOrientationYPR( IntPtr pClient, int iSoundSourceID, double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourceOrientationVU( IntPtr pClient, int iSoundSourceID, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourcePositionOrientationYPR( IntPtr pClient, int iSoundSourceID, - double x, double y, double z, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourcePositionOrientationVU( IntPtr pClient, int iSoundSourceID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourcePositionOrientationVelocityYPR( IntPtr pClient, int iSoundSourceID, - double dPosX, double dPosY, double dPosZ, - double dYaw, double dPitch, double dRoll, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetSoundSourcePositionOrientationVelocityVU( IntPtr pClient, int iSoundSourceID, - double dPosX, double dPosY, double dPosZ, - double dViewX, double dViewY, double dViewZ, - double dUpX, double dUpY, double dUpZ, - double dVelocityX, double dVelocityY, double dVelocityZ ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerIDs( IntPtr pClient, std::vector& vListenerIDs ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeCreateListener( IntPtr pClient, string sName); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeCreateListenerExplicitRenderer( IntPtr pClient, string sName, string sRendererID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetActiveListenerExplicitRenderer( IntPtr pClient, int iListenerID, string sRendererID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetActiveListenerExplicitRenderer( IntPtr pClient, string sRendererID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeDeleteListener( IntPtr pClient, int iListenerID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerEnabled( IntPtr pClient, int iListenerID, bool bEnabled ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeGetListenerEnabled( IntPtr pClient, int iListenerID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void GetListenerName( IntPtr pClient, int iListenerID, char cName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerName( IntPtr pClient, int iListenerID, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetListenerAuralizationMode( IntPtr pClient, int iListenerID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerAuralizationMode( IntPtr pClient, int iListenerID, string sAuralizationMode ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerParameters( IntPtr pClient, int iID, const CVAStruct& oArgs, CVAStruct& oResult ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerParameters( IntPtr pClient, int iID, const CVAStruct& oParams ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetListenerHRIRDataset( IntPtr pClient, int iListenerID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerHRIRDataset( IntPtr pClient, int iListenerID, int iHRIRDatasetID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerPosition( IntPtr pClient, int iListenerID, - double x, double y, double z ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerOrientationYPR( IntPtr pClient, int iListenerID, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerOrientationVU( IntPtr pClient, int iListenerID, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerPositionOrientationYPR( IntPtr pClient, int iListenerID, - double x, double y, double z, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerPositionOrientationVU( IntPtr pClient, int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerPositionOrientationVelocityYPR( IntPtr pClient, int iListenerID, - double dPosX, double dPosY, double dPosZ, - double dYaw, double dPitch, double dRoll, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerPositionOrientationVelocityVU( IntPtr pClient, int iListenerID, - double dPosX, double dPosY, double dPosZ, - double dViewX, double dViewY, double dViewZ, - double dUpX, double dUpY, double dUpZ, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerPosition( IntPtr pClient, int iListenerID, - double x, double y, double z ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerOrientationYPR( IntPtr pClient, int iListenerID, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerOrientationVU( IntPtr pClient, int iListenerID, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerPositionOrientationYPR( IntPtr pClient, int iListenerID, - double x, double y, double z, - double yaw, double pitch, double roll ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerPositionOrientationVU( IntPtr pClient, int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerPositionOrientationVelocityYPR( IntPtr pClient, int iListenerID, - double dPosX, double dPosY, double dPosZ, - double dYaw, double dPitch, double dRoll, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerPositionOrientationVelocityVU( IntPtr pClient, int iListenerID, - double dPosX, double dPosY, double dPosZ, - double dViewX, double dViewY, double dViewZ, - double dUpX, double dUpY, double dUpZ, - double dVelocityX, double dVelocityY, double dVelocityZ ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetListenerRealWorldHeadPositionOrientationVU( IntPtr pClient, int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetListenerRealWorldHeadPositionOrientationVU( IntPtr pClient, int iListenerID, - double px, double py, double pz, - double vx, double vy, double vz, - double ux, double uy, double uz ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeLoadScene( IntPtr pClient, string sFileName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsSceneLoaded( IntPtr pClient ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetSceneInfo( IntPtr pClient, CVASceneInfo& ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetPortalIDs( IntPtr pClient, std::vector vPortalIDs ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetPortalName( IntPtr pClient, int iPortalID, string sName ); - - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetPortalName( IntPtr pClient, int iPortalID, string sName ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetPortalState( IntPtr pClient, int iPortalID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetPortalState( IntPtr pClient, int iPortalID, double dState ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsInputMuted( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetInputMuted( IntPtr pClient, bool bMuted ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetInputGain( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetInputGain( IntPtr pClient, double dGain ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetOutputGain( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetOutputGain( IntPtr pClient, double dGain ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsOutputMuted( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetOutputMuted( IntPtr pClient, bool bMuted ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetGlobalAuralizationMode( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetGlobalAuralizationMode( IntPtr pClient, string sAuralizationMode ); - [ DllImport( "VANetCSWrapper" ) ] private static extern int NativeGetActiveListener( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetActiveListener( IntPtr pClient, int iListenerID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetCoreClock( IntPtr pClient ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetCoreClock( IntPtr pClient, double dSeconds ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetRenderingModules( IntPtr pClient, std::vector< CVAAudioRenderingModuleInfo >& voRenderer ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetRenderingModuleMuted( IntPtr pClient, string sModuleID, bool bMuted ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsRenderingModuleMuted( IntPtr pClient, string sModuleID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetRenderingModuleGain( IntPtr pClient, string sModuleID, double dGain ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetRenderingModuleGain( IntPtr pClient, string sModuleID ); - //[ DllImport( "VANetCSWrapper" ) ] private static extern void NativeGetReproductionModules( IntPtr pClient, std::vector< CVAAudioReproductionModuleInfo >& voRepros ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetReproductionModuleMuted( IntPtr pClient, string sModuleID, bool bMuted ); - [ DllImport( "VANetCSWrapper" ) ] private static extern bool NativeIsReproductionModuleMuted( IntPtr pClient, string sModuleID ); - [ DllImport( "VANetCSWrapper" ) ] private static extern void NativeSetReproductionModuleGain( IntPtr pClient, string sModuleID, double dGain ); - [ DllImport( "VANetCSWrapper" ) ] private static extern double NativeGetReproductionModuleGain( IntPtr pClient, string sModuleID ); - - - [DllImport("VANetCSWrapper")] - private static extern void NativeSetArtificalReverbarationTime(IntPtr pClient, string sRendererID, double dReverberationTime); - [DllImport("VANetCSWrapper")] - private static extern void NativeSetArtificalRoomVolume(IntPtr pClient, string sRendererID, double dVolume); - [DllImport("VANetCSWrapper")] - private static extern void NativeSetArtificalSurfaceArea(IntPtr pClient, string sRendererID, double dArea); - } -}