From e6af398b37b8fc34fad11cf41800cccf053a8056 Mon Sep 17 00:00:00 2001 From: msaitoh Date: Thu, 15 Jun 2000 21:07:37 +0000 Subject: [PATCH] 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) --- usr.bin/cdplay/cdplay.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/usr.bin/cdplay/cdplay.c b/usr.bin/cdplay/cdplay.c index 80217fac4f15..b5a5cfc6395d 100644 --- a/usr.bin/cdplay/cdplay.c +++ b/usr.bin/cdplay/cdplay.c @@ -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 #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 @@ -428,12 +428,7 @@ play(arg) 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, '#')) {