Commit e482c660 authored by Matthias Kretz's avatar Matthias Kretz

fix audiooutput to keep volume and connected to the volume slider when crossfading

svn path=/trunk/KDE/kdemultimedia/juk/; revision=718615
parent 7087255e
......@@ -256,6 +256,7 @@ void PlayerManager::play(const FileHandle &file)
m_media = new Phonon::MediaObject(this);
m_output = new Phonon::AudioOutput(Phonon::MusicCategory, this);
m_output->setVolume(out->volume());
Phonon::VolumeFaderEffect *fader2 = new Phonon::VolumeFaderEffect(m_media);
m_audioPath.insertEffect(fader2);
......@@ -276,6 +277,13 @@ void PlayerManager::play(const FileHandle &file)
m_media->play();
QTimer::singleShot(3000, mo, SLOT(deleteLater()));
QTimer::singleShot(3000, out, SLOT(deleteLater()));
if(m_sliderAction->trackPositionSlider()) {
m_sliderAction->trackPositionSlider()->setMediaObject(m_media);
}
if(m_sliderAction->volumeSlider()) {
m_sliderAction->volumeSlider()->setAudioOutput(m_output);
}
}
else
{
......@@ -515,6 +523,9 @@ void PlayerManager::slotStateChanged(Phonon::State newstate)
{
switch(m_media->errorType())
{
case Phonon::NoError:
kDebug() << "received a state change to ErrorState but errorType is NoError!?";
break;
case Phonon::NormalError:
forward();
KMessageBox::information(0, m_media->errorString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment