Commit 52934fd8 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Fixing some issues with simple example net client test, but not all solved yet...

Fixing some issues with simple example net client test, but not all solved yet ... runs into an exception that is successfully transmitted to client.
parent 7d5c1742
......@@ -15,7 +15,11 @@
#include <VA.h>
#include <VANet.h>
#include <string>
#include <iostream>
using namespace std;
int main( int, char** )
{
......@@ -27,24 +31,34 @@ int main( int, char** )
IVAInterface* pVA = pVANet->GetCoreInstance();
pVA->Reset();
try
{
if( pVA->GetState() != IVAInterface::VA_CORESTATE_READY )
pVA->Initialize();
pVA->Reset();
const std::string sSignalSourceID = pVA->CreateSignalSourceBufferFromFile( "ita_demosound.wav" );
pVA->SetSignalSourceBufferPlaybackAction( sSignalSourceID, IVAInterface::VA_PLAYBACK_ACTION_PLAY );
pVA->SetSignalSourceBufferLooping( sSignalSourceID, true );
const std::string sSignalSourceID = pVA->CreateSignalSourceBufferFromFile( "ita_demosound.wav" );
pVA->SetSignalSourceBufferPlaybackAction( sSignalSourceID, IVAInterface::VA_PLAYBACK_ACTION_PLAY );
pVA->SetSignalSourceBufferLooping( sSignalSourceID, true );
const int iSoundSourceID = pVA->CreateSoundSource( "C++ Sound Source" );
pVA->SetSoundSourcePose( iSoundSourceID, VAVec3( -2.0f, 1.7f, -2.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
const int iSoundSourceID = pVA->CreateSoundSource( "C++ Sound Source" );
pVA->SetSoundSourcePose( iSoundSourceID, VAVec3( -2.0f, 1.7f, -2.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
pVA->SetSoundSourceSignalSource( iSoundSourceID, sSignalSourceID );
pVA->SetSoundSourceSignalSource( iSoundSourceID, sSignalSourceID );
const int iHRIR = pVA->CreateDirectivityFromFile( "NeumannKU100.v17.ir.daff" );
const int iHRIR = pVA->CreateDirectivityFromFile( "NeumannKU100.v17.ir.daff" );
const int iSoundReceiverID = pVA->CreateSoundReceiver( "C++ Listener" );
pVA->SetSoundReceiverPose( iSoundReceiverID, VAVec3( 0.0f, 1.7f, 0.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
pVA->SetSoundReceiverDirectivity( iSoundReceiverID, iHRIR );
const int iSoundReceiverID = pVA->CreateSoundReceiver( "C++ Listener" );
pVA->SetSoundReceiverPose( iSoundReceiverID, VAVec3( 0.0f, 1.7f, 0.0f ), VAQuat( 0.0f, 0.0f, 0.0f, 1.0f ) );
pVA->SetSoundReceiverDirectivity( iSoundReceiverID, iHRIR );
// do something that suspends the program ...
// do something that suspends the program ...
}
catch( CVAException& e )
{
cerr << "Caught a VA exception on server side: " << e << endl;
}
pVANet->Disconnect();
delete pVANet;
......
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