Commit 7d5c1742 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Improving output of VANet test cliet

parent 514be847
...@@ -36,7 +36,13 @@ int main( int, char** ) ...@@ -36,7 +36,13 @@ int main( int, char** )
int nState = pClient->GetCoreInstance()->GetState(); int nState = pClient->GetCoreInstance()->GetState();
if( nState != IVAInterface::VA_CORESTATE_READY ) if( nState != IVAInterface::VA_CORESTATE_READY )
{
cout << "Server ready but not audio streaming not started, initializing ... ";
pClient->GetCoreInstance()->Initialize(); pClient->GetCoreInstance()->Initialize();
cout << "done" << endl;
}
cout << "Type d,m,s,b,e,j,q + ENTER for test actions" << endl;
bool bContinue = true; bool bContinue = true;
bool bMute = false; bool bMute = false;
...@@ -53,8 +59,8 @@ int main( int, char** ) ...@@ -53,8 +59,8 @@ int main( int, char** )
break; break;
case 'd': case 'd':
{ {
int iRet = pClient->GetCoreInstance()->CreateDirectivityFromFile( "test", "testname" ); int iRet = pClient->GetCoreInstance()->CreateDirectivityFromFile( "ITA_Kunstkopf.v17.ir.daff", "Test HRIR" );
std::cout << "LoadDirectivity( test, testname ) = " << iRet << std::endl; std::cout << "CreateDirectivityFromFile( 'ITA_Kunstkopf.v17.ir.daff', 'Test HRIR' ) = " << iRet << std::endl;
break; break;
} }
case 'm': case 'm':
...@@ -63,32 +69,32 @@ int main( int, char** ) ...@@ -63,32 +69,32 @@ int main( int, char** )
pClient->GetCoreInstance()->SetOutputMuted( bMute ); pClient->GetCoreInstance()->SetOutputMuted( bMute );
std::cout << "SetOutputMuted( " << bMute << " ) called" << std::endl; std::cout << "SetOutputMuted( " << bMute << " ) called" << std::endl;
bool bIsMuted = pClient->GetCoreInstance()->GetOutputMuted(); bool bIsMuted = pClient->GetCoreInstance()->GetOutputMuted();
std::cout << "IsOutputMuted() = " << bIsMuted << std::endl; std::cout << "GetOutputMuted() = " << bIsMuted << std::endl;
break; break;
} }
case 's': case 's':
{ {
bMute = !bMute; auto id = pClient->GetCoreInstance()->CreateSoundReceiver();
pClient->GetCoreInstance()->SetOutputMuted( bMute ); std::cout << "CreateSoundReceiver() called" << std::endl;
std::cout << "SetListenerPosition( " << bMute << " ) called" << std::endl; pClient->GetCoreInstance()->SetSoundReceiverPosition( id, VAVec3( 1, 2, 3 ) );
pClient->GetCoreInstance()->SetSoundReceiverPosition( 0, VAVec3( 1, 2, 3 ) ); std::cout << "SetSoundReceiverPosition( ... ) called" << std::endl;
break; break;
} }
case 'b': case 'b':
{ {
pClient->GetCoreInstance()->LockUpdate(); pClient->GetCoreInstance()->LockUpdate();
std::cout << "LockScene() called" << std::endl; std::cout << "LockUpdate() called" << std::endl;
break; break;
} }
case 'e': case 'e':
{ {
int iNum = pClient->GetCoreInstance()->UnlockUpdate(); int iNum = pClient->GetCoreInstance()->UnlockUpdate();
std::cout << "UnlockScene() = " << iNum << std::endl; std::cout << "UnlockUpdate() = " << iNum << std::endl;
break; break;
} }
case 'j': case 'j':
{ {
string sModuleID = "PrototypeGenericPath:MyGenericRenderer"; string sModuleID = "MyGenericRenderer";
CVAStruct oArgs, oRet; CVAStruct oArgs, oRet;
oArgs[ "info" ] = true; oArgs[ "info" ] = true;
...@@ -104,8 +110,8 @@ int main( int, char** ) ...@@ -104,8 +110,8 @@ int main( int, char** )
oArgs[ "ch1" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) ); oArgs[ "ch1" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) );
oArgs[ "ch2" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) ); oArgs[ "ch2" ] = CVAStructValue( &vfData[ 0 ], int( vfData.size() * sizeof( float ) ) );
oArgs[ "verbose" ] = true; oArgs[ "verbose" ] = true;
oRet = pClient->GetCoreInstance()->CallModule( sModuleID, oArgs ); pClient->GetCoreInstance()->SetRenderingModuleParameters( sModuleID, oArgs );
cout << oRet << endl; std::cout << "Called SetRenderingModuleParameters( ... ) with some parameters" << std::endl;
break; break;
} }
......
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