Upgrading verson

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