Style

parent 80a549f0
cmake_minimum_required( VERSION 2.8 )
cmake_minimum_required( VERSION 2.8 )
project( VAMatlab )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
......@@ -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 "a" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" )
set( ITA_VAMATLAB_VERSION_MINOR "b" CACHE STRING "VAMatlab version minor (usually a,b,c ...)" )
endif( NOT DEFINED ITA_VAMATLAB_VERSION_MINOR )
if( NOT DEFINED ITA_VAMATLAB_SHOW_BANNER )
......
......@@ -1071,6 +1071,24 @@ void get_directivity_infos( int nlhs, mxArray *plhs[], int nrhs, const mxArray *
plhs[ 0 ] = pCell;
}
REGISTER_PUBLIC_FUNCTION( create_scene_from_file, "Creates a scene from a file resource", "Note: this is a loose method with no clear definition. It may be interpreted differently among renderers." );
DECLARE_FUNCTION_REQUIRED_INARG( create_scene_from_file, file_path, "string", "File path" );
DECLARE_FUNCTION_OPTIONAL_INARG( create_scene_from_file, scene_name, "string", "Scene name", "''" );
DECLARE_FUNCTION_OUTARG( create_scene_from_file, scene_id, "string", "Scene identifier" );
void create_scene_from_file( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
REQUIRE_INPUT_ARGS( 3 );
ConnectionHandle hHandle = GetConnectionHandle( prhs[ 0 ] );
CVAMatlabConnection* pConnection = g_vpConnections[ hHandle ];
std::string sFilePath = matlabGetString( prhs[ 1 ], "file_path" );
std::string sSceneName = matlabGetString( prhs[ 2 ], "scene_name" );
std::string sID = pConnection->pCoreInterface->CreateSceneFromFile( sFilePath, sSceneName );
plhs[ 0 ] = mxCreateString( sID.c_str() );
}
REGISTER_PUBLIC_FUNCTION( create_signal_source_buffer_from_file, "Creates a signal source which plays an audiofile", "Note: The audiofile must be mono and its sampling rate must match that of the server." );
DECLARE_FUNCTION_REQUIRED_INARG( create_signal_source_buffer_from_file, filename, "string", "Filename" );
......
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