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

Moving ISO 9613 atmospheric attenuation to ITACoreLibs/ITABase and removing VA...

Moving ISO 9613 atmospheric attenuation to ITACoreLibs/ITABase and removing VA atmosphere implementation
parent 05abff71
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2018
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#include "VAAtmosphere.h"
// VA includes
#include "../Utils/VADebug.h"
// ITA includes
#include <ITAException.h>
#include <ITANumericUtils.h>
// STL includes
#include <cassert>
#include <cmath>
// Aus Raven Defines
const float DEF_CENTER_FREQUENCY_OCTAVE[ 10 ] =
{
31.5f, 63.0f, 125.0f, 250.0f, 500.0f, 1000.0f, 2000.0f, 4000.0f, 8000.0f, 16000.0f
};
const float DEF_CENTER_FREQUENCY_THIRDS[ 31 ] =
{
20, 25, 31.5, 40, 50, 63, 80, 100, 125, 160, 200, 250, 315, 400, 500, 630, 800,
1000, 1250, 1600, 2000, 2500, 3150, 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000
};
void GetAirAbsorptionMagnitudes( ITABase::CThirdOctaveFactorMagnitudeSpectrum& oMags, double dDistance, double dTemperature, double dPressure, double dHumidity )
{
// ISO 9613-1 Acoustics - Attenuation of sound during propagation outdoors
// Noch nicht fertig ....
ITA_EXCEPT0( NOT_IMPLEMENTED );
// Reference ambient atmospheric pressure (Standard Ambient Atmosphere) [kPa]
// (Referenzatmosphrendruck Umgebung nach ISO Standard)
const double p_r = 101.325f;
const double p_a = 101.325f;
// Inital sound pressure amplitude [kPa]
const double p_i = p_r + 0.0f;
// Sound pressure amplitude [Pa]
const double p_t = 1.0f;
// Reference air temperature [K]
const double T_0 = 273.15f + 20.0f;
// Temperature [K]
const double T = 273.15f + dTemperature;
// Molar concentration dry air
const double tmp = ( 10.79586f * ( 1.0f - ( ( T_0 - 20.0f ) / T ) ) ) -
( 5.02808f * log10( ( T / ( T_0 - 20.0f ) ) ) ) +
( 1.50474f * 0.0001f * ( 1.0f - pow( ( double ) 10.0f, ( -8.29692f*( ( T / ( T_0 - 20.0f ) ) - 1.0f ) ) ) ) ) +
( 0.42873f * 0.001f * ( -1.0f + pow( ( double ) 10.0f, ( -4.76955f*( 1.0f - ( ( T_0 - 20.0f ) / T ) ) ) ) ) ) -
2.2195983f;
// Molar concentration of water vapour [%] (Molekldichte Wasserdampf)
assert( 0.0f <= dHumidity && dHumidity <= 100.0f );
const double h = dHumidity * pow( ( double ) 10.0f, tmp ) / ( p_a / p_r );
// Equation (3)
const double f_r_o = ( p_a / p_r ) * ( 24.0f + 4.04f*10.0e4*h*( 0.02f + h ) / ( 0.391f + h ) );
// Equation (4)
const double f_r_n = ( p_a / p_r ) * pow( T / T_0, ( double ) -1.0f / 2.0f ) * ( 9.0f + 280.0f*h*exp( -4.710f * ( pow( T / T_0, ( double ) -( 1 / 3.0f ) ) - 1.0f ) ) );
// Calculate for frequency bands
for( int i = 0; i < oMags.GetNumBands(); i++ )
{
// Frequency
double f = oMags.GetCenterFrequencies()[ i ];
// Parts of Equation (5)
double dAlpha1 = 8.686f * pow( f, ( double ) 2.0f );
double dAlpha2 = 1.84f * 10e-11 * pow( p_a / p_r, ( double ) -1.0f ) * pow( T / T_0, ( double ) -1.0f / 2.0f );
double dAlpha3 = pow( T / T_0, ( double ) -5.0f / 2.0f );
double dAlpha4 = 0.01275f * exp( -2239.1f / T ) * pow( f_r_o + pow( f, ( double ) 2.0f ) / f_r_o, ( double ) -1.0f );
double dAlpha5 = 0.10680f * exp( -3352.0f / T ) * pow( f_r_n + pow( f, ( double ) 2.0f ) / f_r_n, ( double ) -1.0f );
// Attenuation coefficient [dB/m], ~f, as assembly of Equation (5) parts
double dAlpha = dAlpha1 * ( dAlpha2 + dAlpha3 * ( dAlpha4 + dAlpha5 ) );
// Resulting attenuation [dB], ~alpha (~f)
float fAttenuationAirAbsorptionDecibel = ( float ) dAlpha * dDistance;
// Attenuation factor
//float fAttenuationAirAbsorptionFactor = 1 / exp( fAttenuationAirAbsorptionDecibel / 10 );
// Store decibel
oMags.SetMagnitude( i, fAttenuationAirAbsorptionDecibel );
//printf("Frequency [%4.2f Hz]: %f * 10^-3[dB/m], m = %f * 10^-3\n",DEF_CENTER_FREQUENCY_THIRDS[i], dAlpha*1000.0f*4.33f,fAttenuationAirAbsorptionFactor*1000.0f); // 4.33 -> in dB
}
return;
}
void CalculateAirAbsorptionAttenuation( ITABase::CThirdOctaveFactorMagnitudeSpectrum& oAirAbsMags, double dDistance, double dTemperature, double dStaticPressure, double dHumidity )
{
std::vector< float > vfGains( oAirAbsMags.GetNumBands() );
GetAirAbsorptionMagnitudesThirdOctave( &vfGains[ 0 ], dDistance, dTemperature, dStaticPressure, dHumidity );
oAirAbsMags.SetMagnitudes( vfGains );
return;
}
void GetAirAbsorptionMagnitudesThirdOctave( float* pfAirAbsCoeffs, // Zielarray (31 Werte)
double dDistance, // Abstand [m]
double dTemperature, // Temperatur [C]
double dPressure, // Statischer Luftdruck [Pa]
double dHumidity ) // Luftfeuchtigkeit [%]
{
// Code kopiert aus RE_Ops.cpp ;-)
//// init frequency bands
//std::vector<float> frequencies(31);
//frequencies[0] = 20; frequencies[1] = 25; frequencies[2] = 31,5;
//frequencies[3] = 40; frequencies[4] = 50; frequencies[5] = 63;
//frequencies[6] = 80; frequencies[7] = 100; frequencies[8] = 125;
//frequencies[9] = 160; frequencies[10]= 200; frequencies[11] = 250;
//frequencies[12]= 315; frequencies[13]= 400; frequencies[14] = 500;
//frequencies[15]= 630; frequencies[16]= 800; frequencies[17] = 1000;
//frequencies[18]= 1250; frequencies[19]= 1600; frequencies[20] = 2000;
//frequencies[21]= 2500; frequencies[22]= 3150; frequencies[23] = 4000;
//frequencies[24]= 5000; frequencies[25]= 6300; frequencies[26] = 8000;
//frequencies[27]= 10000; frequencies[28]= 12500; frequencies[29] = 16000;
//frequencies[30]= 20000;
float roomTemperatureKelvin = dTemperature + 273.16f;
float referencePressureKPa = 101.325f;
float pressureKPa = dPressure / 1000.0f;
float molarConcentrationWaterVaporPercent;
float relaxationFrequencyOxygen;
float relaxationFrequencyNitrogen;
float tmp;
// determine molar concentration of water vapor
tmp = ( 10.79586f * ( 1.0f - ( 273.16f / roomTemperatureKelvin ) ) ) -
( 5.02808f * log10( ( roomTemperatureKelvin / 273.16f ) ) ) +
( 1.50474f * 0.0001f * ( 1.0f - pow( 10.0f, ( -8.29692f*( ( roomTemperatureKelvin / 273.16f ) - 1.0f ) ) ) ) ) +
( 0.42873f * 0.001f * ( -1.0f + pow( 10.0f, ( -4.76955f*( 1.0f - ( 273.16f / roomTemperatureKelvin ) ) ) ) ) ) -
2.2195983f;
molarConcentrationWaterVaporPercent = ( dHumidity * pow( 10.0f, tmp ) ) / ( pressureKPa / referencePressureKPa );
// determine relaxation frequencies of oxygen and nitrogen
relaxationFrequencyOxygen = ( pressureKPa / referencePressureKPa ) *
( 24.0f + ( 4.04f * 10000.0f * molarConcentrationWaterVaporPercent *
( ( 0.02f + molarConcentrationWaterVaporPercent ) / ( 0.391f + molarConcentrationWaterVaporPercent ) ) ) );
relaxationFrequencyNitrogen = ( pressureKPa / referencePressureKPa ) *
( pow( ( roomTemperatureKelvin / 293.16f ), -0.5f ) ) *
( 9.0f + 280.0f * molarConcentrationWaterVaporPercent *
exp( -4.17f * ( ( pow( ( roomTemperatureKelvin / 293.16f ), -0.3333333f ) ) - 1.0f ) ) );
// determine air absorption for desired filter resolution
//unsigned int numberOfParameters = frequencies.size();
unsigned int numberOfParameters = 31;
for( unsigned int i = 0; i < numberOfParameters; ++i )
{
/* airAbsorptionCoeffs[i] =
(
pow(frequencies[i], 2.0f) *
((1.84f * pow(10.0f, -11.0f) * ( referencePressureKPa / pressureKPa) * pow((roomTemperatureKelvin/293.16f), 0.5f)) +
(pow((roomTemperatureKelvin/293.16f), -2.5f) * (
((1.278f * 0.01f * exp( (-2239.1f/roomTemperatureKelvin))) /
(relaxationFrequencyOxygen + (pow(frequencies[i], 2.0f)/relaxationFrequencyOxygen))) +
((1.068f * 0.1f * exp((-3352.0f/roomTemperatureKelvin))/
(relaxationFrequencyNitrogen + (pow(frequencies[i], 2.0f)/relaxationFrequencyNitrogen)))))))
)* 2000.0f * log10(exp(1.0f)); // Neper/m -> dB/100m
*/
/* airAbsorptionCoeffs[i] =
(
pow(frequencies[i], 2.0f) *
((1.84f * pow(10.0f, -11.0f) * ( referencePressureKPa / pressureKPa) * pow((roomTemperatureKelvin/293.16f), 0.5f)) +
(pow((roomTemperatureKelvin/293.16f), -2.5f) * (
((1.278f * 0.01f * exp( (-2239.1f/roomTemperatureKelvin))) /
(relaxationFrequencyOxygen + (pow(frequencies[i], 2.0f)/relaxationFrequencyOxygen))) +
((1.068f * 0.1f * exp((-3352.0f/roomTemperatureKelvin))/
(relaxationFrequencyNitrogen + (pow(frequencies[i], 2.0f)/relaxationFrequencyNitrogen)))))))
)* (20.0f / log(10.0f)) / ((log10(exp(1.0f))) * 10.0f); // Neper/m -> dB/m
*/
float alpha_dbm =
(
pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) *
( ( 1.84f * pow( 10.0f, -11.0f ) * ( referencePressureKPa / pressureKPa ) * pow( ( roomTemperatureKelvin / 293.16f ), 0.5f ) ) +
( pow( ( roomTemperatureKelvin / 293.16f ), -2.5f ) * (
( ( 1.278f * 0.01f * exp( ( -2239.1f / roomTemperatureKelvin ) ) ) /
( relaxationFrequencyOxygen + ( pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) / relaxationFrequencyOxygen ) ) ) +
( ( 1.068f * 0.1f * exp( ( -3352.0f / roomTemperatureKelvin ) ) /
( relaxationFrequencyNitrogen + ( pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) / relaxationFrequencyNitrogen ) ) ) ) ) ) )
)* ( 20.0f / log( 10.0f ) ) / ( ( log10( exp( 1.0f ) ) ) * 10.0f ); // Neper/m -> dB/m
pfAirAbsCoeffs[ i ] = alpha_dbm;
//printf("Frequency [%4.2f Hz]: %f * 10^-3[dB/m], m = %f * 10^-3\n",DEF_CENTER_FREQUENCY_THIRDS[i], pfAirAbsCoeffs[i]*1000.0f*4.33f,pfAirAbsCoeffs[i]*1000.0f); // 4.33 -> in dB
float alpha_db = dDistance * alpha_dbm;
float fGain = pow( 10, -alpha_db / 10 );
/*
double dDifference = 1-x;
if (dDifference > 0 )
fGain = (float) exp(log(dDifference)*fDistance);
*/
pfAirAbsCoeffs[ i ] = fGain;
//printf("Frequency [%4.2f Hz]: %f * 10^-3[dB/m], m = %f * 10^-3\n",DEF_CENTER_FREQUENCY_THIRDS[i], alpha_dbm*1000.0f*4.33f,fGain*1000.0f); // 4.33 -> in dB
}
}
void GetAirAbsorptionAttenuationThirdOctaveDecibel( float* pfAirAbsCoeffs, // Zielarray (31 Werte)
double dDistance, // Abstand [m]
double dTemperature, // Temperatur [C]
double dPressure, // Statischer Luftdruck [Pa]
double dHumidity ) // Luftfeuchtigkeit [%]
{
// Code kopiert aus RE_Ops.cpp ;-)
//// init frequency bands
//std::vector<float> frequencies(31);
//frequencies[0] = 20; frequencies[1] = 25; frequencies[2] = 31,5;
//frequencies[3] = 40; frequencies[4] = 50; frequencies[5] = 63;
//frequencies[6] = 80; frequencies[7] = 100; frequencies[8] = 125;
//frequencies[9] = 160; frequencies[10]= 200; frequencies[11] = 250;
//frequencies[12]= 315; frequencies[13]= 400; frequencies[14] = 500;
//frequencies[15]= 630; frequencies[16]= 800; frequencies[17] = 1000;
//frequencies[18]= 1250; frequencies[19]= 1600; frequencies[20] = 2000;
//frequencies[21]= 2500; frequencies[22]= 3150; frequencies[23] = 4000;
//frequencies[24]= 5000; frequencies[25]= 6300; frequencies[26] = 8000;
//frequencies[27]= 10000; frequencies[28]= 12500; frequencies[29] = 16000;
//frequencies[30]= 20000;
float roomTemperatureKelvin = dTemperature + 273.16f;
float referencePressureKPa = 101.325f;
float pressureKPa = dPressure / 1000.0f;
float molarConcentrationWaterVaporPercent;
float relaxationFrequencyOxygen;
float relaxationFrequencyNitrogen;
float tmp;
// determine molar concentration of water vapor
tmp = ( 10.79586f * ( 1.0f - ( 273.16f / roomTemperatureKelvin ) ) ) -
( 5.02808f * log10( ( roomTemperatureKelvin / 273.16f ) ) ) +
( 1.50474f * 0.0001f * ( 1.0f - pow( 10.0f, ( -8.29692f*( ( roomTemperatureKelvin / 273.16f ) - 1.0f ) ) ) ) ) +
( 0.42873f * 0.001f * ( -1.0f + pow( 10.0f, ( -4.76955f*( 1.0f - ( 273.16f / roomTemperatureKelvin ) ) ) ) ) ) -
2.2195983f;
molarConcentrationWaterVaporPercent = ( dHumidity * pow( 10.0f, tmp ) ) / ( pressureKPa / referencePressureKPa );
// determine relaxation frequencies of oxygen and nitrogen
relaxationFrequencyOxygen = ( pressureKPa / referencePressureKPa ) *
( 24.0f + ( 4.04f * 10000.0f * molarConcentrationWaterVaporPercent *
( ( 0.02f + molarConcentrationWaterVaporPercent ) / ( 0.391f + molarConcentrationWaterVaporPercent ) ) ) );
relaxationFrequencyNitrogen = ( pressureKPa / referencePressureKPa ) *
( pow( ( roomTemperatureKelvin / 293.16f ), -0.5f ) ) *
( 9.0f + 280.0f * molarConcentrationWaterVaporPercent *
exp( -4.17f * ( ( pow( ( roomTemperatureKelvin / 293.16f ), -0.3333333f ) ) - 1.0f ) ) );
// determine air absorption for desired filter resolution
//unsigned int numberOfParameters = frequencies.size();
unsigned int numberOfParameters = 31;
for( unsigned int i = 0; i < numberOfParameters; ++i )
{
/* airAbsorptionCoeffs[i] =
(
pow(frequencies[i], 2.0f) *
((1.84f * pow(10.0f, -11.0f) * ( referencePressureKPa / pressureKPa) * pow((roomTemperatureKelvin/293.16f), 0.5f)) +
(pow((roomTemperatureKelvin/293.16f), -2.5f) * (
((1.278f * 0.01f * exp( (-2239.1f/roomTemperatureKelvin))) /
(relaxationFrequencyOxygen + (pow(frequencies[i], 2.0f)/relaxationFrequencyOxygen))) +
((1.068f * 0.1f * exp((-3352.0f/roomTemperatureKelvin))/
(relaxationFrequencyNitrogen + (pow(frequencies[i], 2.0f)/relaxationFrequencyNitrogen)))))))
)* 2000.0f * log10(exp(1.0f)); // Neper/m -> dB/100m
*/
/* airAbsorptionCoeffs[i] =
(
pow(frequencies[i], 2.0f) *
((1.84f * pow(10.0f, -11.0f) * ( referencePressureKPa / pressureKPa) * pow((roomTemperatureKelvin/293.16f), 0.5f)) +
(pow((roomTemperatureKelvin/293.16f), -2.5f) * (
((1.278f * 0.01f * exp( (-2239.1f/roomTemperatureKelvin))) /
(relaxationFrequencyOxygen + (pow(frequencies[i], 2.0f)/relaxationFrequencyOxygen))) +
((1.068f * 0.1f * exp((-3352.0f/roomTemperatureKelvin))/
(relaxationFrequencyNitrogen + (pow(frequencies[i], 2.0f)/relaxationFrequencyNitrogen)))))))
)* (20.0f / log(10.0f)) / ((log10(exp(1.0f))) * 10.0f); // Neper/m -> dB/m
*/
float x =
(
pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) *
( ( 1.84f * pow( 10.0f, -11.0f ) * ( referencePressureKPa / pressureKPa ) * pow( ( roomTemperatureKelvin / 293.16f ), 0.5f ) ) +
( pow( ( roomTemperatureKelvin / 293.16f ), -2.5f ) * (
( ( 1.278f * 0.01f * exp( ( -2239.1f / roomTemperatureKelvin ) ) ) /
( relaxationFrequencyOxygen + ( pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) / relaxationFrequencyOxygen ) ) ) +
( ( 1.068f * 0.1f * exp( ( -3352.0f / roomTemperatureKelvin ) ) /
( relaxationFrequencyNitrogen + ( pow( DEF_CENTER_FREQUENCY_THIRDS[ i ], 2.0f ) / relaxationFrequencyNitrogen ) ) ) ) ) ) )
)* ( 20.0f / log( 10.0f ) ) / ( ( log10( exp( 1.0f ) ) ) * 10.0f ); // Neper/m -> dB/m
pfAirAbsCoeffs[ i ] = x*4.33f*dDistance;
//VA_DEBUG_PRINTF("Frequency [%4.2f Hz]: %f * 10^-3[dB/m], m = %f * 10^-3\n",DEF_CENTER_FREQUENCY_THIRDS[i], pfAirAbsCoeffs[i]*1000.0f*4.33f,pfAirAbsCoeffs[i]*1000.0f); // 4.33 -> in dB
}
}
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A Virtual Acoustics (VA) | http://www.virtualacoustics.org
* VVV VVV AAA Licensed under the Apache License, Version 2.0
* VVV VVV AAA
* VVV VVV AAA Copyright 2015-2018
* VVVVVV AAA Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University
*
* --------------------------------------------------------------------------------------------
*/
#ifndef IW_VACORE_ATMOSPHERE
#define IW_VACORE_ATMOSPHERE
#include <ITAThirdOctaveMagnitudeSpectrum.h>
//! Luftschall-Dmpfungsfaktoren in Terzen berechnen (nach ISO 9613-1:1993)
// (ACHTUNG: Andere Bedeutung als in Raven: Dmpfungsfaktoren! 1=>Keine Dmpfung)
void GetAirAbsorptionMagnitudesThirdOctave( float* pfAirAbsCoeffs, // Absorptionskoeffizienten [Faktor/m] (nicht Dezibel!)
double dDistance, // Abstand [m]
double dTemperature, // Temperatur [C]
double dPressure, // Statischer Luftdruck [Pa]
double dHumidity ); // Luftfeuchtigkeit [%]
// In dB/m
void GetAirAbsorptionAttenuationThirdOctaveDecibel( float* pfAirAbsCoeffs, // Absorptionskoeffizienten [Faktor/m] (nicht Dezibel!)
double dDistance, // Abstand [m]
double dTemperature, // Temperatur [C]
double dPressure, // Statischer Luftdruck [Pa]
double dHumidity ); // Luftfeuchtigkeit [%]
//! Berechnung der Luftschall-Absorption in Terzen
/**
* Standard: ISO 9613-1:1993
*
* \note Andere Bedeutung als in Raven: Dmpfungsfaktoren! 1=>Keine Dmpfung)
*
* \param oAirAbsMags Terzband-Resultat (Call-By-Reference)
* \param fDistance Abstand [m]
* \param fTemperature Temperatur [C]
* \param fStaticPressure Statischer Luftdruck [Pa]
* \param fHumidity Luftfeuchtigkeit [%]
*/
void CalculateAirAbsorptionAttenuation( ITABase::CThirdOctaveFactorMagnitudeSpectrum& oAirAbsMags, double dDistance, double dTemperature, double dStaticPressure, double dHumidity );
//! Berechnung der Luftschall-Dmpfung in Terzen als Faktoren (von Jonas implementiert)
/**
* Standard: ISO 9613-1:1993
*
* \note Wertebereich der gains: [0..1]
*
* \param oAirAbsMags Terzband-Resultat (Call-By-Reference)
* \param fDistance Abstand [m]
* \param fTemperature Temperatur [C]
* \param fStaticPressure Statischer Luftdruck [Pa]
* \param fHumidity Luftfeuchtigkeit [%]
*/
void GetAirAbsorptionMagnitudes( ITABase::CThirdOctaveFactorMagnitudeSpectrum& oMags, double dDistance, double dTemperature, double dStaticPressure, double dHumidity );
#endif // IW_VACORE_ATMOSPHERE
......@@ -4,8 +4,6 @@ set( RelativeDir "src/Filtering" )
set( RelativeSourceGroup "src\\Filtering" )
set( DirFiles
VAAtmosphere.cpp
VAAtmosphere.h
VATemporalVariations.h
_SourceFiles.cmake
)
......
......@@ -43,7 +43,7 @@
#include <ITAThirdOctaveFilterbank.h>
#include <ITAClock.h>
#include <ITACriticalSection.h>
//#include <ITAConfigUtils.h>
#include <ITAISO9613.h>
#include <ITADataSourceRealization.h>
#include <ITASampleBuffer.h>
#include <ITAStopWatch.h>
......@@ -1413,8 +1413,8 @@ void CVABATNSoundPath::UpdateTemporalVariation()
void CVABATNSoundPath::UpdateAirAttenuation( const double dTemperatur, const double dPressure, const double dHumidity )
{
CalculateAirAbsorptionAttenuation( oDirSoundPath.oAirAttenuationMagnitudes, oDirSoundPath.oRelations.dDistance, dTemperatur, dPressure, dHumidity );
CalculateAirAbsorptionAttenuation( oRefSoundPath.oAirAttenuationMagnitudes, oRefSoundPath.oRelations.dDistance, dTemperatur, dPressure, dHumidity );
ITABase::ISO9613::AtmosphericAbsorption( oDirSoundPath.oAirAttenuationMagnitudes, oDirSoundPath.oRelations.dDistance, dTemperatur, dPressure, dHumidity );
ITABase::ISO9613::AtmosphericAbsorption( oRefSoundPath.oAirAttenuationMagnitudes, oRefSoundPath.oRelations.dDistance, dTemperatur, dPressure, dHumidity );
}
void CVABATNSoundPath::CalculateInverseDistanceDecrease()
......
......@@ -53,6 +53,7 @@
#include <ITASampleFrame.h>
#include <ITASimpleConvolution.h>
#include <ITAStreamInfo.h>
#include <ITAISO9613.h>
#include <iostream>
#include <complex>
......@@ -1044,7 +1045,7 @@ void ComplexSoundPath::UpdateAirAbsorption()
float fStaticPressure = m_pRenderer->m_oRavenConfig.oRoom.fStaticPressure;
float fHumidity = m_pRenderer->m_oRavenConfig.oRoom.fHumidity;
m_csTOMagsAirAbs.enter();
CalculateAirAbsorptionAttenuation( oAirAbsMags, fDistance, fTemperature, fStaticPressure, fHumidity );
ITABase::ISO9613::AtmosphericAbsorption( oAirAbsMags, fDistance, fTemperature, fStaticPressure, fHumidity );
m_csTOMagsAirAbs.leave();
}
......
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