Fix for skipping over tracks when playing through a disc in sequential mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14247 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -507,6 +507,7 @@ void CDPlayer::WatchCDState(void)
|
|||||||
|
|
||||||
// Second, establish whether or not we have a CD in the drive
|
// Second, establish whether or not we have a CD in the drive
|
||||||
CDState playstate = fCDDrive.GetState();
|
CDState playstate = fCDDrive.GetState();
|
||||||
|
bool internal_track_change=false;
|
||||||
|
|
||||||
if(playstate == kNoCD)
|
if(playstate == kNoCD)
|
||||||
{
|
{
|
||||||
@@ -549,6 +550,8 @@ void CDPlayer::WatchCDState(void)
|
|||||||
{
|
{
|
||||||
if(fWindowState == kPlaying)
|
if(fWindowState == kPlaying)
|
||||||
{
|
{
|
||||||
|
internal_track_change=true;
|
||||||
|
|
||||||
// This means that the drive finished playing the song, so get the next one
|
// This means that the drive finished playing the song, so get the next one
|
||||||
// from the list and play it
|
// from the list and play it
|
||||||
int16 next = fPlayList.GetNextTrack();
|
int16 next = fPlayList.GetNextTrack();
|
||||||
@@ -623,16 +626,21 @@ void CDPlayer::WatchCDState(void)
|
|||||||
|
|
||||||
if(playstate == kPlaying)
|
if(playstate == kPlaying)
|
||||||
{
|
{
|
||||||
// The main thing is that we need to make sure that the playlist and the drive's track
|
|
||||||
// stay in sync. The CD's track may have been changed by an outside source, so if
|
|
||||||
// the drive is playing, check for playlist sync.
|
|
||||||
if(playlisttrack != drivetrack)
|
if(playlisttrack != drivetrack)
|
||||||
{
|
{
|
||||||
playlisttrack = drivetrack;
|
playlisttrack = drivetrack;
|
||||||
fPlayList.SetTrackCount(drivecount);
|
|
||||||
fPlayList.SetCurrentTrack(drivetrack);
|
if(!internal_track_change)
|
||||||
|
{
|
||||||
|
// The main thing is that we need to make sure that the playlist and the drive's track
|
||||||
|
// stay in sync. The CD's track may have been changed by an outside source, so if
|
||||||
|
// the drive is playing, check for playlist sync.
|
||||||
|
fPlayList.SetTrackCount(drivecount);
|
||||||
|
fPlayList.SetCurrentTrack(drivetrack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
update_track_gui=true;
|
update_track_gui=true;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user