Commit 7fab8f32 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Refactoring preproc flags for max sound entities

parent 3d30bc5a
......@@ -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_LISTENERS )
set( ITA_VACORE_MAX_NUM_LISTENERS 0 CACHE INT "VACore maximum number of listeners ( 0 = unlimited )" )
if( NOT DEFINED ITA_VACORE_MAX_NUM_SOUND_RECEIVERS )
set( ITA_VACORE_MAX_NUM_SOUND_RECEIVERS 0 CACHE INT "VACore maximum number of sound receivers ( 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_LISTENERS=${ITA_VACORE_MAX_NUM_LISTENERS}" )
add_definitions( "-DVACORE_MAX_NUM_SOUND_SOURCES=${ITA_VACORE_MAX_NUM_SOUND_SOURCES}" )
add_definitions( "-DVACORE_MAX_NUM_SOUND_RECEIVERS=${ITA_VACORE_MAX_NUM_SOUND_RECEIVERS}" )
if( ITA_VACORE_WITH_AUDIO_BACKEND_ASIO )
add_definitions( -DVACORE_WITH_AUDIO_BACKEND_ASIO )
......
......@@ -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_LISTENERS != 0 ) && m_pNewSceneState )
if( ( VACORE_MAX_NUM_SOUND_RECEIVERS != 0 ) && m_pNewSceneState )
{
const int iListenersRemain = VACORE_MAX_NUM_LISTENERS - m_pNewSceneState->GetNumListeners();
const int iListenersRemain = VACORE_MAX_NUM_SOUND_RECEIVERS - 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_LISTENERS << " listeners.";
ss << "Maximum number of listeners reached. This version of VA only supports up to " << VACORE_MAX_NUM_SOUND_RECEIVERS << " listeners.";
VA_EXCEPT2( INVALID_PARAMETER, ss.str() );
}
}
......@@ -2685,13 +2685,13 @@ int CVACoreImpl::CreateSoundReceiverExplicitRenderer( const std::string& sRender
VA_TRY
{
if( ( VACORE_MAX_NUM_LISTENERS != 0 ) && m_pNewSceneState )
if( ( VACORE_MAX_NUM_SOUND_RECEIVERS != 0 ) && m_pNewSceneState )
{
int iListenersRemain = VACORE_MAX_NUM_LISTENERS - m_pNewSceneState->GetNumListeners();
int iListenersRemain = VACORE_MAX_NUM_SOUND_RECEIVERS - 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_LISTENERS << " listeners.";
ss << "Maximum number of listeners reached. This version of VA only supports up to " << VACORE_MAX_NUM_SOUND_RECEIVERS << " listeners.";
VA_EXCEPT2( INVALID_PARAMETER, ss.str() );
}
}
......
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