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

List:       kde-commits
Subject:    extragear/multimedia/amarok/src
From:       Alejandro Daniel Wainzinger <aikawarazuni () gmail ! com>
Date:       2008-08-22 17:21:46
Message-ID: 1219425706.811106.9782.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 850961 by awainzinger:

Add function that is called just before a track is called, to prepare for playing.


 M  +1 -0      EngineController.cpp  
 M  +5 -0      meta/Meta.cpp  
 M  +4 -0      meta/Meta.h  


--- trunk/extragear/multimedia/amarok/src/EngineController.cpp #850960:850961
@@ -277,6 +277,7 @@
     }
     else
     {
+        m_currentTrack->prepareToPlay();
         playUrl( m_currentTrack->playableUrl(), offset );
     }
 }
--- trunk/extragear/multimedia/amarok/src/meta/Meta.cpp #850960:850961
@@ -274,6 +274,11 @@
 }
 
 void
+Meta::Track::prepareToPlay()
+{
+}
+
+void
 Meta::Track::finishedPlaying( double /*playedFraction*/ )
 {
 }
--- trunk/extragear/multimedia/amarok/src/meta/Meta.h #850960:850961
@@ -225,6 +225,10 @@
 
             /** Returns the type of this track, e.g. "ogg", "mp3", "Stream" */
             virtual QString type() const = 0;
+            
+            /** tell the track to perform any prerequisite
+             * operations before playing */
+            virtual void prepareToPlay();
 
             /** tell the track object that amarok finished playing it.
                 The argument is the percentage of the track which was played, in the range 0 to 1*/
[prev in list] [next in list] [prev in thread] [next in thread] 

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