diff options
Diffstat (limited to 'aosfxplayer.cpp')
| -rw-r--r-- | aosfxplayer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/aosfxplayer.cpp b/aosfxplayer.cpp index 4a772e0..cc2f383 100644 --- a/aosfxplayer.cpp +++ b/aosfxplayer.cpp @@ -7,6 +7,12 @@ AOSfxPlayer::AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app) ao_app = p_ao_app; } +AOSfxPlayer::~AOSfxPlayer() +{ + m_sfxplayer->stop(); + m_sfxplayer->deleteLater(); +} + void AOSfxPlayer::play(QString p_sfx, QString p_char) { m_sfxplayer->stop(); @@ -31,6 +37,5 @@ void AOSfxPlayer::stop() void AOSfxPlayer::set_volume(int p_value) { m_volume = p_value; - float volume = p_value / 100.0f; - m_sfxplayer->setVolume(qreal(volume)); + m_sfxplayer->setVolume(p_value / 100.0); } |
