Linux CD player

Started by pjot, June 01, 2006, 02:23:26 PM

Previous topic - Next topic

pjot

Hi,



In the world of Linux, CD-players are almost always bound to a windowmanager. KDE ships one, GNOME also. There is an alternative by using XMMS, but this program renders the audio over PCM, which causes some CPU load. Finally there is a commandline tool called "DCD" but it is... well, console-based, so no GUI.



As I am using XFCE it was kind of annoying not to be able to play audio CD's. Therefore I programmed a genuine CD-player with newLisp, which plays the audio over the CD audio channel.



http://www.turtle.dds.nl/newlisp/cdplayer.jpg">



Code here:



http://www.turtle.dds.nl/newlisp/cdplayer.lsp">http://www.turtle.dds.nl/newlisp/cdplayer.lsp



It will lookup the track titles with CDDA2WAV, and add them to the drop-down list below, which can be used to select some other track.



Especially for this tool I adapted the GTK-server in a way that it is able to handle async events while waiting for events from the user. This 2.0.11 release will become available at the end of this week.



Regards

Peter

Dmi

#1
Nice.

Btw, (just in case if you wrote xml code by hands) you may use something like:
(context 'GTK)
(define (property pname pvalue)
  (string "<property name="" pname "">" pvalue "</property>n"))

(define (child )
  (string "<child>n" (join (args)) "</child>n"))

(define (widget wclass wid)
  (string "<widget Class="" wclass "" id="" wid "">n"
           (join (args))
           "</widget>n"))

> (println (widget "wcl" "wn1"
>                  (property "p1" "v1")
>                  (property "p2" "v2")
>                  (child
>                    (widget "wcl2" "wn2"
>                            (property "p3" "p4")
>                            (property "p5" "p6")))))
<widget Class="wcl" id="wn1">
<property name="p1">v1</property>
<property name="p2">v2</property>
<child>
<widget Class="wcl2" id="wn2">
<property name="p3">p4</property>
<property name="p5">p6</property>
</widget>
</child>
</widget>
WBR, Dmi

pjot

#2
Thanks DMI.



The XML code was generated automagically by Glade. I did not perform any further modifications there. :-)



Peter

pjot

#3
With a little delay GTK-server 2.0.11 was released today. Now everybody can enjoy this wonderful CD player! Unless there is no audio cable between your CD drive and soundcard... :-)



Peter