Commit d5a50e18 authored by Jonas Stienen's avatar Jonas Stienen

Fixing problems with renderer and repro getter

parent 08ea2fa2
%this debug script is for debugging the VA-to-Matlab connection
% This debug script is for debugging the VA-to-Matlab connection
% without the use of the facade class "itaVA"
% To use MSVS for debugging the MEX library, in VS select "Debugging >
% Append to process" ... then select the MATLAB.exe process and start to
% execute commands in Matlab that are calling functions of the MEX file
cd 'D:\Users\stienen\VA\VAMatlab\Matlab'
addpath( '../../VABuild/Build/Debug_x64' )
addpath( '../../VistaCoreLibs/lib/x64' )
addpath( '../../3rdParty/NatNetSDK/lib/x64' )
%% Pathes to required libs & dlls (cumbersome, but necessary)
vam_path = 'D:\Users\stienen\dev\VA\VAMatlab';
build_dir = 'build_win32-x64.vc12';
vanet_dir = 'D:\Users\stienen\dev\VA';
vista_dir = 'D:\Users\stienen\dev\ViSTA';
natnet_libs = 'X:\VR\dev\ExternalLibs\NatNetSDK\NatNetSDK-2.7\lib\x64';
addpath( fullfile( vam_path, build_dir, 'lib' ) ) % VAMatlabD
addpath( fullfile( vanet_dir, build_dir, 'lib' ) ) % VABaseD, VANetD
addpath( fullfile( vista_dir, build_dir, 'lib' ) ) % VistaBaseD, VistaAspectsD, VistaInterProcCommD
addpath( fullfile( natnet_libs ) ) % NatNetSDK (OptiTrack)
copy_dlls = true;
if( copy_dlls ) % Be careful with this option
dest = fullfile( vam_path, build_dir, 'lib' );
copyfile( which( 'VABaseD.dll' ), dest )
copyfile( which( 'VANetD.dll' ), dest )
copyfile( which( 'VistaBaseD.dll' ), dest )
copyfile( which( 'VistaAspectsD.dll' ), dest )
copyfile( which( 'VistaInterProcCommD.dll' ), dest )
copyfile( which( 'NatNetLib.dll' ), dest )
warning( 'DLLs have been copied, make sure to use the corresponding versions during debugging.' )
end
%% Connection
conn = VAMatlabD( 'connect', 'localhost:12340' );
renderers = VAMatlabD( 'getRenderingModules', conn, false );
disp( renderers )
reproductions = VAMatlabD( 'getReproductionModules', conn, false );
disp( reproductions )
%% Tests
L = VAMatlabD( 'createListener', conn, 'itaVA_Tracked_Listener', 'default', -1 );
......
......@@ -3297,18 +3297,7 @@ void getReproductionModules( int nlhs, mxArray *plhs[], int nrhs, const mxArray
std::vector< CVAAudioReproductionInfo > voReproductions;
pConnection->pCoreInterface->GetReproductionModules( voReproductions, bFilterEnabled );
size_t nDims_ = 1;
const int nFields_ = 4;
const char* ppszFieldNames_[] = { "id", "class", "enabled", "desc" };
plhs[ 0 ] = mxCreateStructArray( 1, &nDims_, 1, ppszFieldNames_ );
mxSetField( plhs[ 0 ], 0, ppszFieldNames_[ 0 ], mxCreateString( "hooo1" ) );
mxSetField( plhs[ 0 ], 0, ppszFieldNames_[ 1 ], mxCreateString( "h2ooo" ) );
mxSetField( plhs[ 0 ], 0, ppszFieldNames_[ 2 ], mxCreateString( "ho3oo" ) );
mxSetField( plhs[ 0 ], 0, ppszFieldNames_[ 3 ], mxCreateString( "hoo4o" ) );
return;
const size_t nDims = int( voReproductions.size() );
const int nFields = 4;
const char* ppszFieldNames[] = { "id", "class", "enabled", "desc" };
......
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