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
7fab8f32
Commit
7fab8f32
authored
Oct 11, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Refactoring preproc flags for max sound entities
parent
3d30bc5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7fab8f32
...
...
@@ -77,11 +77,11 @@ if( NOT DEFINED ITA_VACORE_EVENTS_ENABLED )
set
(
ITA_VACORE_EVENTS_ENABLED ON CACHE BOOL
"VACore event handling"
)
endif
(
)
if
(
NOT DEFINED ITA_VACORE_MAX_NUM_SOURCES
)
set
(
ITA_VACORE_MAX_NUM_SOURCES 0 CACHE INT
"VACore maximum number of sound sources ( 0 = unlimited )"
)
if
(
NOT DEFINED ITA_VACORE_MAX_NUM_
SOUND_
SOURCES
)
set
(
ITA_VACORE_MAX_NUM_
SOUND_
SOURCES 0 CACHE INT
"VACore maximum number of sound sources ( 0 = unlimited )"
)
endif
(
)
if
(
NOT DEFINED ITA_VACORE_MAX_NUM_
LISTEN
ERS
)
set
(
ITA_VACORE_MAX_NUM_
LISTEN
ERS 0 CACHE INT
"VACore maximum number of
listen
ers ( 0 = unlimited )"
)
if
(
NOT DEFINED ITA_VACORE_MAX_NUM_
SOUND_RECEIV
ERS
)
set
(
ITA_VACORE_MAX_NUM_
SOUND_RECEIV
ERS 0 CACHE INT
"VACore maximum number of
sound receiv
ers ( 0 = unlimited )"
)
endif
(
)
if
(
NOT DEFINED ITA_VACORE_WITH_TTS_SIGNAL_SOURCE
)
set
(
ITA_VACORE_WITH_TTS_SIGNAL_SOURCE
${
TTSReleay
}
CACHE BOOL
"VACore with text-to-speech signal source support"
)
...
...
@@ -235,8 +235,8 @@ if( ${ITA_VACORE_EVENTS_ENABLED} )
endif
(
)
add_definitions
(
"-DVACORE_DEFAULT_CONFIGFILE=
\"
${
ITA_VACORE_DEFAULT_CONFIG_FILE_NAME
}
\"
"
)
add_definitions
(
"-DVACORE_MAX_NUM_SOURCES=
${
ITA_VACORE_MAX_NUM_SOURCES
}
"
)
add_definitions
(
"-DVACORE_MAX_NUM_
LISTEN
ERS=
${
ITA_VACORE_MAX_NUM_
LISTEN
ERS
}
"
)
add_definitions
(
"-DVACORE_MAX_NUM_
SOUND_
SOURCES=
${
ITA_VACORE_MAX_NUM_
SOUND_
SOURCES
}
"
)
add_definitions
(
"-DVACORE_MAX_NUM_
SOUND_RECEIV
ERS=
${
ITA_VACORE_MAX_NUM_
SOUND_RECEIV
ERS
}
"
)
if
(
ITA_VACORE_WITH_AUDIO_BACKEND_ASIO
)
add_definitions
(
-DVACORE_WITH_AUDIO_BACKEND_ASIO
)
...
...
src/VACoreImpl.cpp
View file @
7fab8f32
...
...
@@ -1843,13 +1843,13 @@ int CVACoreImpl::CreateSoundSource( const std::string& sName )
VA_TRY
{
if
(
(
VACORE_MAX_NUM_SOURCES
!=
0
)
&&
m_pNewSceneState
)
if
(
(
VACORE_MAX_NUM_
SOUND_
SOURCES
!=
0
)
&&
m_pNewSceneState
)
{
int
iSourcesRemain
=
VACORE_MAX_NUM_SOURCES
-
m_pNewSceneState
->
GetNumSoundSources
();
int
iSourcesRemain
=
VACORE_MAX_NUM_
SOUND_
SOURCES
-
m_pNewSceneState
->
GetNumSoundSources
();
if
(
iSourcesRemain
<=
0
)
{
std
::
stringstream
ss
;
ss
<<
"Maximum number of sound sources reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_SOURCES
<<
" sound sources."
;
ss
<<
"Maximum number of sound sources reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
SOUND_
SOURCES
<<
" sound sources."
;
VA_EXCEPT2
(
INVALID_PARAMETER
,
ss
.
str
()
);
}
}
...
...
@@ -1905,13 +1905,13 @@ int CVACoreImpl::CreateSoundSourceExplicitRenderer( const std::string& sRenderer
VA_TRY
{
if
(
(
VACORE_MAX_NUM_SOURCES
!=
0
)
&&
m_pNewSceneState
)
if
(
(
VACORE_MAX_NUM_
SOUND_
SOURCES
!=
0
)
&&
m_pNewSceneState
)
{
int
iSourcesRemain
=
VACORE_MAX_NUM_SOURCES
-
m_pNewSceneState
->
GetNumSoundSources
();
int
iSourcesRemain
=
VACORE_MAX_NUM_
SOUND_
SOURCES
-
m_pNewSceneState
->
GetNumSoundSources
();
if
(
iSourcesRemain
<=
0
)
{
std
::
stringstream
ss
;
ss
<<
"Maximum number of sound sources reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_SOURCES
<<
" sound sources."
;
ss
<<
"Maximum number of sound sources reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
SOUND_
SOURCES
<<
" sound sources."
;
VA_EXCEPT2
(
INVALID_PARAMETER
,
ss
.
str
()
);
}
}
...
...
@@ -2583,13 +2583,13 @@ int CVACoreImpl::CreateSoundReceiver( const std::string& sName )
VA_TRY
{
if
(
(
VACORE_MAX_NUM_
LISTEN
ERS
!=
0
)
&&
m_pNewSceneState
)
if
(
(
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
!=
0
)
&&
m_pNewSceneState
)
{
const
int
iListenersRemain
=
VACORE_MAX_NUM_
LISTEN
ERS
-
m_pNewSceneState
->
GetNumListeners
();
const
int
iListenersRemain
=
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
-
m_pNewSceneState
->
GetNumListeners
();
if
(
iListenersRemain
<=
0
)
{
std
::
stringstream
ss
;
ss
<<
"Maximum number of listeners reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
LISTEN
ERS
<<
" listeners."
;
ss
<<
"Maximum number of listeners reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
<<
" listeners."
;
VA_EXCEPT2
(
INVALID_PARAMETER
,
ss
.
str
()
);
}
}
...
...
@@ -2685,13 +2685,13 @@ int CVACoreImpl::CreateSoundReceiverExplicitRenderer( const std::string& sRender
VA_TRY
{
if
(
(
VACORE_MAX_NUM_
LISTEN
ERS
!=
0
)
&&
m_pNewSceneState
)
if
(
(
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
!=
0
)
&&
m_pNewSceneState
)
{
int
iListenersRemain
=
VACORE_MAX_NUM_
LISTEN
ERS
-
m_pNewSceneState
->
GetNumListeners
();
int
iListenersRemain
=
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
-
m_pNewSceneState
->
GetNumListeners
();
if
(
iListenersRemain
<=
0
)
{
std
::
stringstream
ss
;
ss
<<
"Maximum number of listeners reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
LISTEN
ERS
<<
" listeners."
;
ss
<<
"Maximum number of listeners reached. This version of VA only supports up to "
<<
VACORE_MAX_NUM_
SOUND_RECEIV
ERS
<<
" listeners."
;
VA_EXCEPT2
(
INVALID_PARAMETER
,
ss
.
str
()
);
}
}
...
...
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