pCD 1.5 - CD-audio player
pCD 1.5 - CD-audio player
This is a standalone cd-audio player.
The code could as well be used in other projects to include cd player feature.
It won't add ANY new dependencies since it uses only cdda2wav (icedax) and aplay.
The code is very simple (easy to understand) - it is only 4Kb.
Language support
Sigmund Berglund
Download
username: puppy
password: linux
pCD-1.5 (4 kb)
The code could as well be used in other projects to include cd player feature.
It won't add ANY new dependencies since it uses only cdda2wav (icedax) and aplay.
The code is very simple (easy to understand) - it is only 4Kb.
Language support
Sigmund Berglund
Download
username: puppy
password: linux
pCD-1.5 (4 kb)
Last edited by zigbert on Sat 01 Jan 2011, 13:07, edited 17 times in total.
- Dingo
- Posts: 1437
- Joined: Tue 11 Dec 2007, 17:48
- Location: somewhere at the end of rainbow...
- Contact:
tried on puppy 3.01 (2.6.21.7 kernel)
it shows an error:
to solve Cannot open '/dev/sr0 changed this to '/dev/hdc in func
statrted again, but another message is showed (I think this time is CD fault)
it shows an error:
Code: Select all
# expr: syntax error
cdda2wav: No such device or address. Cannot open '/dev/sr0'. Cannot open SCSI driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
aplay: playback:2018: read error
statrted again, but another message is showed (I think this time is CD fault)
Code: Select all
Type: ROM, Vendor 'HL-DT-ST' Model 'CD-RW GCE-8525B ' Revision '1.03' MMC+CDDA
569344 bytes buffer memory requested, transfer size 131072 bytes, 4 buffers, 55 sectors
cdda2wav: Read TOC CD Text failed (probably not supported).
#Cdda2wav version 2.01.01a23_linux_2.6.18.6_i686_athlon-4, real time sched., soundcard, libparanoia support
AUDIOtrack pre-emphasis copy-permitted tracktype channels
1-18 no no audio 2
Table of Contents: total tracks:18, (total time 76:39.00)
1.( 8:39.30), 2.( 6:07.42), 3.( 4:57.10), 4.( 3:35.53), 5.( 1:44.52),
6.( 7:08.18), 7.( 5:30.20), 8.( 1:39.40), 9.( 3:15.00), 10.( 2:49.47),
11.( 3:14.43), 12.( 2:23.30), 13.( 5:59.20), 14.( 5:49.27), 15.( 2:32.73),
16.( 2:49.70), 17.( 3:38.15), 18.( 4:44.10)
Table of Contents: starting sectors
1.( 33), 2.( 38988), 3.( 66555), 4.( 88840), 5.( 105018),
6.( 112870), 7.( 144988), 8.( 169758), 9.( 177223), 10.( 191848),
11.( 204570), 12.( 219163), 13.( 229918), 14.( 256863), 15.( 283065),
16.( 294538), 17.( 307283), 18.( 323648), lead-out( 344958)
CDINDEX discid: 6u42dJRdZoVIkKOY2SLS3s_xCuY-
CDDB discid: 0x2311f712
CD-Text: not detected
CD-Extra: not detected
cdda2wav: Incorrect start track setting: 0
Please use -help or consult the man page for help.
aplay: playback:2018: read error
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux
dropbox 2GB free
OpenOffice for Puppy Linux
Dear Dingo and Zigbert,
This device setting worked for me in Puppy 3.01:
The only think I do not see is the tracks list if the CD does not have an entry in the cddb database. I don't even get a 1-xx track list with times, although I see that data in the terminal.
With kind regards,
vovchik
This device setting worked for me in Puppy 3.01:
Code: Select all
cdda2wav -Igeneric_scsi -D/dev/hdd -t $CDDA -Owav - | aplay &
With kind regards,
vovchik
does Puppy 3 include the cddb_query command. I think plinej first used it in his pcdripper. It is possible to use cdda2wav to read cddb info, but it is much slower than cddb_query.
vovchik
does it work to use /dev/cdrom. I could include an CD-player option, but the easiest would be to use /dev/cdrom. -like this
cdda2wav -Igeneric_scsi -D/dev/cdrom -t $CDDA -Owav - | aplay &
This works for me in Puppy 4.12 as well as
cdda2wav -t $CDDA -Owav - | aplay &
Sigmund
vovchik
does it work to use /dev/cdrom. I could include an CD-player option, but the easiest would be to use /dev/cdrom. -like this
cdda2wav -Igeneric_scsi -D/dev/cdrom -t $CDDA -Owav - | aplay &
This works for me in Puppy 4.12 as well as
cdda2wav -t $CDDA -Owav - | aplay &
Sigmund
Dear Sigmund,
Both methods you propose work for me under Puppy 3.01, as well as my own hard-coded one. I have a symlink in /dev from hdd to cdrom, and your second suggestion may be the best one, since it is not device-specific. I installed Plinej's package, so I have cddb_query on my system. It would be nice to get the raw cdda2wav data such as:
into the track list in cases where the CD does not have a cddb entry. What do you think?
With kind regards,
vovchik
Both methods you propose work for me under Puppy 3.01, as well as my own hard-coded one. I have a symlink in /dev from hdd to cdrom, and your second suggestion may be the best one, since it is not device-specific. I installed Plinej's package, so I have cddb_query on my system. It would be nice to get the raw cdda2wav data such as:
Code: Select all
Table of Contents: total tracks:11, (total time 74:26.56)
1.( 4:03.68), 2.( 6:57.50), 3.( 4:04.20), 4.( 3:29.74), 5.( 5:47.25),
6.( 6:36.57), 7.( 4:28.33), 8.( 7:13.63), 9.( 3:59.00), 10.( 3:29.27),
11.(24:16.14)
With kind regards,
vovchik
You miss the length detection????? Let's see where this leads us ........ Not VERY important as I see it, but ...........It would be nice to get the raw cdda2wav data such as:
Code:
Table of Contents: total tracks:11, (total time 74:26.56)
1.( 4:03.68), 2.( 6:57.50), 3.( 4:04.20), 4.( 3:29.74), 5.( 5:47.25),
6.( 6:36.57), 7.( 4:28.33), 8.( 7:13.63), 9.( 3:59.00), 10.( 3:29.27),
11.(24:16.14)
into the track list in cases where the CD does not have a cddb entry. What do you think?
Sigmund
Dear Sigmund,
The device setting is now pretty universal. I hope we hear from some other users, too. About the length detection, it is not so much that I miss it, but without anything in the track list, I cannot play the tracks I might wish to hear by pointing at them, even if they have little useful information except for the track number and the duration. Right now I just get a blank box, so no selection by point-and-click is possible.
Good work so far, and thanks.
With kind regards,
vovchik
The device setting is now pretty universal. I hope we hear from some other users, too. About the length detection, it is not so much that I miss it, but without anything in the track list, I cannot play the tracks I might wish to hear by pointing at them, even if they have little useful information except for the track number and the duration. Right now I just get a blank box, so no selection by point-and-click is possible.
Good work so far, and thanks.
With kind regards,
vovchik
Dear Sigmund,
The /dev/cdrom thing works for me. Nothing in the track list, however. This is the terminal output:
With kind regards,
vovchik
The /dev/cdrom thing works for me. Nothing in the track list, however. This is the terminal output:
Code: Select all
root$ [/usr/local/pcd]-> ./pcd
./pcd: line 34: [: 0: unary operator expected
EXIT="Ready"
Type: ROM, Vendor 'HL-DT-ST' Model 'DVDRAM GSA-4081B' Revision 'A104' MMC+CDDA
569344 bytes buffer memory requested, transfer size 131072 bytes, 4 buffers, 55 sectors
#Cdda2wav version 2.01.01a23_linux_2.6.18.6_i686_athlon-4, real time sched., soundcard, libparanoia support
AUDIOtrack pre-emphasis copy-permitted tracktype channels
1-11 no no audio 2
Table of Contents: total tracks:11, (total time 74:26.56)
1.( 4:03.68), 2.( 6:57.50), 3.( 4:04.20), 4.( 3:29.74), 5.( 5:47.25),
6.( 6:36.57), 7.( 4:28.33), 8.( 7:13.63), 9.( 3:59.00), 10.( 3:29.27),
11.(24:16.14)
Table of Contents: starting sectors
1.( 0), 2.( 18293), 3.( 49618), 4.( 67938), 5.( 83687),
6.( 109737), 7.( 139494), 8.( 159627), 9.( 192165), 10.( 210090),
11.( 225792), lead-out( 335006)
CDINDEX discid: 8xAlfdQoKog_BFZX_RJFQ.M8zCw-
CDDB discid: 0x8011720b
CD-Text: not detected
CD-Extra: not detected
samplefile size will be 43025180 bytes.
recording 243.9066 seconds stereo with 16 bits @ 44100.0 Hz ->'-'...
percent_done:
0%Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
4%CDDA=""
CDDA_ALL=""
EJECT=""
READ_DISC=""
EXIT="cancel"
vovchik
Thats up to the council to decide, perhaps it is a bit late for 4.2.1 though. I hope when its tested it will, so K.I.S.S.!
Doe's it require the cd/dvd wizard to be ran first?
Doe's it require the cd/dvd wizard to be ran first?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]
Sorry, my server is down atm!
Sorry, my server is down atm!
Dear Sigmund,
I kept looking at line 34 of pcd last night and saw nothing wrong with it, so I don't understand. My bash is GNU bash, version 3.2.29(2)-release (i486-slackware-linux-gnu), which is pretty standard, and you have a perfectly normal "while" construction and test. I am scratching my head....
With kind regards,
vovchik
I kept looking at line 34 of pcd last night and saw nothing wrong with it, so I don't understand. My bash is GNU bash, version 3.2.29(2)-release (i486-slackware-linux-gnu), which is pretty standard, and you have a perfectly normal "while" construction and test. I am scratching my head....
With kind regards,
vovchik
Dear Sigmund,
My problem hs been solved - and everything works. I recompiled libcddb from Slackware sources and everything is now OK, including my bash. It turns out that my version of libcddb was bad, failed to recognize /dev/cdrom generated a null string when executed, which then caused your logic test to fail. Nothing wrong from your side. Mea culpa!
With kind regards,
vovchik
My problem hs been solved - and everything works. I recompiled libcddb from Slackware sources and everything is now OK, including my bash. It turns out that my version of libcddb was bad, failed to recognize /dev/cdrom generated a null string when executed, which then caused your logic test to fail. Nothing wrong from your side. Mea culpa!
With kind regards,
vovchik
1. "Has anyone had trouble with this player in Puppy 4 ?"
I'm running it from BoxPup 4.1.3 installed to an ext2 Linux partition on my internal HDD.
It displays all tracks on a commercial audio CD, but will only play the 1st track.
It does this if I have the program running with no disk in the drawer ["No CD found"], and then if I put a disk in and close the drawer, the 1st window still shows no disk found, but a 2nd window opens showing the 1st track info and it plays.
If I then stop that playing, and close that 2nd window, the 1st window still doesn't display any tracks.
So I click "Read disk" and the tracks are displayed.
Then I can highlight any of the listed tracks OK, but when the play button is clicked, all that happens is a dotted square appears inside the edge of the button, but the track doesn't play.
2. I really like the simplicity of this player, so I'd like to get it to work.
I'm running it from BoxPup 4.1.3 installed to an ext2 Linux partition on my internal HDD.
It displays all tracks on a commercial audio CD, but will only play the 1st track.
It does this if I have the program running with no disk in the drawer ["No CD found"], and then if I put a disk in and close the drawer, the 1st window still shows no disk found, but a 2nd window opens showing the 1st track info and it plays.
If I then stop that playing, and close that 2nd window, the 1st window still doesn't display any tracks.
So I click "Read disk" and the tracks are displayed.
Then I can highlight any of the listed tracks OK, but when the play button is clicked, all that happens is a dotted square appears inside the edge of the button, but the track doesn't play.
2. I really like the simplicity of this player, so I'd like to get it to work.