diff audacious/playback.c @ 2092:79b077f6234b trunk

[svn] - update to new API
author nenolod
date Mon, 11 Dec 2006 04:53:05 -0800
parents 25308f10b50f
children f18a5b617c34
line wrap: on
line diff
--- a/audacious/playback.c	Mon Dec 11 04:48:05 2006 -0800
+++ b/audacious/playback.c	Mon Dec 11 04:53:05 2006 -0800
@@ -82,8 +82,9 @@
 bmp_playback_initiate(void)
 {
     PlaylistEntry *entry = NULL;
+    Playlist *playlist = playlist_get_active();
 
-    if (playlist_get_length() == 0)
+    if (playlist_get_length(playlist) == 0)
         return;
 
     if (bmp_playback_get_playing())
@@ -93,9 +94,9 @@
     svis_clear_data(mainwin_svis);
     mainwin_disable_seekbar();
 
-    entry = playlist_get_entry_to_play();
+    entry = playlist_get_entry_to_play(playlist);
 
-    if (!entry)
+    if (entry == NULL)
         return;
 
     /*
@@ -106,9 +107,9 @@
      */
     while (entry != NULL && !bmp_playback_play_file(entry))
     {
-        playlist_next();
+        playlist_next(playlist);
 
-        entry = playlist_get_entry_to_play();
+        entry = playlist_get_entry_to_play(playlist);
 
         if (entry == NULL)
             return;
@@ -122,7 +123,7 @@
                       cfg.equalizer_bands);
     }
 
-    playlist_check_pos_current();
+    playlist_check_pos_current(playlist);
     mainwin_set_info_text();
 }
 
@@ -308,6 +309,6 @@
 bmp_playback_seek_relative(gint offset)
 {
     gint time = CLAMP(bmp_playback_get_time() / 1000 + offset,
-                      0, playlist_get_current_length() / 1000 - 1);
+                      0, playlist_get_current_length(playlist_get_active()) / 1000 - 1);
     bmp_playback_seek(time);
 }