Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/cdplay use play_track() instead of play_blocks() whe...



details:   https://anonhg.NetBSD.org/src/rev/f2a17f2bfaa9
branches:  trunk
changeset: 487955:f2a17f2bfaa9
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jun 15 21:07:37 2000 +0000

description:
use play_track() instead of play_blocks() when play whole disk
(because the xfer length field of the PLAY command (0x45) is 2 bytes.
It's too short to play whole disk)

diffstat:

 usr.bin/cdplay/cdplay.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (32 lines):

diff -r 039df8638cd6 -r f2a17f2bfaa9 usr.bin/cdplay/cdplay.c
--- a/usr.bin/cdplay/cdplay.c   Thu Jun 15 20:05:51 2000 +0000
+++ b/usr.bin/cdplay/cdplay.c   Thu Jun 15 21:07:37 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdplay.c,v 1.7 2000/06/14 13:51:45 ad Exp $    */
+/*     $NetBSD: cdplay.c,v 1.8 2000/06/15 21:07:37 msaitoh Exp $       */
 
 /*
  * Copyright (c) 1999 Andrew Doran.
@@ -56,7 +56,7 @@
  
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: cdplay.c,v 1.7 2000/06/14 13:51:45 ad Exp $");
+__RCSID("$NetBSD: cdplay.c,v 1.8 2000/06/15 21:07:37 msaitoh Exp $");
 #endif /* not lint */
 
 #include <sys/endian.h>
@@ -428,12 +428,7 @@
 
        if (!arg || !*arg) {
                /* Play the whole disc */
-               if (!msf)
-                       return (play_blocks(0, be32toh(toc_buffer[n].addr.lba)));
-               
-               return (play_blocks(0, msf2lba(toc_buffer[n].addr.msf.minute,
-                   toc_buffer[n].addr.msf.second, 
-                   toc_buffer[n].addr.msf.frame)));
+               return (play_track(h.starting_track, 1, h.ending_track, 1));
        }
        
        if (strchr(arg, '#')) {



Home | Main Index | Thread Index | Old Index