Applying new API

parent 58ba7731
......@@ -35,7 +35,7 @@ int main( int, char** )
pClient->SetExceptionHandlingMode( IVANetClient::EXC_SERVER_PRINT );
int nState = pClient->GetCoreInstance()->GetState();
if( nState != IVACore::VA_CORESTATE_READY )
if( nState != IVAInterface::VA_CORESTATE_READY )
pClient->GetCoreInstance()->Initialize();
bool bContinue = true;
......@@ -53,7 +53,7 @@ int main( int, char** )
break;
case 'd':
{
int iRet = pClient->GetCoreInstance()->LoadDirectivity( "test", "testname" );
int iRet = pClient->GetCoreInstance()->CreateDirectivityFromFile( "test", "testname" );
std::cout << "LoadDirectivity( test, testname ) = " << iRet << std::endl;
break;
}
......@@ -62,7 +62,7 @@ int main( int, char** )
bMute = !bMute;
pClient->GetCoreInstance()->SetOutputMuted( bMute );
std::cout << "SetOutputMuted( " << bMute << " ) called" << std::endl;
bool bIsMuted = pClient->GetCoreInstance()->IsOutputMuted();
bool bIsMuted = pClient->GetCoreInstance()->GetOutputMuted();
std::cout << "IsOutputMuted() = " << bIsMuted << std::endl;
break;
}
......@@ -71,18 +71,18 @@ int main( int, char** )
bMute = !bMute;
pClient->GetCoreInstance()->SetOutputMuted( bMute );
std::cout << "SetListenerPosition( " << bMute << " ) called" << std::endl;
pClient->GetCoreInstance()->SetListenerPosition( 0, 1, 2, 3 );
pClient->GetCoreInstance()->SetSoundReceiverPosition( 0, VAVec3( 1, 2, 3 ) );
break;
}
case 'b':
{
pClient->GetCoreInstance()->LockScene();
pClient->GetCoreInstance()->LockUpdate();
std::cout << "LockScene() called" << std::endl;
break;
}
case 'e':
{
int iNum = pClient->GetCoreInstance()->UnlockScene();
int iNum = pClient->GetCoreInstance()->UnlockUpdate();
std::cout << "UnlockScene() = " << iNum << std::endl;
break;
}
......@@ -92,11 +92,11 @@ int main( int, char** )
CVAStruct oArgs, oRet;
oArgs[ "info" ] = true;
pClient->GetCoreInstance()->CallModule( sModuleID, oArgs, oRet );
oRet = pClient->GetCoreInstance()->CallModule( sModuleID, oArgs );
cout << oRet << endl;
oArgs.Clear();
oArgs[ "listener" ] = pClient->GetCoreInstance()->CreateListener( "PGP_test_listener" );
oArgs[ "listener" ] = pClient->GetCoreInstance()->CreateSoundReceiver( "PGP_test_listener" );
oArgs[ "source" ] = pClient->GetCoreInstance()->CreateSoundSource( "PGP_test_source" );
std::vector< float > vfData( 900000 );
for( size_t i = 0; i < vfData.size(); i++ )
......@@ -104,7 +104,7 @@ int main( int, char** )
oArgs[ "ch1" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) );
oArgs[ "ch2" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) );
oArgs[ "verbose" ] = true;
pClient->GetCoreInstance()->CallModule( sModuleID, oArgs, oRet );
oRet = pClient->GetCoreInstance()->CallModule( sModuleID, oArgs );
cout << oRet << endl;
break;
......
......@@ -19,11 +19,11 @@
#include <VistaBase/VistaTimeUtils.h>
int main( int argc, char* argv[] )
int main( int, char** )
{
IVANetServer* pServer = IVANetServer::Create();
pServer->SetCoreInstance( IVACore::CreateCoreInstance() );
pServer->SetCoreInstance( VACore::CreateCoreInstance() );
std::string sServerIP = "0.0.0.0";
int iPort = 12340;
......
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