Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
VACore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
188a745c
Commit
188a745c
authored
Sep 19, 2018
by
Lucas Moesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added integration in VA renderers.
parent
cfdeb920
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
159 additions
and
28 deletions
+159
-28
CMakeLists.txt
CMakeLists.txt
+7
-0
src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp
...ealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp
+1
-1
src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralClustering.cpp
...Time/Utils/BinauralClusterEngine/VABinauralClustering.cpp
+5
-5
src/Rendering/Binaural/RealTime/Utils/BinauralListener/VABinauralListener.h
...ural/RealTime/Utils/BinauralListener/VABinauralListener.h
+0
-1
src/Rendering/Binaural/RealTime/VABinauralRealTimeRenderer.cpp
...endering/Binaural/RealTime/VABinauralRealTimeRenderer.cpp
+32
-2
src/Rendering/Binaural/RealTime/VABinauralRealTimeRenderer.h
src/Rendering/Binaural/RealTime/VABinauralRealTimeRenderer.h
+18
-5
tests/CMakeLists.txt
tests/CMakeLists.txt
+10
-0
tests/CoreTest.cpp
tests/CoreTest.cpp
+14
-14
tests/VABinauralRealTimeRendererTest.cpp
tests/VABinauralRealTimeRendererTest.cpp
+72
-0
No files found.
CMakeLists.txt
View file @
188a745c
...
...
@@ -157,6 +157,10 @@ endif( )
if
(
NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE
)
set
(
ITA_VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE OFF CACHE BOOL
"Build VACore with rendering module: outdoor noise"
)
endif
(
)
if
(
NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_REAL_TIME
)
set
(
ITA_VACORE_WITH_RENDERER_BINAURAL_REAL_TIME OFF CACHE BOOL
"Build VACore with rendering module: real time renderer"
)
endif
(
)
if
(
NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD
)
set
(
ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD ON CACHE BOOL
"Build VACore with rendering module: prototype free-field"
)
...
...
@@ -304,6 +308,9 @@ endif( )
if
(
ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD
)
add_definitions
(
"-DVACORE_WITH_RENDERER_VBAP_FREE_FIELD"
)
endif
(
)
if
(
ITA_VACORE_WITH_RENDERER_BINAURAL_REAL_TIME
)
add_definitions
(
"-DVACORE_WITH_RENDERER_BINAURAL_REAL_TIME"
)
endif
(
)
# Reproduction definitions
if
(
ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH
)
...
...
src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralCluster.cpp
View file @
188a745c
...
...
@@ -76,7 +76,7 @@ VABinauralCluster::getOutput()
double
phi
=
atan2
(
sourceToListenerPos
.
y
,
sourceToListenerPos
.
x
);
double
theta
=
acos
(
sourceToListenerPos
.
z
);
// add general distance VDL
//
TODO:
add general distance VDL
double
toaChL
=
_listener
->
toaEstimator
->
getTOALeft
(
phi
,
theta
);
double
toaChR
=
_listener
->
toaEstimator
->
getTOARight
(
phi
,
theta
);
...
...
src/Rendering/Binaural/RealTime/Utils/BinauralClusterEngine/VABinauralClustering.cpp
View file @
188a745c
...
...
@@ -92,19 +92,19 @@ VABinauralClustering::update()
}
// add unassigned sources
std
::
map
<
int
,
VABinauralSoundSource
*
>::
iterator
i
t
;
std
::
map
<
int
,
VABinauralSoundSource
*
>::
iterator
sourceI
t
;
for
(
it
=
_unassignedSources
.
begin
();
it
!=
_unassignedSources
.
end
();
++
i
t
)
for
(
sourceIt
=
_unassignedSources
.
begin
();
sourceIt
!=
_unassignedSources
.
end
();
++
sourceI
t
)
{
state
->
addSource
(
it
->
first
,
i
t
->
second
,
_threshold
,
0
);
state
->
addSource
(
sourceIt
->
first
,
sourceI
t
->
second
,
_threshold
,
0
);
}
// TODO: refinement
// update source status
for
(
it
=
_unassignedSources
.
begin
();
i
t
!=
_unassignedSources
.
end
();
++
it
)
for
(
sourceIt
=
_unassignedSources
.
begin
();
sourceI
t
!=
_unassignedSources
.
end
();
++
it
)
{
_assignedSources
.
insert
(
std
::
pair
<
int
,
VABinauralSoundSource
*
>
(
it
->
first
,
i
t
->
second
));
_assignedSources
.
insert
(
std
::
pair
<
int
,
VABinauralSoundSource
*
>
(
sourceIt
->
first
,
sourceI
t
->
second
));
}
_unassignedSources
.
clear
();
...
...
src/Rendering/Binaural/RealTime/Utils/BinauralListener/VABinauralListener.h
View file @
188a745c
...
...
@@ -42,7 +42,6 @@ public:
VABinauralListener
(
const
CVACoreImpl
*
core
,
const
config_t
&
conf
);
virtual
~
VABinauralListener
();
void
...
...
src/Rendering/Binaural/RealTime/VABinauralRealTimeRenderer.cpp
View file @
188a745c
...
...
@@ -36,6 +36,8 @@ VABinauralRealTimeRenderer::VABinauralRealTimeRenderer( const CVAAudioRendererIn
IVAPoolObjectFactory
*
sourceFactory
=
new
VABinauralSoundSourcePoolFactory
(
_defaultSourceConf
);
_sourcePool
=
IVAObjectPool
::
Create
(
16
,
2
,
sourceFactory
,
true
);
_curGlobalAuralizationMode
=
IVAInterface
::
VA_AURAMODE_DEFAULT
;
}
...
...
@@ -101,7 +103,35 @@ VABinauralRealTimeRenderer::init( const CVAStruct& oArgs )
}
void
VABinauralRealTimeRenderer
::
processStream
(
const
ITAStreamInfo
*
streamInfo
)
VABinauralRealTimeRenderer
::
Reset
()
{
};
ITADatasource
*
VABinauralRealTimeRenderer
::
GetOutputDatasource
()
{
return
this
;
};
CVAStruct
VABinauralRealTimeRenderer
::
CallObject
(
const
CVAStruct
&
oArgs
){
CVAStruct
oReturn
;
return
oReturn
;
};
void
VABinauralRealTimeRenderer
::
UpdateGlobalAuralizationMode
(
int
iGlobalAuralizationMode
)
{
if
(
_curGlobalAuralizationMode
==
iGlobalAuralizationMode
)
return
;
_curGlobalAuralizationMode
=
iGlobalAuralizationMode
;
return
;
}
void
VABinauralRealTimeRenderer
::
ProcessStream
(
const
ITAStreamInfo
*
streamInfo
)
{
ITASampleFrame
*
output
;
float
*
outputChL
=
GetWritePointer
(
0
);
...
...
@@ -133,7 +163,7 @@ VABinauralRealTimeRenderer::processStream(const ITAStreamInfo* streamInfo)
}
void
VABinauralRealTimeRenderer
::
u
pdateScene
(
CVASceneState
*
newSceneState
)
VABinauralRealTimeRenderer
::
U
pdateScene
(
CVASceneState
*
newSceneState
)
{
assert
(
newSceneState
);
...
...
src/Rendering/Binaural/RealTime/VABinauralRealTimeRenderer.h
View file @
188a745c
...
...
@@ -17,20 +17,32 @@ class VABinauralRealTimeRenderer : public IVAAudioRenderer, public CVAObject, pu
{
public:
VABinauralRealTimeRenderer
(
const
CVAAudioRendererInitParams
&
);
virtual
~
VABinauralRealTimeRenderer
();
~
VABinauralRealTimeRenderer
();
inline
void
loadScene
(
const
std
::
string
&
)
{};
inline
void
LoadScene
(
const
std
::
string
&
)
{};
void
processStream
(
const
ITAStreamInfo
*
pStreamInfo
);
void
ProcessStream
(
const
ITAStreamInfo
*
pStreamInfo
);
void
updateScene
(
CVASceneState
*
newSceneState
);
void
UpdateScene
(
CVASceneState
*
newSceneState
);
// Resets the renderer to it's initial state
void
reset
();
void
Reset
();
// Returns the renderers output stream datasource
// ITADatasource* GetOutputDatasource();
void
UpdateGlobalAuralizationMode
(
int
iGlobalAuralizationMode
);
ITADatasource
*
GetOutputDatasource
();
CVAStruct
CallObject
(
const
CVAStruct
&
oArgs
);
private:
const
CVAAudioRendererInitParams
_params
;
...
...
@@ -56,6 +68,7 @@ private:
int
_defaultVDLSwitchingAlgorithm
;
int
_hrirFilterLength
;
int
_curGlobalAuralizationMode
;
double
_additionalStaticDelaySeconds
;
void
...
...
tests/CMakeLists.txt
View file @
188a745c
...
...
@@ -82,3 +82,13 @@ vista_install( HATORenderingTest )
vista_create_default_info_file
(
HATORenderingTest
)
set_property
(
TARGET HATORenderingTest PROPERTY FOLDER
"VA/Tests/VACore"
)
add_executable
(
BinauralRealTimeRendererTest VABinauralRealTimeRendererTest.cpp
)
target_link_libraries
(
BinauralRealTimeRendererTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
${
VISTAINTERPROCCOMM_ADDITIONAL_DEPENDENCIES
}
)
vista_configure_app
(
BinauralRealTimeRendererTest
)
vista_install
(
BinauralRealTimeRendererTest
)
vista_create_default_info_file
(
BinauralRealTimeRendererTest
)
set_property
(
TARGET BinauralRealTimeRendererTest PROPERTY FOLDER
"VA/Tests/VACore"
)
tests/CoreTest.cpp
View file @
188a745c
...
...
@@ -73,32 +73,32 @@ int main( int, char** )
{
try
{
va
=
VACore
::
CreateCoreInstance
(
"../conf/VACore.ini"
);
//
va = VACore::CreateCoreInstance( GetCoreConfig() );
//
va = VACore::CreateCoreInstance( "../conf/VACore.ini" );
va
=
VACore
::
CreateCoreInstance
(
GetCoreConfig
()
);
// Attach (register) event handler
//va->AttachEventHandler( &dumper );
va
->
AttachEventHandler
(
&
rendering_controller
);
//
va->AttachEventHandler( &rendering_controller );
CVAVersionInfo
ver
;
va
->
GetVersionInfo
(
&
ver
);
cout
<<
ver
.
ToString
()
<<
endl
;
//
CVAVersionInfo ver;
//
va->GetVersionInfo( &ver );
//
cout << ver.ToString() << endl;
va
->
Initialize
();
va
->
AddSearchPath
(
"../data"
);
/*
TestModuleInterface();
//
TestModuleInterface();
AudioRenderers
();
AudioReproductions();
//
AudioReproductions();
CreateHRIRs();
CreateAudioSignals();
CreateScene();
//
CreateHRIRs();
//
CreateAudioSignals();
//
CreateScene();
//ConnectSignals();
TestSignalAndSourceConnections();
*/
//
TestSignalAndSourceConnections();
bugfix_scene_pool_clearance_issue
();
...
...
tests/VABinauralRealTimeRendererTest.cpp
0 → 100644
View file @
188a745c
#include <VA.h>
#include <VACore.h>
#include <VistaBase/VistaTimeUtils.h>
CVAStruct
GetCoreConfig
()
{
CVAStruct
oConfig
;
CVAStruct
oSectionDebug
;
oSectionDebug
[
"loglevel"
]
=
5
;
oConfig
[
"debug"
]
=
oSectionDebug
;
CVAStruct
oSectionDriver
;
oSectionDriver
[
"driver"
]
=
"Portaudio"
;
oConfig
[
"audio driver"
]
=
oSectionDriver
;
CVAStruct
oDevice1
;
oDevice1
[
"type"
]
=
"HP"
;
oDevice1
[
"channels"
]
=
"1,2"
;
oConfig
[
"OutputDevice:MyHP"
]
=
oDevice1
;
CVAStruct
oOutput1
;
oOutput1
[
"devices"
]
=
"MyHP"
;
oConfig
[
"Output:MyDesktopHP"
]
=
oOutput1
;
CVAStruct
oReproduction1
;
oReproduction1
[
"class"
]
=
"Talkthrough"
;
oReproduction1
[
"outputs"
]
=
"MyDesktopHP"
;
oConfig
[
"Reproduction:Talkthrough"
]
=
oReproduction1
;
CVAStruct
oRenderer1
;
oRenderer1
[
"class"
]
=
"BinauralFreeField"
;
oRenderer1
[
"Reproductions"
]
=
"MyTalkthroughHeadphones"
;
oConfig
[
"Renderer:BFF_CoreTest"
]
=
oRenderer1
;
CVAStruct
oRenderer2
;
oRenderer2
[
"class"
]
=
"PrototypeGenericPath"
;
oRenderer2
[
"numchannels"
]
=
2
;
oRenderer2
[
"Reproductions"
]
=
"MyTalkthroughHeadphones"
;
oConfig
[
"Renderer:PTGP_CoreTest"
]
=
oRenderer2
;
return
oConfig
;
}
IVAInterface
*
va
=
NULL
;
int
main
(
int
,
char
**
)
{
try
{
va
=
VACore
::
CreateCoreInstance
(
GetCoreConfig
());
va
->
Initialize
();
VistaTimeUtils
::
Sleep
(
60000
);
va
->
Finalize
();
}
catch
(
CVAException
&
e
)
{
std
::
cerr
<<
"Error: "
<<
e
<<
std
::
endl
;
int
iErrorCode
=
e
.
GetErrorCode
();
delete
va
;
return
iErrorCode
;
}
delete
va
;
return
0
;
}
\ No newline at end of file
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