Style

parent b810b516
......@@ -3,7 +3,7 @@
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA), 2015-2017
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
......@@ -19,16 +19,16 @@
#include <cmath>
#if ( defined WIN32 ) && !( defined VABASE_STATIC )
#ifdef VABASE_EXPORTS
#define VABASE_API __declspec( dllexport )
#define VABASE_IMPL_TEMPLATE
#else
#define VABASE_API __declspec( dllimport )
#define VABASE_IMPL_TEMPLATE
#endif
#ifdef VABASE_EXPORTS
#define VABASE_API __declspec( dllexport )
#define VABASE_IMPL_TEMPLATE
#else
#define VABASE_API
#define VABASE_IMPL_TEMPLATE
#define VABASE_API __declspec( dllimport )
#define VABASE_IMPL_TEMPLATE
#endif
#else
#define VABASE_API
#define VABASE_IMPL_TEMPLATE
#endif
#if defined( _MSC_VER ) || defined( WIN32 )
......@@ -75,7 +75,7 @@ public:
double x, y, z;
};
};
inline VAVec3() : x( 0 ), y( 0 ), z( 0 ) {};
inline VAVec3( const VAVec3& v ) : x( v.x ), y( v.y ), z( v.z ) {};
inline VAVec3( double x, double y, double z ) : x( x ), y( y ), z( z ) {};
......@@ -107,15 +107,13 @@ public:
return ( x * vDotProduct.x + y * vDotProduct.y + z * vDotProduct.z );
};
inline void Norm()
inline void Norm()
{
const double l = Length();
x /= l;
y /= l;
z /= l;
}
};
};
inline VABASE_API bool operator==( const VAVec3& a, const VAVec3& b )
......@@ -167,9 +165,8 @@ public:
double yaw; //!< Right-hand rotation around Y-axis
double pitch; //!< Right-hand rotation around X-axis
double roll; //!< Right-hand rotation around negative Z-axis
inline VAOrientYPR() : yaw(0), pitch(0), roll(0) {};
inline VAOrientYPR() : yaw( 0 ), pitch( 0 ), roll( 0 ) {};
inline VAOrientYPR( double yaw, double pitch, double roll ) : yaw( yaw ), pitch( pitch ), roll( roll ) {};
inline virtual ~VAOrientYPR() {};
......@@ -221,7 +218,7 @@ struct VABASE_API CVAAudioReproductionInfo
//! Describes the current state of a progress
/**
* This data class is used to describe the current state of a
* This data class is used to describe the current state of a
* running process (progress). It is intended for the purpose
* of displaying the progress of an action that takes some time
* to be shown in a user interface (i.e. the initialisation of
......@@ -236,7 +233,11 @@ public:
std::string sSubaction; //!< Currently performed sub action
//! Constructor
inline CVAProgress() : iCurrentStep( 0 ), iMaxStep( 0 ) {};
inline CVAProgress()
: iCurrentStep( 0 )
, iMaxStep( 0 )
{
};
};
......@@ -256,10 +257,12 @@ public:
* \param sTheName Name string of the integer literal, i.e. 'VA_AURAMOD_DEFAULT'
* \param iTheValue Value of the integer
*/
inline CVAIntLiteral( const std::string& sTheScope,
const std::string& sTheName,
int iTheValue)
: sScope(sTheScope), sName(sTheName), iValue(iTheValue) {}
inline CVAIntLiteral( const std::string& sTheScope, const std::string& sTheName, int iTheValue )
: sScope( sTheScope )
, sName( sTheName )
, iValue( iTheValue )
{
};
};
//! Data class containing information of loaded directivities
......@@ -274,7 +277,11 @@ public:
// TODO: Auflsung usw.
//! Default constructor
inline CVADirectivityInfo() : iID( -1 ), iReferences( 0 ) {};
inline CVADirectivityInfo()
: iID( -1 )
, iReferences( 0 )
{
};
//! Initializing constructor
/**
......@@ -285,17 +292,17 @@ public:
* \param iReferences Usage reference count of directivity data
*/
inline CVADirectivityInfo( int iID,
const std::string& sName,
const std::string& sFilename,
const std::string& sDesc,
int iReferences)
const std::string& sName,
const std::string& sFilename,
const std::string& sDesc,
int iReferences )
{
this->iID = iID;
this->sName = sName;
this->sFilename = sFilename;
this->sDesc = sDesc;
this->iReferences = iReferences;
}
};
};
......@@ -303,7 +310,8 @@ public:
/**
* Head-related impulse respone (HRIR) data class
*/
class VABASE_API CVAHRIRInfo {
class VABASE_API CVAHRIRInfo
{
public:
int iID; //!< ID
std::string sName; //!< Name (optional)
......@@ -313,7 +321,11 @@ public:
// TODO: More fields?
//! Default constructor
inline CVAHRIRInfo() : iID( -1 ), iReferences( 0 ) {};
inline CVAHRIRInfo()
: iID( -1 )
, iReferences( 0 )
{
};
//! Initializing constructor
/**
......@@ -324,22 +336,23 @@ public:
* \param iReferences Usage reference count of HRIR data
*/
inline CVAHRIRInfo( int iID,
const std::string& sName,
const std::string& sFilename,
const std::string& sDesc,
int iReferences)
const std::string& sName,
const std::string& sFilename,
const std::string& sDesc,
int iReferences )
{
this->iID = iID;
this->sName = sName;
this->sFilename = sFilename;
this->sDesc = sDesc;
this->iReferences = iReferences;
}
};
};
//! Data class containing information of loaded sounds
class VABASE_API CVASoundInfo {
class VABASE_API CVASoundInfo
{
public:
int iID; //!< ID
std::string sName; //!< Name (optional)
......@@ -348,34 +361,40 @@ public:
double dDuration; //!< Duration [s]
//! Default constructor
inline CVASoundInfo() : iID( -1 ), iLength( 0 ), dDuration( 0 ) {};
inline CVASoundInfo()
: iID( -1 )
, iLength( 0 )
, dDuration( 0 )
{
};
//! Initializing constructor
/**
* \param iID Identifier
* \param sName Name of sound
* \param sFilename Path to the data file
* \param iLength Length of track in samples
* \param iLength Length of track in samples
* \param dDuration Duration of track in seconds
*/
inline CVASoundInfo( int iID,
const std::string& sName,
const std::string& sFilename,
int iLength,
double dDuration)
const std::string& sName,
const std::string& sFilename,
int iLength,
double dDuration )
{
this->iID = iID;
this->sName = sName;
this->sFilename = sFilename;
this->iLength = iLength;
this->dDuration = dDuration;
}
};
};
/* stienen fragt: ist das nicht berlagernd mit IVAAudioSignalSource? */
//! Data class for signal source information
class VABASE_API CVASignalSourceInfo {
class VABASE_API CVASignalSourceInfo
{
public:
std::string sID; //!< ID (i.e. "af1")
std::string sType; //!< Type (File|Sampler|Device input|Network stream)
......@@ -383,7 +402,7 @@ public:
std::string sDesc; //!< Description
std::string sState; //!< State description
int iReferences; //!< Reference counter
//! Default constructor
inline CVASignalSourceInfo() : iReferences( 0 ) {};
......@@ -393,15 +412,10 @@ public:
* \param sType Type of signal source info (i.e. File|Sampler|Device input|Network stream)
* \param sName Name of signal source info
* \param sDesc Brief description of signal source info
* \param sState State description of signal source info
* \param sState State description of signal source info
* \param iReference Usage reference counter
*/
inline CVASignalSourceInfo( const std::string& sID,
const std::string& sType,
const std::string& sName,
const std::string& sDesc,
const std::string& sState,
int iReferences)
inline CVASignalSourceInfo( const std::string& sID, const std::string& sType, const std::string& sName, const std::string& sDesc, const std::string& sState, int iReferences )
{
this->sID = sID;
this->sType = sType;
......@@ -414,7 +428,8 @@ public:
//! Data class containing information of a loaded scene
class VABASE_API CVASceneInfo {
class VABASE_API CVASceneInfo
{
public:
//std::string sName; //!< Name (optional)
//std::string sFilename; //!< Scene filename (e.g. RAVEN project file)
......@@ -423,14 +438,15 @@ public:
//! Data class describing states of audio streams
class VABASE_API CVAAudiostreamState {
class VABASE_API CVAAudiostreamState
{
public:
int64_t i64Sample; //!< Index of the first sample since last clock reset
double dSysTime; //!< Associated system time in time [s] (internal core clock) of the first sample of the requested output block.
double dCoreTime; //!< Associated playback time in core clock time [s] (world time) of the first sample of the requested output block.
bool bTimeReset; //!< Flag that indicates a discontinous change of the playback time (world time)
//!< Synchronise commands on the stream
//!< Synchronise commands on the stream
/** Flag that indicates, that a synchronized
* sequence of atomic commands is executed on
* elements of the stream. If this flag is true
......@@ -448,7 +464,8 @@ public:
//! Data class containing information of a sound source (acoustic actuator)
class VABASE_API CVASoundSourceInfo {
class VABASE_API CVASoundSourceInfo
{
public:
int iID; //!< ID
std::string sName; //!< Displayed name
......@@ -465,7 +482,8 @@ public:
//! Data class containing information of a listener (acoustic receiver)
class VABASE_API CVAListenerInfo {
class VABASE_API CVAListenerInfo
{
public:
int iID; //!< ID
std::string sName; //!< Displayed name
......@@ -479,7 +497,8 @@ public:
//! Data class containing information of a portal (acoustic portal)
class VABASE_API CVAPortalInfo {
class VABASE_API CVAPortalInfo
{
public:
int iID; //!< ID
std::string sName; //!< Displayed name (optional)
......
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