[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/engine/xine
From:       Maximilian Kossick <maximilian.kossick () googlemail ! com>
Date:       2007-01-07 17:52:46
Message-ID: 1168192366.774584.2738.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 620899 by mkossick:

stops amarok from cutting of the last second or so of a track when sing the xine engine
TODO: make sure it behaves correctly when tracks are added/removed after the current track
CCBUG: 135190

 M  +17 -1     xine-engine.cpp  


--- trunk/extragear/multimedia/amarok/src/engine/xine/xine-engine.cpp #620898:620899
@@ -191,7 +191,7 @@
     if ( xine_check_version(1,1,1) && !(m_xfadeLength > 0) ) {
         // enable gapless playback
         debug() << "gapless playback enabled." << endl;
-        xine_set_param(m_stream, XINE_PARAM_EARLY_FINISHED_EVENT, 1 );
+        //xine_set_param(m_stream, XINE_PARAM_EARLY_FINISHED_EVENT, 1 );
     }
 #endif
    return true;
@@ -259,6 +259,22 @@
       xine_post_wire( source, target );
       #endif
 
+      #ifdef XINE_PARAM_EARLY_FINISHED_EVENT
+      #ifdef XINE_PARAM_GAPLESS_SWITCH
+      if ( xine_check_version(1,1,1) && !(m_xfadeLength > 0) && Playlist::instance()->isTrackAfter() )
+      {
+        xine_set_param(m_stream, XINE_PARAM_EARLY_FINISHED_EVENT, 1 );
+        debug() << "XINE_PARAM_EARLY_FINISHED_EVENT enabled" << endl;
+      }
+      else
+      {
+        //we don't want an early finish event if there is a track after the current one
+        xine_set_param(m_stream, XINE_PARAM_EARLY_FINISHED_EVENT, 0 );
+        debug() << "XINE_PARAM_EARLY_FINISHED_EVENT disabled" << endl;
+      }
+      #endif
+      #endif
+
       return true;
    }
    else
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic