mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 09:04:33 +02:00
* Fix AudioEngine killing Phonon's QIODevice.
This commit is contained in:
@@ -113,12 +113,6 @@ AudioEngine::stop()
|
|||||||
m_expectStop = true;
|
m_expectStop = true;
|
||||||
m_mediaObject->stop();
|
m_mediaObject->stop();
|
||||||
|
|
||||||
if ( !m_input.isNull() )
|
|
||||||
{
|
|
||||||
m_input->close();
|
|
||||||
m_input.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrentTrack( Tomahawk::result_ptr() );
|
setCurrentTrack( Tomahawk::result_ptr() );
|
||||||
emit stopped();
|
emit stopped();
|
||||||
}
|
}
|
||||||
@@ -198,8 +192,6 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
m_expectStop = true;
|
m_expectStop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_input = io;
|
|
||||||
|
|
||||||
if ( !m_currentTrack->url().startsWith( "http://" ) )
|
if ( !m_currentTrack->url().startsWith( "http://" ) )
|
||||||
{
|
{
|
||||||
m_mediaObject->setCurrentSource( io.data() );
|
m_mediaObject->setCurrentSource( io.data() );
|
||||||
@@ -215,6 +207,9 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
}
|
}
|
||||||
m_mediaObject->setCurrentSource( furl );
|
m_mediaObject->setCurrentSource( furl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_input = io;
|
||||||
|
|
||||||
m_mediaObject->currentSource().setAutoDelete( true );
|
m_mediaObject->currentSource().setAutoDelete( true );
|
||||||
m_mediaObject->play();
|
m_mediaObject->play();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user