Commit 3574f083 authored by Jonas Stienen's avatar Jonas Stienen
Browse files

Replacing win32-only ITATimer with VistaTicker. And style.

parent 8140242c
This diff is collapsed.
/*
* ---------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
......@@ -9,24 +9,13 @@
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* Datei: VACoreImpl.h
*
* Zweck: Implementierungsklasse des VA-Kerns
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*/
// $Id: VACoreImpl.h 4598 2016-02-29 19:54:45Z stienen $
#ifndef __VA_COREIMPL_H__
#define __VA_COREIMPL_H__
#ifndef IW_VA_CORE_IMPL
#define IW_VA_CORE_IMPL
#include <ITAAtomicPrimitives.h>
#include <ITACriticalSection.h>
#include <ITATimer.h>
#include <VACore.h>
#include <VABaseDefinitions.h>
......@@ -39,6 +28,7 @@
#include "Rendering/VAAudioRenderer.h"
#include <VistaInterProcComm/Concurrency/VistaMutex.h>
#include <VistaInterProcComm/Concurrency/VistaTicker.h>
#include <list>
#include <memory>
......@@ -63,7 +53,14 @@ class ITAStreamAmplifier;
class ITAStreamPatchbay;
class ITAStreamProbe;
class CVACoreImpl : public IVACore, public CVAObject, public ITATimerEventHandler
// Wwwh ... ugly name clash with WinSDK definition.
#if WIN32
#ifdef PlaySound
#undef PlaySound
#endif
#endif // WIN32
class CVACoreImpl : public IVACore, public CVAObject, public VistaTicker::AfterPulseFunctor
{
public:
CVACoreImpl(const CVAStruct& oArgs);
......@@ -133,7 +130,7 @@ public:
bool FreeSound(int iSoundID);
CVASoundInfo GetSoundInfo(int iSoundID) const;
void GetSoundInfos(std::vector<CVASoundInfo>& vsiDest) const;
int PlaySound(int iSoundID, double dVolume=1.0) const;
int PlaySound( int iSoundID, double dVolume ) const;
// Nur fr interne Benutzung
ITASoundSamplePool* GetSamplePool() const;
......@@ -441,9 +438,9 @@ public:
CVAObjectInfo GetObjectInfo() const;
int CallObject(const CVAStruct& oArgs, CVAStruct& oReturn);
// --= Schnittstelle "ITATimerEventHandler" =----------------
// Ticker callback
bool operator()();
void handleTimerEvent(const ITATimer& tSource);
// --= Methoden fr interne Module =-------------------------
......@@ -464,7 +461,7 @@ private:
CVAObjectRegistry m_oModules; // Komponenten Registrierung
ITAAtomicInt m_iGlobalAuralizationMode;
ITATimer* m_pTimer;
VistaTicker* m_pTicker;
void InitializeAudioDriver();
void FinalizeAudioDriver();
......@@ -501,8 +498,10 @@ private:
int iR2RPatchBayInput; //!< Input on the renderer-reproduction patch bay
std::vector< std::string > vsOutputs; //!< Target reproduction modules
CVAAudioRendererDesc( IVAAudioRenderer* pInstance )
: pInstance( pInstance ) {};
inline CVAAudioRendererDesc( IVAAudioRenderer* pInstance )
: pInstance( pInstance )
{
};
};
std::vector< CVAAudioRendererDesc > m_vRenderers;
......@@ -514,8 +513,10 @@ private:
int iOutputPatchBayInput; //! Input channel on the output patchbay
std::vector< const CVAHardwareOutput* > vpOutputs;
CVAAudioReproductionModuleDesc( IVAAudioReproductionModule* pInstance )
: pInstance( pInstance ) {};
inline CVAAudioReproductionModuleDesc( IVAAudioReproductionModule* pInstance )
: pInstance( pInstance )
{
};
};
std::vector< CVAAudioReproductionModuleDesc > m_vReproductionModules;
......@@ -537,7 +538,8 @@ private:
CVACoreThread* m_pCoreThread;
class CVACoreThreadData {
class CVACoreThreadData
{
public:
int iSceneStateID; // Szene-Zustand (ID)
......@@ -561,7 +563,8 @@ private:
ITAAtomicFloat m_fCoreClockOffset; // Offset der Core-Clock
// Position des Hrers im echten Raum
struct {
struct
{
double px, py, pz, vx, vy, vz, ux, uy, uz;
} m_oListenerRealWorldCoords;
......@@ -609,4 +612,4 @@ private:
friend class CVAAudioSignalSourceManager;
};
#endif // __VA_COREIMPL_H__
#endif // IW_VA_CORE_IMPL
Supports Markdown
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