From c0b8b2943e35be5edfd0425650f8107473fb2a6a Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Mon, 1 Aug 2005 22:31:41 +0000 Subject: [PATCH] Clicking on a track in the track menu now just selects the track Fixed times in CDDB files git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13869 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/cdplayer/CDDBSupport.cpp | 5 +++-- src/apps/cdplayer/CDEngine.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/cdplayer/CDDBSupport.cpp b/src/apps/cdplayer/CDDBSupport.cpp index 75e8908d50..eff26bcf20 100644 --- a/src/apps/cdplayer/CDDBSupport.cpp +++ b/src/apps/cdplayer/CDDBSupport.cpp @@ -316,7 +316,7 @@ CDDBQuery::GetTrackTimes(const scsi_toc *toc, vector ×) TrackRecord *tocData = (TrackRecord*)&(toc->toc_data[4]); int16 trackCount = toc->toc_data[3] - toc->toc_data[2] + 1; - for (int index = 0; index < trackCount; index++) + for (int index = 0; index < trackCount+1; index++) { cdaudio_time cdtime; cdtime.minutes = tocData[index].min; @@ -613,7 +613,8 @@ CDDBQuery::WriteFile(void) { entry = fTrackNames[i]; - sprintf(timestring,"%.2ld:%.2ld",fTrackTimes[i].minutes, fTrackTimes[i].seconds); + sprintf(timestring,"%.2ld:%.2ld",fTrackTimes[i+1].minutes-fTrackTimes[i].minutes, + fTrackTimes[i].seconds); entry << "\t" << timestring << "\n"; file.Write(entry.String(),entry.Length()); diff --git a/src/apps/cdplayer/CDEngine.cpp b/src/apps/cdplayer/CDEngine.cpp index b678358a6a..28926354c1 100644 --- a/src/apps/cdplayer/CDEngine.cpp +++ b/src/apps/cdplayer/CDEngine.cpp @@ -458,7 +458,7 @@ void CDEngine::SelectTrack(int32 trackNumber) { sPlayList.SetCurrentTrack(trackNumber); - if(playState.GetState() == kPlaying) + if(GetState() == kPlaying) gCDDevice.Play(trackNumber); trackState.UpdateNow(); }