|
From: Tapio V. <aa...@us...> - 2010-01-10 20:56:21
|
Module: performous
Branch: master
Commit: 4ba4c37bf9f453b2135ee202028045de0d770479
Author: Tapio Vierros <tap...@gm...>
Date: Sun Jan 10 22:55:13 2010 +0200
Only seek previews when not in jukebox mode.
---
game/screen_songs.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 2f4996c..380bb8f 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -151,13 +151,13 @@ void ScreenSongs::stopMultimedia(ScreenSharedInfo& info) {
if (info.music != m_playing && m_playTimer.get() > 0.3) {
m_songbg.reset(); m_video.reset();
double pstart = 0;
- if (!m_songs.empty()) {
+ if (!m_songs.empty() && !m_jukebox) {
pstart = m_songs.current().preview_start;
if (pstart != pstart) pstart = 100; // true if NaN, 100 is caught in the next min
// 5.0s is for performance (don't make it higher unless you implement better seeking method in songs)
pstart = std::min(pstart, (info.music.size() == 1 ? 30.0 : 5.0)); // we can seek further in 1-track songs
}
- if (info.music.empty()) m_audio.fadeout(1.0); else m_audio.playMusic(info.music, true, 2.0, (pstart ? pstart : 5.0));
+ if (info.music.empty()) m_audio.fadeout(1.0); else m_audio.playMusic(info.music, true, 2.0, pstart);
if (!info.songbg.empty()) try { m_songbg.reset(new Surface(info.songbg)); } catch (std::exception const&) {}
if (!info.video.empty() && config["graphic/video"].b()) m_video.reset(new Video(info.video, info.videoGap));
m_playing = info.music;
|