1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 00:24:12 +02:00

Unmute AudioOutput on start up

This commit is contained in:
Dominik Schmidt
2016-02-22 03:03:47 +01:00
parent af8811af30
commit 68851843f5

View File

@@ -134,8 +134,6 @@ AudioOutput::AudioOutput( QObject* parent )
libvlc_event_attach( manager, events[ i ], &AudioOutput::vlcEventCallback, this ); libvlc_event_attach( manager, events[ i ], &AudioOutput::vlcEventCallback, this );
} }
m_muted = isMuted();
// HACK: play silent ogg file and set volume on that to workaround vlc not allowing to set volume before a file is played // HACK: play silent ogg file and set volume on that to workaround vlc not allowing to set volume before a file is played
m_silenceFile.setFileName( RESPATH "sounds/silence.ogg" ); m_silenceFile.setFileName( RESPATH "sounds/silence.ogg" );
Q_ASSERT( m_silenceFile.exists() ); Q_ASSERT( m_silenceFile.exists() );
@@ -186,6 +184,7 @@ AudioOutput::onInitVlcEvent( const libvlc_event_t* event )
{ {
case libvlc_MediaPlayerTimeChanged: case libvlc_MediaPlayerTimeChanged:
setVolume( volume() ); setVolume( volume() );
setMuted( isMuted() );
m_initialized = true; m_initialized = true;
m_silenceFile.close(); m_silenceFile.close();
@@ -509,7 +508,7 @@ AudioOutput::isSeekable() const
bool bool
AudioOutput::isMuted() const AudioOutput::isMuted() const
{ {
return libvlc_audio_get_mute( m_vlcPlayer ); return m_muted;
} }