From nobody@FreeBSD.ORG Wed Jun  2 21:11:31 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 9928E14DD9; Wed,  2 Jun 1999 21:11:31 -0700 (PDT)
Message-Id: <19990603041131.9928E14DD9@hub.freebsd.org>
Date: Wed,  2 Jun 1999 21:11:31 -0700 (PDT)
From: tempest@ecst.csuchico.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: wmcdplay 1.0Beta1 05/09/1998 sometimes skips to next track in 1-track repeat
X-Send-Pr-Version: www-1.0

>Number:         12001
>Category:       ports
>Synopsis:       wmcdplay 1.0Beta1 05/09/1998 sometimes skips to next track in 1-track repeat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun  2 21:20:00 PDT 1999
>Closed-Date:    Thu Dec 23 15:45:15 PST 1999
>Last-Modified:  Thu Dec 23 15:47:05 PST 1999
>Originator:     Ken Lui
>Release:        3.2 release
>Organization:
N/A
>Environment:
FreeBSD black.tmpest1.org 3.2-RELEASE FreeBSD 3.2-RELEASE #11: Tue Jun  1 21:04:12 PDT 1999
root@black.tmpest1.org:/usr/src/sys/compile/BLACK  i386
>Description:
With 1-track repeat enabled, sometimes the next track will begin playing
after the current one ends rather than repeating the current one.
>How-To-Repeat:
Launch wmcdplay, load audio CD, click on --> so it looks like
  ,--->|
  "-
Select desired track (preferrably a short one), and play. After a few
plays, the current track will eventually end and the next track begins
playing, and it will repeat until the next track is selected and so on.
>Fix:
The problem is in cdctl.h:trackinfo(). Here's the diff. Convention may
be different than how others use diff to create the patch, but the
new one is designated "---". This difference is based on the port and
not the original wmcdplay. Have emailed the original author,
shawkie@geocities.com, although his web site is unavailable as of
06/02/1999. Will also send email to patch author clkao@cirx.org

*** wmcdplay/cdctl.h.orig    Wed Jun  2 20:46:18 1999
--- wmcdplay/cdctl.h        Wed Jun  2 20:20:29 1999
***************
*** 348,358 ****
  #endif
     }  
     void trackinfo(struct cd_sub_channel_info *subchnl){
        if(status_state==ssPlaying || status_state==ssPaused){
           status_pos=((subchnl->what.position.absaddr.msf.minute) * 60 + subchnl->what.position.absaddr.msf.second) * 75 + subchnl->what.position.absaddr.msf.frame - CD_MSF_OFFSET;
           for(status_track=0;status_track<cd_tracks;status_track++){
!             if(status_pos<cd_trklist[status_track].track_start+cd_trklist[status_track].track_len)
                 break;
           }
        }   
     }   
--- 348,364 ----
  #endif
     }  
     void trackinfo(struct cd_sub_channel_info *subchnl){
+       int currenttrack = status_track;
+
        if(status_state==ssPlaying || status_state==ssPaused){
           status_pos=((subchnl->what.position.absaddr.msf.minute) * 60 + subchnl->what.position.absaddr.msf.second) * 75 + subchnl->what.position.absaddr.msf.frame - CD_MSF_OFFSET;
           for(status_track=0;status_track<cd_tracks;status_track++){
!             if(status_pos<cd_trklist[status_track].track_start+cd_trklist[status_track].track_len) {
!                if (status_track != currenttrack) {
!                   status_track = currenttrack;
!                }
                 break;
+             }
           }   
        }   
     }   


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Thu Dec 23 15:45:15 PST 1999 
State-Changed-Why:  
Committed, thanks! 
>Unformatted:
