Upgrading verson

parent ee6a4226
...@@ -13,7 +13,7 @@ if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR ) ...@@ -13,7 +13,7 @@ if( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR ) endif( NOT DEFINED ITA_VAMATLAB_VERSION_MAJOR )
if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR ) if( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
set( ITA_VAMATLAB_VERSION_MINOR "c" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" ) set( ITA_VAMATLAB_VERSION_MINOR "d" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR ) endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER ) if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
......
...@@ -65,7 +65,8 @@ int g_iVerboseLevel = VERBOSE_LEVEL_NORMAL; // Verbosity level ...@@ -65,7 +65,8 @@ int g_iVerboseLevel = VERBOSE_LEVEL_NORMAL; // Verbosity level
void INFO( const char * format, ... ) void INFO( const char * format, ... )
{ {
if( g_iVerboseLevel == VERBOSE_LEVEL_QUIET ) return; // Quiet? if( g_iVerboseLevel == VERBOSE_LEVEL_QUIET )
return; // Quiet?
const int bufsize = 1024; const int bufsize = 1024;
char buf[ bufsize ]; char buf[ bufsize ];
...@@ -79,23 +80,27 @@ void INFO( const char * format, ... ) ...@@ -79,23 +80,27 @@ void INFO( const char * format, ... )
} }
// Generate a new connection handle (ID) // Generate a new connection handle (ID)
ConnectionHandle GenerateConnectionHandle() { ConnectionHandle GenerateConnectionHandle()
{
// Scan for free entries starting from the last handle // Scan for free entries starting from the last handle
ConnectionHandle hHandle = -1; ConnectionHandle hHandle = -1;
int i = g_iLastConnectionHandle; int i = g_iLastConnectionHandle;
do { do
{
i = ( i + 1 ) % VAMATLAB_MAX_CONNECTIONS; i = ( i + 1 ) % VAMATLAB_MAX_CONNECTIONS;
if( i == 0 ) i++; // Skip placeholder if( i == 0 )
i++; // Skip placeholder
if( g_vpConnections[ i ] == NULL ) { if( g_vpConnections[ i ] == NULL )
{
g_iLastConnectionHandle = i; g_iLastConnectionHandle = i;
return i; return i;
} }
} while( hHandle == -1 ); }
while( hHandle == -1 );
// Should not reach this line! // Should not reach this line!
VA_EXCEPT1( "An internal error occured - Please contact the developer" ); VA_EXCEPT1( "An internal error occured - Please contact the developer" );
return -1;
} }
// Get connection handle from Matlab arguments and validate it // Get connection handle from Matlab arguments and validate it
...@@ -148,22 +153,28 @@ void vCheckInputArguments( int nrhs, int iRequiredNumArgs ) ...@@ -148,22 +153,28 @@ void vCheckInputArguments( int nrhs, int iRequiredNumArgs )
// Displays information in the executable in Matlab // Displays information in the executable in Matlab
void banner() void banner()
{ {
mexPrintf( "\n---------------------------------------------------------------------------------------------------\n\n" ); mexPrintf( "/*\n" );
mexPrintf( " VVV VVV A Virtual Acoustics (VA)\n" ); mexPrintf( " * --------------------------------------------------------------------------------------------\n" );
mexPrintf( " VVV VVV AAA Real-time auralization for acoustic virtual environments\n" ); mexPrintf( " *\n" );
#if VAMATLAB_INTEGRATED == 1 mexPrintf( " * VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org\n" );
mexPrintf(" VVV VVV AAA VA Matlab with integrated VA core, version %s.%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR ); mexPrintf( " * VVV VVV AAA Licensed under the Apache License, Version 2.0\n" );
mexPrintf( " * VVV VVV AAA\n" );
mexPrintf( " * VVV VVV AAA Copyright 2015-2017\n" );
mexPrintf( " * VVVVVV AAA Institute of Technical Acoustics (ITA)\n" );
mexPrintf( " * VVVV AAA RWTH Aachen University\n" );
mexPrintf( " *\n" );
mexPrintf( " * --------------------------------------------------------------------------------------------\n" );
#ifdef VAMATLAB_INTEGRATED
mexPrintf( " * VA Matlab with integrated core, version %s.%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR );
#else #else
mexPrintf( " VVV VVV AAA VA Matlab network client, version %s.%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR ); mexPrintf( " * VA Matlab network client, version %s%s\n", VAMATLAB_VERSION_MAJOR, VAMATLAB_VERSION_MINOR );
#endif #endif
mexPrintf( " VVV VVV AAA (c) Copyright 2015-today, Institute of Technical Acoustics (ITA)\n" ); mexPrintf( " * --------------------------------------------------------------------------------------------\n" );
mexPrintf( " VVVVVV AAA RWTH Aachen University, http://www.akustik.rwth-aachen.de\n" ); mexPrintf( " */\n" );
mexPrintf( " VVVV AAA Distribution prohibited.\n" );
mexPrintf( "\n---------------------------------------------------------------------------------------------------\n\n" );
} }
// Helper macro // Helper macro
#define REQUIRE_INPUT_ARGS(N) vCheckInputArguments(nrhs, N) #define REQUIRE_INPUT_ARGS( N ) vCheckInputArguments( nrhs, N )
/* +------------------------------------------------------+ /* +------------------------------------------------------+
| | | |
...@@ -173,7 +184,6 @@ void banner() ...@@ -173,7 +184,6 @@ void banner()
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{ {
if( g_bFirst ) if( g_bFirst )
{ {
g_bFirst = false; g_bFirst = false;
......
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