Commit 31ac0674 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Starting implementation of new methods

parent 5793a0c0
......@@ -22,6 +22,7 @@ public:
std::string sName; //!< Versatile name
ITAAtomicBool bEnabled; //!< Enabled/disabled for rendering
std::string sExplicitRendererID; //!< Explicit renderer identifier, or empty
// @todo bInitPositionOrientation
inline void PreRequest()
{
......
This diff is collapsed.
......@@ -337,13 +337,13 @@ private:
// --= Signal sources and sounds =----------------------------------
CVAAudioSignalSourceManager* m_pSignalSourceMan;
CVAAudioSignalSourceManager* m_pSignalSourceManager;
ITASoundSamplePool* m_pGlobalSamplePool;
ITASoundSampler* m_pGlobalSampler; // Sequencer fr ambient sounds
// --= Directivity & HRIRs =----------------------------------------
CVADirectivityManager* m_pDirMan;
CVADirectivityManager* m_pDirectivityManager;
// --= Rendering & Reproduction =-----------------------------------
......@@ -406,7 +406,7 @@ private:
// --= Scene =------------------------------------------------------
CVASceneManager* m_pSceneMan;
CVASceneManager* m_pSceneManager;
CVASceneState* m_pNewSceneState; //! Neuer Szenezustand fr nderungen
ITAAtomicInt m_iCurActiveSoundReceiver; // Aktueller aktiver Hrer im Core-Thread
......@@ -458,7 +458,7 @@ private:
void FinishProgress();
CVACoreEventManager* m_pCoreEventMan;
CVACoreEventManager* m_pEventManager;
// Diese Hilfsmethoden bedienen die Locks um die serielle Ausfhrung
// externer Methoden zu gewhrleisten und die Reentrance zu blockieren
......
......@@ -61,18 +61,19 @@ public:
{
// Zunchst prfen, ob das Objekt schon enthalten ist
int iID = GetID( pObject );
if( iID != -1 ) return iID;
if( iID != -1 )
return iID;
// Freie ID holen
iID = m_iIDCount++;
// Zuordnungen setzen
//m_sElements.insert(pObject);
m_mID2Object.insert( std::pair<int, T*>( iID, pObject ) );
m_mObject2ID.insert( std::pair<T*, int>( pObject, iID ) );
m_mID2Object.insert( std::pair< int, T* >( iID, pObject ) );
m_mObject2ID.insert( std::pair< T*, int >( pObject, iID ) );
// Referenzzhler initialisieren
m_mID2Ref.insert( std::pair<int, int>( iID, 0 ) );
m_mID2Ref.insert( std::pair< int, int >( iID, 0 ) );
return iID;
};
......
......@@ -90,7 +90,7 @@ int CVADirectivityManager::CreateDirectivity( const CVAStruct& oParams, const st
{
delete pReader;
std::string sErrorStr = DAFFUtils::StrError( iError );
VA_EXCEPT1( std::string( "Could not load HRIR dataset from file \"" ) +
VA_EXCEPT1( std::string( "Could not load directivity dataset from file \"" ) +
sDestFilePath + std::string( "\". " ) + sErrorStr + std::string( "." ) );
}
......@@ -117,22 +117,21 @@ int CVADirectivityManager::CreateDirectivity( const CVAStruct& oParams, const st
}
else if( sSuffix == "sofa" )
{
// Sofa
// Someone else, please
VA_EXCEPT_NOT_IMPLEMENTED;
}
/*
else if (sSuffix == "hsh")
{
pHRIR = new CVAHRIRDatasetSH(sFilename, sName, m_dSamplerate);
pHRIR = new CVAHRIRDatasetSH(sFilename, sName, m_dSamplerate);
}
*/
if( !pDirectivity )
VA_EXCEPT2( INVALID_PARAMETER, "Directiviy format not recognized or unsupported" );
// HRIR hinzufgen
const int iID = m_oDirectivities.Add( pDirectivity );
VA_VERBOSE( "HRIRMan", "Successfully created directivity with ID " << iID );
VA_VERBOSE( "DirectivityManager", "Successfully created directivity with ID " << iID );
return iID;
}
......@@ -144,7 +143,7 @@ int CVADirectivityManager::CreateDirectivity( const CVAStruct& oParams, const st
bool CVADirectivityManager::DeleteDirectivity( const int iID )
{
VA_VERBOSE( "DirectivityManager", "Freeing HRIR with ID " << iID );
VA_VERBOSE( "DirectivityManager", "Freeing directivity with ID " << iID );
// Prfen ob die ID gltig ist
int iRefCount = m_oDirectivities.GetRefCount( iID );
......@@ -152,13 +151,12 @@ bool CVADirectivityManager::DeleteDirectivity( const int iID )
if( iRefCount != 0 )
{
// Noch Referenzen vorhanden oder ungltige ID (-1)
VA_VERBOSE( "DirectivityManager", "FreeHRIR failed, HRIR still in use by a user or invalid ID " << iID << ")" );
VA_VERBOSE( "DirectivityManager", "Deleting directivity failed, still in use by a user or invalid ID " << iID << ")" );
return false;
}
// HRIR lschen
IVADirectivity* pHRIR = m_oDirectivities[ iID ];
delete pHRIR;
IVADirectivity* pDirectivity = m_oDirectivities[ iID ];
delete pDirectivity;
m_oDirectivities.Remove( iID );
VA_VERBOSE( "DirectivityManager", "Directivity successfully cleared" );
......@@ -187,7 +185,7 @@ CVADirectivityInfo CVADirectivityManager::GetDirectivityInfo( const int iID )
{
IVADirectivity* pDirectivity = m_oDirectivities[ iID ];
if( !pDirectivity )
VA_EXCEPT2( INVALID_ID, "Invalid HRIR dataset ID" );
VA_EXCEPT2( INVALID_ID, "Invalid directivity dataset ID" );
CVADirectivityInfo oInfo;
oInfo.iID = iID;
......@@ -211,7 +209,7 @@ void CVADirectivityManager::GetDirectivityInfos( std::vector< CVADirectivityInfo
}
}
void CVADirectivityManager::PrintHRIRInfos()
void CVADirectivityManager::PrintInfos()
{
std::vector<CVADirectivityInfo> v;
GetDirectivityInfos( v );
......
......@@ -81,7 +81,7 @@ public:
void GetDirectivityInfos( std::vector< CVADirectivityInfo >& voInfos );
//! Gibt Informationen ber alle geladenen HRIR-Datenstze auf der Konsole aus
void PrintHRIRInfos();
void PrintInfos();
private:
CVAObjectContainer<IVADirectivity> m_oDirectivities;
......
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