Commit 0c062b7f authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Removing Listener

parent a4b47d36
......@@ -281,9 +281,9 @@ CVACoreImpl::CVACoreImpl( const CVAStruct& oArgs )
m_pDirMan( nullptr ),
m_pSceneMan( nullptr ),
m_pNewSceneState( nullptr ),
m_iCurActiveListener( -1 ),
m_iNewActiveListener( -1 ),
m_iUpdActiveListener( -1 ),
m_iCurActiveSoundReceiver( -1 ),
m_iNewActiveSoundReceiver( -1 ),
m_iUpdActiveSoundReceiver( -1 ),
m_pCoreEventMan( nullptr ),
m_pCoreThread( nullptr ),
m_pInputAmp( nullptr ),
......@@ -630,8 +630,8 @@ void CVACoreImpl::Reset()
// Werte neusetzen
m_pCurSceneState = m_pSceneMan->GetHeadSceneState();
m_iCurActiveListener = -1;
m_iNewActiveListener = -1;
m_iCurActiveSoundReceiver = -1;
m_iNewActiveSoundReceiver = -1;
m_pCoreThread;
......@@ -1725,7 +1725,7 @@ int CVACoreImpl::UnlockUpdate()
iNewSceneID = m_pNewSceneState->GetID();
m_pSceneMan->SetHeadSceneState( iNewSceneID );
m_iNewActiveListener = m_iUpdActiveListener;
m_iNewActiveSoundReceiver = m_iUpdActiveSoundReceiver;
m_lSyncModOwner = -1;
m_mxSyncModLock.Unlock();
......@@ -2495,14 +2495,14 @@ void CVACoreImpl::SetSoundSourceOrientationVU( const int iSoundSourceID, const V
VA_RETHROW;
}
void CVACoreImpl::GetSoundReceiverIDs( std::vector< int >& vListenerIDs ) const
void CVACoreImpl::GetSoundReceiverIDs( std::vector< int >& vSoundReceiverIDs ) const
{
VA_NO_REENTRANCE;
VA_CHECK_INITIALIZED;
VA_TRY
{
m_pSceneMan->GetHeadSceneState()->GetListenerIDs( &vListenerIDs );
m_pSceneMan->GetHeadSceneState()->GetListenerIDs( &vSoundReceiverIDs );
}
VA_RETHROW;
}
......@@ -2576,10 +2576,10 @@ int CVACoreImpl::DeleteSoundReceiver( const int iID )
VA_TRY
{
if( iID == m_iCurActiveListener )
if( iID == m_iCurActiveSoundReceiver )
{
UnlockUpdate();
VA_EXCEPT2( INVALID_PARAMETER, "Cannot delete a sound receiver that is set as active listener" );
VA_EXCEPT2( INVALID_PARAMETER, "Cannot delete a sound receiver that is set as active sound receiver" );
}
m_pNewSceneState->RemoveListener( iID );
......@@ -2687,26 +2687,26 @@ void CVACoreImpl::SetSoundReceiverEnabled( const int iID, const bool bEnabled )
} VA_RETHROW;
}
bool CVACoreImpl::GetSoundReceiverEnabled( const int iListenerID ) const
bool CVACoreImpl::GetSoundReceiverEnabled( const int iSoundReceiverID ) const
{
VA_NO_REENTRANCE;
VA_CHECK_INITIALIZED;
VA_TRY
{
const CVAListenerDesc* pDesc = m_pSceneMan->GetListenerDesc( iListenerID );
const CVAListenerDesc* pDesc = m_pSceneMan->GetListenerDesc( iSoundReceiverID );
return pDesc->bEnabled;
}
VA_RETHROW;
}
void CVACoreImpl::SetActiveListenerExplicitRenderer( const int iID, const std::string& sRendererID )
void CVACoreImpl::SetActiveSoundReceiverExplicitRenderer( const int iID, const std::string& sRendererID )
{
// @todo JST call renderer and set active listener
VA_EXCEPT2( NOT_IMPLEMENTED, "This method is currently not available (not implented)." );
}
int CVACoreImpl::GetActiveListenerExplicitRenderer( const std::string& sRendererID ) const
int CVACoreImpl::GetActiveSoundReceiverExplicitRenderer( const std::string& sRendererID ) const
{
// @todo JST call renderer and return active listener
VA_EXCEPT2( NOT_IMPLEMENTED, "This method is currently not available (not implented)." );
......@@ -3681,15 +3681,15 @@ void CVACoreImpl::SetGlobalAuralizationMode( const int iAuralizationMode )
VA_RETHROW;
}
int CVACoreImpl::GetActiveListener() const
int CVACoreImpl::GetActiveSoundReceiver() const
{
VA_NO_REENTRANCE;
VA_CHECK_INITIALIZED;
return m_iCurActiveListener;
return m_iCurActiveSoundReceiver;
}
void CVACoreImpl::SetActiveListener( const int iListenerID )
void CVACoreImpl::SetActiveSoundReceiver( const int iListenerID )
{
VA_NO_REENTRANCE;
VA_CHECK_INITIALIZED;
......@@ -3711,14 +3711,14 @@ void CVACoreImpl::SetActiveListener( const int iListenerID )
}
*/
if( iListenerID != m_iUpdActiveListener )
if( iListenerID != m_iUpdActiveSoundReceiver )
{
m_iUpdActiveListener = iListenerID;
m_iCurActiveListener = iListenerID;
m_iUpdActiveSoundReceiver = iListenerID;
m_iCurActiveSoundReceiver = iListenerID;
// Ereignis generieren
CVAEvent ev;
ev.iEventType = CVAEvent::VA_EVENT_ACTIVE_LISTENER_CHANGED;
ev.iEventType = CVAEvent::VA_EVENT_ACTIVE_SOUND_RECEIVER_CHANGED;
ev.pSender = this;
ev.iObjectID = iListenerID;
m_pCoreEventMan->EnqueueEvent( ev );
......
......@@ -278,10 +278,10 @@ public:
void SetOutputMuted( const bool bMuted );
int GetGlobalAuralizationMode() const;
void SetGlobalAuralizationMode( const int iAuralizationMode );
int GetActiveListener() const;
void SetActiveListener( const int iListenerID );
int GetActiveListenerExplicitRenderer( const std::string& sRendererID ) const;
void SetActiveListenerExplicitRenderer( const int iListenerID, const std::string& sRendererID );
int GetActiveSoundReceiver() const;
void SetActiveSoundReceiver( const int iSoundReceiverID );
int GetActiveSoundReceiverExplicitRenderer( const std::string& sRendererID ) const;
void SetActiveSoundReceiverExplicitRenderer( const int iSoundReceiverID, const std::string& sRendererID );
double GetCoreClock() const;
void SetCoreClock( const double dSeconds );
......@@ -401,9 +401,9 @@ private:
CVASceneManager* m_pSceneMan;
CVASceneState* m_pNewSceneState; //! Neuer Szenezustand fr nderungen
ITAAtomicInt m_iCurActiveListener; // Aktueller aktiver Hrer im Core-Thread
ITAAtomicInt m_iNewActiveListener; // Neuer aktiver Hrer fr den Core-Thread
ITAAtomicInt m_iUpdActiveListener; // Neuer aktiver Hrer (Puffer fr nderung)
ITAAtomicInt m_iCurActiveSoundReceiver; // Aktueller aktiver Hrer im Core-Thread
ITAAtomicInt m_iNewActiveSoundReceiver; // Neuer aktiver Hrer fr den Core-Thread
ITAAtomicInt m_iUpdActiveSoundReceiver; // Neuer aktiver Hrer (Puffer fr nderung)
// --= Progress =---------------------------------------------------
......
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