Aufgrund von Umarbeiten des s3 Storage wird es in GitLab, in nächster Zeit, mögliche Performance-Einbußen geben. Näheres dazu unter: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/43/show_ticket/6670

Added default distance and default minimum distance in calibration section,...

Added default distance and default minimum distance in calibration section, already recognized by binaural free field renderer. Also a lot of comments
parent a206476d
......@@ -82,11 +82,12 @@ TriggerUpdateMilliseconds = 100
[Audio driver]
# MANDATORY: Audio driver backend (ASIO|Portaudio)
# MANDATORY: Audio driver backend (ASIO|Portaudio|Virtual)
#Driver = Virtual
#Driver = ASIO
Driver = Portaudio
# MANDATORY: Audio device (e.g. ASIO4ALL v2, ASIO Hammerfall DSP, Portaudio 'default', 0,1,2,3,...)
# MANDATORY: Audio device ( e.g. ASIO4ALL v2, ASIO Hammerfall DSP, Portaudio 'default', 0,1,2,3,..., virtual user 'Trigger' )
#Device = ASIO4ALL v2
#Device = ASIO Hammerfall DSP
#Device = ASIO Fireface USB
......@@ -95,14 +96,18 @@ Driver = Portaudio
#Device = M-Audio Fast Track Ultra ASIO
#Device = Yamaha Steinberg USB ASIO
Device = default
#Device = Trigger
# MANDATORY: Sampling rate [Hz]
Samplerate = 44100
# OPTIONAL: Buffersize used for audio streaming [Samples]
# AUTO will determine the buffersize from the audio device automatically
# OPTIONAL: Buffer size / block length used for audio streaming [Samples]
# AUTO will determine the buffer size from the audio device automatically [recommended, set in sound card driver configuration]
# Note: Adjust this to your latency requirements
Buffersize = AUTO
BufferSize = AUTO
# Define number of output channels manually (e.g. for virtual device)
OutputChannels = AUTO
[Calibration]
......@@ -115,6 +120,14 @@ Buffersize = AUTO
# mode, the resulting physical sound pressure at receiver location can be maintained.
DefaultAmplitudeCalibrationMode = 94dB
# Set the minimum allowed distance (m) to a sound source (point source can get infinitely loud).
# This can also be used if sound sources appear too loud near-by, but in the limiting range this
# rendering will not be physically correct.
DefaultMinimumDistance = 0.25
# The default distance is used when spherical spreading is deactivated
DefaultDistance = 2.0
[HomogeneousMedium]
......@@ -217,8 +230,9 @@ Enabled = false
Reproductions = MyTalkthroughHeadphones
NumChannels = 2
IRFilterLengthSamples = 88200
IRFilterDelaySamples = 0
OutputMonitoring = true
RecordOutputEnabled = false
RecordOutputFilePath = $(ProjectName)_Renderer_MyGenericRenderer_Output.wav
[Renderer:MyAirTrafficNoiseRenderer]
Class = BinauralAirTrafficNoise
......
......@@ -157,7 +157,7 @@ public:
void UpdateDir( bool bDIRAuraModeEnabled );
void UpdateMediumPropagation( double dSpeedOfSound, double dAdditionalDelaySeconds = 0.0f );
double CalculateInverseDistanceDecrease() const;
double CalculateInverseDistanceDecrease( const double dMinimumDistance ) const;
void UpdateHRIR( const CVAReceiverState::CVAAnthropometricParameter& );
//! Bestimmt die relativen Gren des Pfades
......@@ -719,9 +719,9 @@ void CVABinauralFreeFieldAudioRenderer::ProcessStream( const ITAStreamInfo* pStr
bool bSSLEnabledListener = ( pListenerState->GetAuralizationMode() & IVAInterface::VA_AURAMODE_SPREADING_LOSS ) > 0;
bool bSSLEnabledGlobal = ( m_iCurGlobalAuralizationMode & IVAInterface::VA_AURAMODE_SPREADING_LOSS ) > 0;
bool bSSLEnabled = ( bSSLEnabledSource && bSSLEnabledListener && bSSLEnabledGlobal );
double dDistanceDecrease = pPath->CalculateInverseDistanceDecrease();
if( !bSSLEnabled )
dDistanceDecrease = 1.0f;
double dDistanceDecrease = pPath->CalculateInverseDistanceDecrease( m_pCore->GetCoreConfig()->dDefaultMinimumDistance );
if( bSSLEnabled == false )
dDistanceDecrease = m_pCore->GetCoreConfig()->dDefaultDistance;
bool bDIREnabledSource = ( pSourceState->GetAuralizationMode() & IVAInterface::VA_AURAMODE_SOURCE_DIRECTIVITY ) > 0;
bool bDIREnabledListener = ( pListenerState->GetAuralizationMode() & IVAInterface::VA_AURAMODE_SOURCE_DIRECTIVITY ) > 0;
......@@ -1250,15 +1250,11 @@ void CVABFFSoundPath::UpdateMediumPropagation( double dSpeedOfSound, double dAdd
pVariableDelayLineChR->SetDelayTime( float( dDelay ) );
}
double CVABFFSoundPath::CalculateInverseDistanceDecrease() const
double CVABFFSoundPath::CalculateInverseDistanceDecrease( const double dMinimumDistance ) const
{
// Gain limiter
const double MINIMUM_DISTANCE = 1 / db20_to_ratio( 10 );
double dDistance = ( std::max )( ( double ) oRelations.dDistance, MINIMUM_DISTANCE );
double dDistance = ( std::max )( ( double ) oRelations.dDistance, dMinimumDistance );
assert( dDistance > 0.0f );
double fInverseDistanceDecrease = 1.0f / dDistance;
return fInverseDistanceDecrease;
}
......
......@@ -134,6 +134,9 @@ void CVACoreConfig::Init( const CVAStruct& oData )
dDefaultAmplitudeCalibration = g_dSoundPower_94dB_SPL_1m;
if( sDefaultAmplitudeCalibrationMode == "124dB" )
dDefaultAmplitudeCalibration = g_dSoundPower_128dB_SPL_1m;
conf.OptNumber( "Calibration/DefaultMinimumDistance", dDefaultMinimumDistance, 0.25f ); // translates +12 dB SPL
conf.OptNumber( "Calibration/DefaultDistance", dDefaultDistance, 2.0f ); // translates to -6 dB SPL
}
const CVAStruct& CVACoreConfig::GetStruct() const
......
......@@ -49,6 +49,8 @@ public:
CVAHomogeneousMedium oInitialHomogeneousMedium; //!< Initial homogeneous medium information
double dDefaultAmplitudeCalibration; //!< Defines the conversion between physical pressure and digital or electrical amplitudes ( usually 1.0 -> 94 dB SPL re 20uPa @ 1m )
double dDefaultDistance; //!< Definse the default distance when spherical spreading is deactivated (auralization mode)
double dDefaultMinimumDistance; //!< Defines the minimum distance that should be kept from a sound source (point source can get infinitely loud)
//! Initialize the configuration with a struct
/**
......
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