Removed some warnings incvluding a utils function change where the view vector...

Removed some warnings incvluding a utils function change where the view vector is not required to determine the target elevation angle
parent f1f254e7
......@@ -472,6 +472,7 @@ void CVAAudioSignalSourceManager::SyncSignalSources()
int iEntryCount = m_iStreamCounter;
// Warten bis tatschlich incrementiert (mittels energiesparendem Event)
#pragma warning( disable : 4127 ) // We allow for a constant expression in this infinite while loop
while( true )
{
// [fwe] Fix: Falls das Streaming nicht gestartet wurde. Direkt aus dem Wait raus.
......@@ -487,6 +488,7 @@ void CVAAudioSignalSourceManager::SyncSignalSources()
return;
}
#pragma warning( default : 4127 )
}
void CVAAudioSignalSourceManager::FetchInputData( const CVAAudiostreamState* pStreamInfo )
......
......@@ -669,9 +669,7 @@ double CVAAmbisonicsFreeFieldAudioRenderer::dAzimuthSource2ReproCenter( const CV
double CVAAmbisonicsFreeFieldAudioRenderer::dElevationSource2ReproCenter( const CVAMotionState* pMotionState )
{
// VAVec3 vPosSource2ReceiverVirtualScene = pMotionState->GetPosition() - m_vUserPosVirtualScene;
//return GetElevationOnTarget_DEG(m_vReproSystemVirtualPosition, pMotionState->GetView(), pMotionState->GetUp(), pMotionState->GetPosition());
return GetElevationOnTarget_DEG(m_vReproSystemVirtualPosition, m_vReproSystemVirtualView, m_vReproSystemVirtualUp, pMotionState->GetPosition());
return GetElevationOnTarget_DEG(m_vReproSystemVirtualPosition, m_vReproSystemVirtualUp, pMotionState->GetPosition());
}
......
......@@ -134,7 +134,7 @@ void CVAAmbisonicsReproduction::SetInputDatasource( ITADatasource* p )
const CVAHardwareDevice* pDevice = m_pOutput->vpDevices[ k ];
dAzimuth = GetAzimuthOnTarget_DEG(m_v3ReproductionCenterPos, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
dElevation = GetElevationOnTarget_DEG(m_v3ReproductionCenterPos, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
dElevation = GetElevationOnTarget_DEG(m_v3ReproductionCenterPos, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
vdYParts = SHRealvaluedBasefunctions( ITAConstants::PI_D / 2 - dElevation, dAzimuth, m_iAmbisonicsTruncationOrder );
for( int l = 0; l < vdYParts.size(); l++ )
......
......@@ -118,7 +118,7 @@ CVAAmbisonicsBinauralMixdownReproduction::CVAAmbisonicsBinauralMixdownReproducti
const CVAHardwareDevice* pDevice = m_pVirtualOutput->vpDevices[k];
dAzimuth = GetAzimuthOnTarget_DEG(va3Origin, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
dElevation = GetElevationOnTarget_DEG(va3Origin, va3View, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
dElevation = GetElevationOnTarget_DEG(va3Origin, va3Up, pDevice->vPos) / 180 * ITAConstants::PI_D;
vdYParts = SHRealvaluedBasefunctions(ITAConstants::PI_D/2-dElevation, dAzimuth, m_iAmbisonicsTruncationOrder);
for (int l = 0; l < vdYParts.size(); l++)
......@@ -207,7 +207,7 @@ void CVAAmbisonicsBinauralMixdownReproduction::UpdateScene( CVASceneState* pNewS
const CVAHardwareDevice* pDevice( m_pVirtualOutput->vpDevices[i] );
double dAzimuth = GetAzimuthOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, pDevice->vPos );
double dElevation = GetElevationOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, pDevice->vPos );
double dElevation = GetElevationOnTarget_DEG( vListenerPos, vListenerUp, pDevice->vPos );
double dDistance = ( pDevice->vPos - vListenerPos ).Length();
......
......@@ -152,7 +152,7 @@ void CVABinauralMixdownReproduction::UpdateScene( CVASceneState* pNewState )
const CVAHardwareDevice* pDevice( m_pVirtualOutput->vpDevices[i] );
double dAzimuth = GetAzimuthOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, pDevice->vPos );
double dElevation = GetElevationOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, pDevice->vPos );
double dElevation = GetElevationOnTarget_DEG( vListenerPos, vListenerUp, pDevice->vPos );
double dDistance = ( pDevice->vPos - vListenerPos ).Length();
......
......@@ -32,45 +32,45 @@
// Lock fr den Puffer in den Ausgabe-Routinen
static ITACriticalSection g_csDebugPrintf;
static char g_pszDebugPrintfBuf[16384];
static char g_pszDebugPrintfBuf[ 16384 ];
void VA_DEBUG_PRINTF(const char * format, ... )
{
void VA_DEBUG_PRINTF( const char * format, ... )
{
VistaMutexLock oLock( VALog_getOutputStreamMutex() );
#ifdef DEBUG_PRINTF_MSVC
g_csDebugPrintf.enter();
va_list args;
va_start(args, format);
vsprintf_s(g_pszDebugPrintfBuf, DEBUG_PRINTF_BUFSIZE, format, args);
va_end(args);
va_start( args, format );
vsprintf_s( g_pszDebugPrintfBuf, DEBUG_PRINTF_BUFSIZE, format, args );
va_end( args );
OutputDebugStringA(g_pszDebugPrintfBuf);
OutputDebugStringA( g_pszDebugPrintfBuf );
g_csDebugPrintf.leave();
#else
va_list args;
va_start(args, format);
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
#endif
}
void VA_DEBUG_PRINTF(int module, int level, const char * format, ... )
void VA_DEBUG_PRINTF( int, int, const char * format, ... )
{
VistaMutexLock oLock(VALog_getOutputStreamMutex());
VistaMutexLock oLock( VALog_getOutputStreamMutex() );
#ifdef DEBUG_PRINTF_MSVC
g_csDebugPrintf.enter();
va_list args;
va_start(args, format);
vsprintf_s(g_pszDebugPrintfBuf, DEBUG_PRINTF_BUFSIZE, format, args);
va_end(args);
va_start( args, format );
vsprintf_s( g_pszDebugPrintfBuf, DEBUG_PRINTF_BUFSIZE, format, args );
va_end( args );
OutputDebugStringA(g_pszDebugPrintfBuf);
OutputDebugStringA( g_pszDebugPrintfBuf );
g_csDebugPrintf.leave();
#else
va_list args;
va_start(args, format);
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
#endif
......
......@@ -280,11 +280,10 @@ double GetAzimuthOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vView, co
return ( ( dAzimuthAngleDeg < 0.0f ) ? ( dAzimuthAngleDeg + 360.0f ) : dAzimuthAngleDeg );
}
double GetElevationOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vView, const VAVec3& vUp, const VAVec3& vTargetPos )
double GetElevationOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vUp, const VAVec3& vTargetPos )
{
VAVec3 vDir = vTargetPos - vOriginPos;
vDir.Norm();
const VAVec3 vRight = vView.Cross( vUp );
const double dElevationAngleDeg = asin( vDir.Dot( vUp ) ) * 180.0f / ITAConstants::PI_D;
return dElevationAngleDeg;
}
......
......@@ -54,7 +54,7 @@ void ConvertViewUpToQuaternion( const VAVec3& vView, const VAVec3& vUp, VAQuat&
double GetAzimuthOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vView, const VAVec3& vUp, const VAVec3& vTargetPos );
//! Get elevation angle from a reference coordinate system defined by origin and orientation to a target position
double GetElevationOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vView, const VAVec3& vUp, const VAVec3& vTargetPos );
double GetElevationOnTarget_DEG( const VAVec3& vOriginPos, const VAVec3& vUp, const VAVec3& vTargetPos );
//! Ersetzt Backslashes (bzw. PATH_SEPARATOR) durch doppelte Backslashes (bzw. PATH_SEPARATOR)
std::string correctPathForLUA( const std::string& sPath );
......
......@@ -176,6 +176,7 @@ void CVALockfreeObjectPool::ReleaseObject( CVAPoolObject* pObject )
// Objekt aus der Used-Queue entfernen
// TODO: Evtl. gegen unsicherere O(1) Strategie austauschen (diese ist in O(N))
#pragma warning( disable : 4127 ) // We allow for a constant expression in the do-while loop
CVAPoolObject* pUsedObject( nullptr );
do
{
......@@ -189,6 +190,7 @@ void CVALockfreeObjectPool::ReleaseObject( CVAPoolObject* pObject )
m_qUsed.push( pUsedObject );
} while( true );
#pragma warning( default : 4127 )
--m_nUsed;
m_qFree.push( pObject );
......
......@@ -53,8 +53,8 @@ void CVASourceReceiverMetrics::Calc( const VAVec3& vSourcePos, const VAVec3& vSo
{
dAzimuthL2S = GetAzimuthOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, vSourcePos );
dAzimuthS2L = GetAzimuthOnTarget_DEG( vSourcePos, vSourceView, vSourceUp, vListenerPos );
dElevationL2S = GetElevationOnTarget_DEG( vListenerPos, vListenerView, vListenerUp, vSourcePos );
dElevationS2L = GetElevationOnTarget_DEG( vSourcePos, vSourceView, vSourceUp, vListenerPos );
dElevationL2S = GetElevationOnTarget_DEG( vListenerPos, vListenerUp, vSourcePos );
dElevationS2L = GetElevationOnTarget_DEG( vSourcePos, vSourceUp, vListenerPos );
const VAVec3 vDirectionVector( vListenerPos - vSourcePos );
dDistance = vDirectionVector.Length();
......
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