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

Implementing volume control with sound power

parent bdb521e4
......@@ -41,3 +41,17 @@ It is recommended to clone and follow the build guide of the parent project [VA]
Please do NOT deploy and publish a VA core version with TTS (text-to-speech) activated, as it would also include the CereVoice SDK. This is not in compliance with the license agreement (requires account with academic e-mail address). For your research project, use it strictly interenally.
*The developers of VA will not be hold responsible for license violations.*
### Additional safety warning
High sound pressure levels can do severe harm to the human auditory system. Please double check if the system you are using is absolutely safe, because VA will not take any responsibility in case of an accident, as stated in the license agreement. This is only a precaution list as a suggestion for typical situations, but may not be applicable in others.
To counteract an hazardous environment, make yourself familiar with all components included. We suggest that you double check the following conditions:
1. Know the maximum sound power that your emitters (loudspeakers, headphones, amplifiers) are capable of.
2. Know the minimum distance to the ear canal entries of your subject or user. Estimate the maximum possible sound pressure and assure that the range is not harmful to humans.
3. Never trust the audio device input stream (coming from VA or any other software). If an uninitialized buffer is physically played back, it is likely that signals at maximum capacity are emitted.
4. Start at low volumes for initial tests. Be suspicious if a gain or volume control is operating at maximum or over the usual working range (i.e. over 0dB or over a factor of 1.0).
5. Put a personal emergency plan into action: which gain control or muted button will you use in case of an emergency? Also, consider to install an emergency off switch.
6. Use limiters and configure them appropriately.
......@@ -110,13 +110,10 @@ double CVASoundSourceState::GetVolume() const
return data.dVolume;
void CVASoundSourceState::SetVolume( double dVolume )
void CVASoundSourceState::SetSoundPower( double dSoundPower )
assert( !IsFixed() );
// if( VASafety::IsComponentLimiterEnabled() )
// VASafety::GetLimiterMaximumGain
data.dVolume = std::min( db20_to_ratio( 20 ), dVolume );
data.dVolume = dSoundPower / g_dSoundPower_94dB_SPL_1m;
int CVASoundSourceState::GetDirectivityID() const {
......@@ -43,7 +43,7 @@ public:
int GetAuralizationMode() const;
// Setter
void SetVolume( double dVolume );
void SetSoundPower( const double dPowerInWatts );
void SetDirectivityID( int iDirectivityID );
void SetDirectivityData( const IVADirectivity* pDirData );
void SetAuralizationMode( int iAuralizationMode );
......@@ -68,7 +68,7 @@ private:
CVAMotionState* pMotionState; //!@ Motion state pointer
double dVolume; //!@ Linear gain factor (not decibel)
double dVolume; //!@ Linear gain factor, factor of 1 is relative to 94 dB SPL @ 1m
int iAuraMode; //!@ Current auralization mode
// Richtcharakteristik [ID]
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