Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Institute of Technical Acoustics (ITA)
VAMatlab
Commits
d5a50e18
Commit
d5a50e18
authored
Nov 29, 2016
by
Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing problems with renderer and repro getter
parent
08ea2fa2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
17 deletions
+34
-17
matlab/VAMatlabExecutable_debug.m
matlab/VAMatlabExecutable_debug.m
+33
-5
src/VAMatlabExecutable.cpp
src/VAMatlabExecutable.cpp
+1
-12
No files found.
matlab/VAMatlabExecutable_debug.m
View file @
d5a50e18
%
t
his debug script is for debugging the VA-to-Matlab connection
%
T
his 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
);
...
...
src/VAMatlabExecutable.cpp
View file @
d5a50e18
...
...
@@ -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"
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment