Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
03a7d404
Commit
03a7d404
authored
Nov 29, 2016
by
Jonas Stienen
Browse files
Adding test for audio repro and rend getter (in CoreTest)
parent
1af33e1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
03a7d404
...
...
@@ -305,7 +305,7 @@ configure_file( "conf/VACore.ini.proto" "${CMAKE_CURRENT_SOURCE_DIR}/conf/${ITA_
# tests
if
(
ITA_VA_WITH_TESTS OR ITA_VA
BAS
E_WITH_TESTS
)
if
(
ITA_VA_WITH_TESTS OR ITA_VA
COR
E_WITH_TESTS
)
set
(
VACORE_COMMON_BUILD TRUE
)
add_subdirectory
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tests"
)
endif
()
tests/CMakeLists.txt
View file @
03a7d404
...
...
@@ -15,6 +15,15 @@ if( ITA_VA_BUILD_STATIC AND DEFINED ITA_VA_BUILD_STATIC )
add_definitions
(
-DVABASE_STATIC -DVACORE_STATIC
)
endif
(
ITA_VA_BUILD_STATIC AND DEFINED ITA_VA_BUILD_STATIC
)
add_executable
(
CoreTest CoreTest.cpp
)
target_link_libraries
(
CoreTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
vista_configure_app
(
CoreTest
)
vista_install
(
CoreTest
)
vista_create_default_info_file
(
CoreTest
)
set_property
(
TARGET CoreTest PROPERTY FOLDER
"VA/Tests/VACore"
)
add_executable
(
MotionModelTest MotionModelTest.cpp
)
target_link_libraries
(
MotionModelTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
...
...
tests/CoreTest.cpp
View file @
03a7d404
...
...
@@ -60,6 +60,38 @@ public:
};
CoreEventDumper
dumper
;
void
AudioRenderers
()
{
std
::
vector
<
CVAAudioRendererInfo
>
voRenderers
;
core
->
GetRenderingModules
(
voRenderers
);
if
(
voRenderers
.
size
()
)
cout
<<
"Found "
<<
voRenderers
.
size
()
<<
" audio renderer"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
voRenderers
.
size
();
i
++
)
{
cout
<<
" + Renderer #"
<<
i
+
1
<<
": "
<<
voRenderers
[
i
].
sID
<<
" ["
<<
voRenderers
[
i
].
sClass
<<
"] "
<<
(
voRenderers
[
i
].
bEnabled
?
"[enabled]"
:
"disabled"
)
<<
" ( "
<<
voRenderers
[
i
].
sDescription
<<
" )"
<<
endl
;
}
}
void
AudioReproductions
()
{
std
::
vector
<
CVAAudioReproductionInfo
>
voReproductions
;
core
->
GetReproductionModules
(
voReproductions
);
if
(
voReproductions
.
size
()
)
cout
<<
"Found "
<<
voReproductions
.
size
()
<<
" audio renderer"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
voReproductions
.
size
();
i
++
)
{
cout
<<
" + Renderer #"
<<
i
+
1
<<
": "
<<
voReproductions
[
i
].
sID
<<
" ["
<<
voReproductions
[
i
].
sClass
<<
"] "
<<
(
voReproductions
[
i
].
bEnabled
?
"[enabled]"
:
"disabled"
)
<<
" ( "
<<
voReproductions
[
i
].
sDescription
<<
" )"
<<
endl
;
}
}
void
TestModuleInterface
()
{
std
::
vector
<
CVAModuleInfo
>
viModuleInfos
;
...
...
@@ -67,10 +99,10 @@ void TestModuleInterface()
if
(
viModuleInfos
.
size
()
)
cout
<<
"Found "
<<
viModuleInfos
.
size
()
<<
" modules"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
viModuleInfos
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
viModuleInfos
.
size
();
i
++
)
{
cout
<<
" + Module #"
<<
+
i
<<
": "
<<
viModuleInfos
[
i
].
sName
<<
" ( "
<<
viModuleInfos
[
i
].
sDesc
<<
" )"
<<
endl
;
cout
<<
" + Module #"
<<
i
+
1
<<
": "
<<
viModuleInfos
[
i
].
sName
<<
" ( "
<<
viModuleInfos
[
i
].
sDesc
<<
" )"
<<
endl
;
}
}
...
...
@@ -78,7 +110,7 @@ int main()
{
try
{
core
=
VACore
::
CreateCoreInstance
(
"../
../../VACore/
conf/VACore.ini"
);
core
=
VACore
::
CreateCoreInstance
(
"../conf/VACore.ini"
);
// Attach (register) event handler
core
->
AttachCoreEventHandler
(
&
dumper
);
...
...
@@ -91,6 +123,8 @@ int main()
core
->
Initialize
();
TestModuleInterface
();
AudioRenderers
();
AudioReproductions
();
int
iListenerID
=
core
->
CreateListener
(
"MyListener"
);
core
->
SetListenerOrientationYPR
(
iListenerID
,
20
,
0
,
0
);
// 20 degree rotation of head in horizontal plane, triggers a core event
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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