added some static casts

This commit is contained in:
Volker Fischer 2009-08-17 17:44:58 +00:00
parent 9ac8be8af1
commit 256cd88a6a

View file

@ -390,14 +390,15 @@ void CClient::ProcessAudioData ( CVector<int16_t>& vecsStereoSndCrd )
// convert data from short to double // convert data from short to double
for ( i = 0; i < iStereoBlockSizeSam; i++ ) for ( i = 0; i < iStereoBlockSizeSam; i++ )
{ {
vecdAudioStereo[i] = (double) vecsStereoSndCrd[i]; vecdAudioStereo[i] = static_cast<double> ( vecsStereoSndCrd[i] );
} }
// add reverberation effect if activated // add reverberation effect if activated
if ( iReverbLevel != 0 ) if ( iReverbLevel != 0 )
{ {
// calculate attenuation amplification factor // calculate attenuation amplification factor
const double dRevLev = (double) iReverbLevel / AUD_REVERB_MAX / 2; const double dRevLev =
static_cast<double> ( iReverbLevel ) / AUD_REVERB_MAX / 2;
if ( bReverbOnLeftChan ) if ( bReverbOnLeftChan )
{ {
@ -434,7 +435,7 @@ void CClient::ProcessAudioData ( CVector<int16_t>& vecsStereoSndCrd )
else else
{ {
const double dAttFact = const double dAttFact =
(double) ( AUD_FADER_IN_MIDDLE - abs ( AUD_FADER_IN_MIDDLE - iAudioInFader ) ) / static_cast<double> ( AUD_FADER_IN_MIDDLE - abs ( AUD_FADER_IN_MIDDLE - iAudioInFader ) ) /
AUD_FADER_IN_MIDDLE; AUD_FADER_IN_MIDDLE;
if ( iAudioInFader > AUD_FADER_IN_MIDDLE ) if ( iAudioInFader > AUD_FADER_IN_MIDDLE )