Version: (using KDE KDE 3.5.0) Installed from: Gentoo Packages OS: Linux How to reproduce: * Start Juk * Reduce the volume * Play a song When the song is started, Juk will change the volume to maximum and play. Very dangerous for your speakers... :)
This seems to only be true with the aKode backend.
SVN commit 488424 by wheeler: Initialize the aKode volume after instantiating the playback engine. BUG:118265 M +7 -6 akodeplayer.cpp M +1 -0 akodeplayer.h --- branches/KDE/3.5/kdemultimedia/juk/akodeplayer.cpp #488423:488424 @@ -32,7 +32,8 @@ //////////////////////////////////////////////////////////////////////////////// aKodePlayer::aKodePlayer() : Player(), - m_player(0) + m_player(0), + m_volume(1.0) {} aKodePlayer::~aKodePlayer() @@ -61,6 +62,7 @@ else { m_player = new aKode::Player(); m_player->open("auto"); + m_player->setVolume(m_volume); } if (m_player->load(filename.local8Bit().data())) @@ -84,16 +86,15 @@ void aKodePlayer::setVolume(float volume) { + m_volume = volume; + if (m_player) - m_player->setVolume(volume); + m_player->setVolume(m_volume); } float aKodePlayer::volume() const { - if (m_player) - return m_player->volume(); - // 1.0 is full volume - return 1.0; + return m_volume; } ///////////////////////////////////////////////////////////////////////////////// --- branches/KDE/3.5/kdemultimedia/juk/akodeplayer.h #488423:488424 @@ -59,6 +59,7 @@ private: aKode::Player *m_player; + float m_volume; }; #endif