Commit 6d4c6a15 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing C# example problems

parent d80ba674
......@@ -346,32 +346,35 @@ va.disconnect
<h5>C#</h5>
<pre><code>using VA;
namespace VAExample
{
VA = new VANet();
namespace VA {
class VAExample
{
static void Main(string[] args)
{
VAConnection = new VANet();
VAConnection.Connect();
VAConnection.Reset();
VA.Connect();
VA.Reset();
string SignalSourceID = VAConnection.CreateSignalSourceBufferFromFile("$(DemoSound)");
VAConnection.SetSignalSourceBufferPlaybackAction(SignalSourceID, "play");
VAConnection.SetSignalSourceBufferIsLooping(SignalSourceID, true);
string SignalSourceID = VA.CreateSignalSourceBufferFromFile( "$(DemoSound)" );
VA.SetSignalSourceBufferPlaybackAction( SignalSourceID, "play" );
VA.SetSignalSourceBufferLooping( SignalSourceID, true );
int SoundSourceID = VAConnection.CreateSoundSource("C# example sound source");
VAConnection.SetSoundSourcePose(SoundSourceID, new VAVec3(-2.0f, 1.7f, -2.0f), new VAQuat(0.0f, 0.0f, 0.0f, 1.0f));
int SoundSourceID = VA.CreateSoundSource( "C# example sound source" );
VA.SetSoundSourcePose( SoundSourceID, VAVec3( -2.0f, 1.7f, -2.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
VAConnection.SetSoundSourceSignalSource(SoundSourceID, SignalSourceID);
VA.SetSoundSourceSignalSource( SoundSourceID, SignalSourceID );
int HRIR = VAConnection.CreateDirectivityFromFile("$(DefaultHRIR)");
int HRIR = VA.CreateDirectivityFromFile( "$(DefaultHRIR)" );
int SoundReceiverID = VAConnection.CreateSoundReceiver("C# example sound receiver");
VAConnection.SetSoundReceiverPose(SoundReceiverID, new VAVec3(0.0f, 1.7f, 0.0f), new VAQuat(0.0f, 0.0f, 0.0f, 1.0f));
VAConnection.SetSoundReceiverDirectivity(SoundReceiverID, HRIR);
int SoundReceiverID = VA.CreateSoundReceiver( "C# example sound receiver" );
VA.SetSoundReceiverPose( SoundReceiverID, VAVec3( 0.0f, 1.7f, 0.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
VA.SetSoundReceiverDirectivity( SoundReceiverID, HRIR );
// do something that suspends the program ...
// do something that suspends the program ...
VA.Disconnect();
VAConnection.Disconnect();
}
}
}</code></pre>
</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment