Audio: Set overall volume of OpenAL output to 0.8
This commit is contained in:
parent
4b08d82ea4
commit
4560589e25
|
@ -238,5 +238,6 @@ inline ALenum chooseALFormat(int sampleSize, int channelCount)
|
|||
|
||||
#define AUDIO_SLEEP 10
|
||||
#define STREAM_BUF_SIZE 32768
|
||||
#define GLOBAL_VOLUME 0.8
|
||||
|
||||
#endif // ALUTIL_H
|
||||
|
|
|
@ -252,7 +252,7 @@ float AudioStream::playingOffset()
|
|||
|
||||
void AudioStream::updateVolume()
|
||||
{
|
||||
float vol = 1.0;
|
||||
float vol = GLOBAL_VOLUME;
|
||||
|
||||
for (size_t i = 0; i < VolumeTypeCount; ++i)
|
||||
vol *= volumes[i];
|
||||
|
|
|
@ -168,7 +168,7 @@ void SoundEmitter::play(const std::string &filename,
|
|||
if (switchBuffer)
|
||||
AL::Source::attachBuffer(src, buffer->alBuffer);
|
||||
|
||||
AL::Source::setVolume(src, _volume);
|
||||
AL::Source::setVolume(src, _volume * GLOBAL_VOLUME);
|
||||
AL::Source::setPitch(src, _pitch);
|
||||
|
||||
AL::Source::play(src);
|
||||
|
|
Loading…
Reference in New Issue