The time now is Wed 25 Apr 2018, 07:13
All times are UTC - 4 |
Page 1 of 14 [202 Posts] |
Goto page: 1, 2, 3, ..., 12, 13, 14 Next |
Author |
Message |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 01 May 2009, 14:14 Post subject:
pCD 1.5 - CD-audio player Subject description: 1. Jan 2011 |
|
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)
_________________ Stardust resources
Last edited by zigbert on Sat 01 Jan 2011, 09:07; edited 17 times in total
|
Back to top
|
|
 |
Dingo

Joined: 11 Dec 2007 Posts: 1434 Location: somewhere at the end of rainbow...
|
Posted: Fri 01 May 2009, 14:54 Post subject:
|
|
tried on puppy 3.01 (2.6.21.7 kernel)
it shows an error:
Code: | # 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 |
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)
Code: | 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
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 01 May 2009, 15:39 Post subject:
|
|
Dear Dingo and Zigbert,
This device setting worked for me in Puppy 3.01:
Code: | cdda2wav -Igeneric_scsi -D/dev/hdd -t $CDDA -Owav - | aplay & |
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
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 01 May 2009, 15:53 Post subject:
|
|
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
_________________ Stardust resources
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 01 May 2009, 16:22 Post subject:
|
|
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:
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?
With kind regards,
vovchik
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 01 May 2009, 16:32 Post subject:
|
|
Quote: | 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.6 , 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? | You miss the length detection????? Let's see where this leads us ........ Not VERY important as I see it, but ...........
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 01 May 2009, 16:35 Post subject:
|
|
Version 0.2
See main post
Changelog
Bugfix: Detection of CD-drive
Bugfix: View blank list when no disc is detected.
_________________ Stardust resources
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 01 May 2009, 16:49 Post subject:
|
|
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
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Fri 01 May 2009, 16:58 Post subject:
|
|
Uploaded 0.2 once again.
It is now using /dev/cdrom. It failed for me without device setting
vovchik
It should show a complete list (track 1, 2, 3 ... ) even if no cddb is used. Please post the terminal output.
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Fri 01 May 2009, 17:15 Post subject:
|
|
Dear Sigmund,
The /dev/cdrom thing works for me. Nothing in the track list, however. This is the terminal output:
Code: | 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"
|
With kind regards,
vovchik
|
Back to top
|
|
 |
alex12
Joined: 29 Jan 2009 Posts: 80
|
Posted: Fri 01 May 2009, 20:45 Post subject:
|
|
Will we see this in Puppy soon (once the bugs are out)?
|
Back to top
|
|
 |
ecomoney

Joined: 25 Nov 2005 Posts: 2183 Location: Lincolnshire, England
|
Posted: Sat 02 May 2009, 01:11 Post subject:
|
|
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?
_________________ Puppy Linux's Mission
Sorry, my server is down atm!
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6541 Location: Valåmoen, Norway
|
Posted: Sat 02 May 2009, 01:40 Post subject:
|
|
All reports has been negative and from Puppy 3. Has anyone had trouble with this player in Puppy 4 ?
vovchik
It looks like something is different with bash in Puppy 3. Your output points to line 34 which contains:
while [ $NR != $TOTAL_NR ]; do
It seems to be wrong syntax in your system ???
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
trio

Joined: 21 Dec 2008 Posts: 2083 Location: अनुमोदना
|
Posted: Sat 02 May 2009, 02:11 Post subject:
|
|
Sigmund
In 4.2 newer comp, more than 1 g celeron...very long reading disc until it plays...from terminal I see 0% ...1% ...2%...3%..etc
_________________ My apps
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1447 Location: Ukraine
|
Posted: Sat 02 May 2009, 03:03 Post subject:
|
|
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
|
Back to top
|
|
 |
|
Page 1 of 14 [202 Posts] |
Goto page: 1, 2, 3, ..., 12, 13, 14 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|