Gnus development mailing list
 help / color / mirror / Atom feed
From: Matt Simmons <simmonmt@acm.org>
Cc: simmonmt@eng.sun.com
Subject: Re: all you MP3 people out there... a fix for lars!
Date: 04 Nov 1998 00:08:24 -800	[thread overview]
Message-ID: <yfqk91bev7r.fsf@acm.org> (raw)
In-Reply-To: wmperry@aventail.com's message of "30 Oct 1998 13:10:26 -0500"

Could you add this diff to cddb.el?  It adds support for galette, a
CDDA ripper for Solaris.

I've been trying to use socks.el, and I keep running into the
`Connection not allowed by ruleset' message.  What does it mean?  Is
it something on my end, or is it something in the proxy?

Matt

--- cddb/cddb.el	Tue Nov  3 23:48:36 1998
+++ cddb.el	Tue Nov  3 23:49:29 1998
@@ -34,6 +34,9 @@
 (defvar cddb-cdda2wav-program "cdda2wav"
   "*Where to find the cdda2wav program.")
 
+(defvar cddb-galette-program "galette"
+  "*where to find the galette program.")
+
 (defvar cddb-cdda2wav-arguments '("-N" "-t" "1" "-d" "1")
   "*Arguments to pass to cdda2wav to get CD track information.")
 
@@ -58,7 +61,8 @@
 
 (defvar cddb-possible-probe-programs
   '((cddb-cdparanoia-program . cddb-cdparanoia-get-info)
-    (cddb-cdda2wav-program . cddb-cdda2wav-get-info))
+    (cddb-cdda2wav-program . cddb-cdda2wav-get-info)
+    (cddb-galette-program . cddb-galette-get-info))
   "*Possible programs to probe for CD characteristics.
 This is used if you have not explicitly set `cddb-cd-query-function'.
 
@@ -118,6 +122,49 @@
 	    tracks
 	    length
 	    track-info))))
+
+(defun cddb-galette-get-info (&optional device)
+  "Extract information about a CD using galette.
+Returns a list (DISKCD TRACKS LENGTH TRACKINFO)
+
+DISCID - the CDDB discid of the cd
+TRACKS - the # of tracks on the cd
+LENGTH - the total running time of the cd (in seconds)
+TRACKINFO - a list of the frame offsets of each track
+"
+
+  (save-excursion
+    (set-buffer (get-buffer-create " *galette*"))
+    (erase-buffer)
+    (let ((exit-status (if device
+			   (call-process cddb-galette-program nil t nil "-d" device "-i")
+			 (call-process cddb-galette-program nil t nil "-i")))
+	  (track-info nil)
+	  (length 0)
+	  (num-tracks 0)
+	  (discid nil))
+      (if (/= exit-status 0)
+	  (error "Could not execute `%s'" cddb-galette-program))
+      (goto-char (point-min))
+      
+      ;; Get the frame offsets
+      (while (re-search-forward "^CDROM: |\\s *[0-9]+ | AUDIO |\\s *\\([0-9]+\\) |" nil t)
+	(push (string-to-int (match-string 1)) track-info)
+	(setq num-tracks (1+ num-tracks)))
+      (setq track-info (reverse track-info))
+      
+      ;; Get the disk length.  Easier to divide frames by 75 than to parse
+      ;; mm:ss, so grab the frames
+      (re-search-forward "^CDROM: | TOTAL |\\s +|\\s *\\([0-9]+\\) |" nil t)
+      (setq length (/ (string-to-int (match-string 1)) 75))
+
+      (message (match-string 1))
+      
+      ;; Get the disk ID
+      (re-search-forward "^CDROM: disk id = \\([a-f0-9]+\\)" nil t)
+      (setq discid (match-string 1))
+
+      (list discid num-tracks length track-info))))
 
 (defun cddb-cdda2wav-get-info (&optional device)
   "Extractinformation about a cd using cdda2wav.


-- 
     Matt Simmons  -  simmonmt@acm.org  -  http://www.netcom.com/~simmonmt
      Always take time to stop and smell the roses... and sooner or later,
			      you'll inhale a bee.


  reply	other threads:[~1998-11-04  8:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-28 18:16 William M. Perry
1998-10-28 22:24 ` Wes Hardaker
1998-10-29  1:04   ` William M. Perry
1998-10-29  1:28     ` Wes Hardaker
1998-10-29  2:11       ` Harald Meland
1998-10-29  5:05         ` Wes Hardaker
1998-10-29  5:20         ` David Hedbor
1998-10-29  7:21         ` Lars Magne Ingebrigtsen
1998-10-29 18:00           ` Wes Hardaker
1998-10-31 13:32             ` Lars Magne Ingebrigtsen
1998-11-02 18:59               ` Wes Hardaker
1998-11-04  5:51               ` Matt Simmons
1998-11-10 16:22                 ` Justin Sheehy
     [not found]                   ` <x7g1br8nh3.fsf@peorth.gweep.net>
1998-11-10 21:35                     ` David Hedbor
1998-11-12 21:34                       ` Brian Edmonds
1998-10-29  2:17   ` Mark R. Boyns
1998-10-29 11:15   ` Lars Magne Ingebrigtsen
1998-10-29 17:56     ` Wes Hardaker
1998-10-29 21:09     ` Darren Stalder
1998-10-31 13:31       ` Lars Magne Ingebrigtsen
1998-11-01 16:18         ` William M. Perry
     [not found]         ` <x7btmsejes.fsf@peorth.gweep.net>
1998-11-01 17:22           ` Brian Edmonds
1998-11-01 20:46             ` William M. Perry
1998-11-07 13:41               ` Lars Magne Ingebrigtsen
1998-10-29 12:57   ` Darren/Torin/Who Ever...
1998-10-29 17:57     ` Wes Hardaker
1998-10-29 20:55       ` Darren Stalder
1998-10-30 16:10         ` William M. Perry
1998-10-30 18:10           ` William M. Perry
1998-11-04  8:08             ` Matt Simmons [this message]
1998-11-04 10:42               ` William M. Perry
1998-11-05  8:05                 ` Matt Simmons
1998-11-05 13:15                   ` William M. Perry
1998-11-07 13:54                     ` Lars Magne Ingebrigtsen
1998-11-09 16:05                       ` Wes Hardaker
1998-11-10  4:51                         ` Lars Magne Ingebrigtsen
1998-11-11  7:10                       ` Matt Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yfqk91bev7r.fsf@acm.org \
    --to=simmonmt@acm.org \
    --cc=simmonmt@eng.sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).