Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

void Audio::Mixer::setVolumeForSoundType ( SoundType  type,
int  volume 

Set the volume for the given sound type.

type the sound type
volume the new global volume, 0-kMaxMixerVolume

Definition at line 351 of file mixer.cpp.

      assert(0 <= type && type < ARRAYSIZE(_volumeForSoundType));

      // Check range
      if (volume > kMaxMixerVolume)
            volume = kMaxMixerVolume;
      else if (volume < 0)
            volume = 0;

      // TODO: Maybe we should do logarithmic (not linear) volume
      // scaling? See also Player_V2::setMasterVolume

      _volumeForSoundType[type] = volume;

Generated by  Doxygen 1.6.0   Back to index