diff --git a/src/al-util.h b/src/al-util.h index 08c126e..78ae615 100644 --- a/src/al-util.h +++ b/src/al-util.h @@ -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 diff --git a/src/audiostream.cpp b/src/audiostream.cpp index 16cade7..75f7acd 100644 --- a/src/audiostream.cpp +++ b/src/audiostream.cpp @@ -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]; diff --git a/src/soundemitter.cpp b/src/soundemitter.cpp index 965556c..57c81fc 100644 --- a/src/soundemitter.cpp +++ b/src/soundemitter.cpp @@ -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);