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

Applying renaming of VA event ids

parent b81fa5bc
......@@ -457,15 +457,18 @@ void CVAAudioSignalSourceManager::ReleaseSignalSource( IVAAudioSignalSource* pSo
it->second.iRefCount--;
}
void CVAAudioSignalSourceManager::SyncSignalSources() {
void CVAAudioSignalSourceManager::SyncSignalSources()
{
// Diese Methode wartet einen Stream-Zyklus ab und stellt damit sicher
// das alle nderung an den Signalquellen im Audio-Stream Kontext abgearbeitet wurden.
// Falls Streaming nicht im Gange => Nicht warten
if( !m_pParentCore->IsStreaming() ) return;
if( !m_pParentCore->IsStreaming() )
return;
// Keine Ketten => Nicht warten (sonst Deadlock)
if( m_mRecords.empty() ) return;
if( m_mRecords.empty() )
return;
// Aktuellen Stream-Counter ermitteln
int iEntryCount = m_iStreamCounter;
......
......@@ -140,7 +140,7 @@ public:
private:
// Hilfsklasse welche registrierte Audiosignalquellen beschreibt
class CAudioSignalSourceRecord
class CAudioSignalSource
{
public:
IVAAudioSignalSource* pSource; // Audiosignalquelle
......@@ -150,7 +150,7 @@ private:
bool bManaged; // Ist der Manager Besitzer der Quelle?
bool bDynamic; // Kann die Quelle zur Laufzeit entfernt werden?
inline CAudioSignalSourceRecord( IVAAudioSignalSource* pSource, const std::string& sName, int iBlockLength, bool bManaged, bool bDynamic )
inline CAudioSignalSource( IVAAudioSignalSource* pSource, const std::string& sName, int iBlockLength, bool bManaged, bool bDynamic )
: sbSampleBuffer( iBlockLength, false )
, pSource( pSource )
, sName( sName )
......@@ -160,13 +160,13 @@ private:
{};
};
typedef std::map<std::string, CAudioSignalSourceRecord> RecordMap;
typedef std::pair<std::string, CAudioSignalSourceRecord> RecordItem;
typedef RecordMap::iterator RecordMapIt;
typedef RecordMap::const_iterator RecordMapCit;
typedef std::map<std::string, CAudioSignalSource> SignalSourceMap;
typedef std::pair<std::string, CAudioSignalSource> SignalSourceItem;
typedef SignalSourceMap::iterator SignalSourceMapIt;
typedef SignalSourceMap::const_iterator SignalSourceMapCit;
RecordMap m_mRecords; // Assoziationen ID -> Eintrag
ITACriticalSection m_csRecords; // Lock fr die Quellen
SignalSourceMap m_mSignalSources; // Assoziationen ID -> Eintrag
ITACriticalSection m_csSignalSourceAccess; // Lock fr die Quellen
std::map<std::string, int> m_mMnemonicCount; // Zhler fr Mnemonics (fr Zahl in den IDs)
CVACoreImpl* m_pParentCore;
......@@ -178,19 +178,21 @@ private:
std::vector<ITASampleBuffer> m_vsbDeviceInputBuffers; // Samplepuffer fr die Audio-Eingnge
std::vector< std::string > m_vsDeviceInputSourceIDs; // Eingangsnummer -> Datenquellen-ID
std::set<CAudioSignalSourceRecord*> m_spIntSources; // Audiostream-interne Liste der Quellen
tbb::concurrent_queue<CAudioSignalSourceRecord*> m_qpNewSources; //!< Lock-free queue: New sources
tbb::concurrent_queue<CAudioSignalSourceRecord*> m_qpDelReqSources; //!< Lock-free queue: Request delete sources
std::set<CAudioSignalSource*> m_spIntSources; // Audiostream-interne Liste der Quellen
tbb::concurrent_queue<CAudioSignalSource*> m_qpNewSources; //!< Lock-free queue: New sources
tbb::concurrent_queue<CAudioSignalSource*> m_qpDelReqSources; //!< Lock-free queue: Request delete sources
ITAAtomicInt m_iStreamCounter; //!< Counts the number of processed stream blocks
VistaThreadEvent m_evStreamCounterInc; //!< Event: Stream counter incremented
// Record anhand der ID suchen
RecordMapIt FindSignalSource( const std::string& sID );
RecordMapCit FindSignalSource( const std::string& sID ) const;
//! Signal source find by ID
SignalSourceMapIt FindSignalSource( const std::string& sID );
// Record anhand des Instanzzeigers suchen
RecordMapIt FindSignalSource( IVAAudioSignalSource* pSource );
//! Signal source find by ID (const)
SignalSourceMapCit FindSignalSource( const std::string& sID ) const;
//! Signal source find by pointer
SignalSourceMapIt FindSignalSource( IVAAudioSignalSource* pSource );
//! Warten bis im Streaming-Kontext die nderung an den Signalquellen bernommen wurde [blocking]
void SyncSignalSources();
......
This diff is collapsed.
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