diff --git a/include/aoapplication.h b/include/aoapplication.h index fa1757b..18f6ef2 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -100,9 +100,9 @@ public: //////////////////versioning/////////////// - const int get_release() const { return RELEASE; } - const int get_major_version() const { return MAJOR_VERSION; } - const int get_minor_version() const { return MINOR_VERSION; } + int get_release() const { return RELEASE; } + int get_major_version() const { return MAJOR_VERSION; } + int get_minor_version() const { return MINOR_VERSION; } QString get_version_string(); /////////////////////////////////////////// diff --git a/src/aoblipplayer.cpp b/src/aoblipplayer.cpp index 39158fd..b67f9c3 100644 --- a/src/aoblipplayer.cpp +++ b/src/aoblipplayer.cpp @@ -22,7 +22,7 @@ void AOBlipPlayer::set_blips(QString p_sfx) FALSE, f_path.utf16(), 0, 0, BASS_UNICODE | BASS_ASYNCFILE); } - set_volume(m_volume); + set_volume_internal(m_volume); } void AOBlipPlayer::blip_tick() @@ -44,7 +44,9 @@ void AOBlipPlayer::blip_tick() void AOBlipPlayer::set_volume(int p_value) { - m_volume = p_value; + m_volume = static_cast(p_value) / 100; + set_volume_internal(m_volume); +} void AOBlipPlayer::set_volume_internal(qreal p_value) { diff --git a/src/aosfxplayer.cpp b/src/aosfxplayer.cpp index 6db6f37..607d605 100644 --- a/src/aosfxplayer.cpp +++ b/src/aosfxplayer.cpp @@ -86,7 +86,7 @@ void AOSfxPlayer::set_volume(qreal p_value) set_volume_internal(m_volume); } -void AOSfxPlayer::set_volume(int p_value) +void AOSfxPlayer::set_volume_internal(qreal p_value) { float volume = static_cast(p_value); for (int n_stream = 0; n_stream < m_channelmax; ++n_stream) {