aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/aoapplication.h6
-rw-r--r--src/aoblipplayer.cpp6
-rw-r--r--src/aosfxplayer.cpp2
3 files changed, 8 insertions, 6 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index fa1757b9..18f6ef24 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 39158fd2..b67f9c36 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<qreal>(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 6db6f375..607d605a 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<float>(p_value);
for (int n_stream = 0; n_stream < m_channelmax; ++n_stream) {