PDA

View Full Version : Playing cd's



marlowe
2008-01-12, 03:06
I think probably a lot of people using SB/Transporter lack one ability: To play a cd for example when you have just bought a new cd or when someone visits you with some cd's.

Would there be any way to use the cd-drive in the computer with Slimserver to play the cd? I have no technical insight, but I figure the cd-player reads the wav-files and the soundcard transforms this to sound. Couldn't a programme be made to instead send the data to Slimserver and let it send the wav-data to SB/Transporter?

lostboy
2008-01-12, 03:38
Have a look at http://forums.slimdevices.com/showthread.php?t=35718 - this plugin appears to answer your needs. I haven't tried it yet myself.

Chris

NewBuyer
2008-01-12, 03:38
I think probably a lot of people using SB/Transporter lack one ability: To play a cd for example when you have just bought a new cd or when someone visits you with some cd's.

Would there be any way to use the cd-drive in the computer with Slimserver to play the cd? I have no technical insight, but I figure the cd-player reads the wav-files and the soundcard transforms this to sound. Couldn't a programme be made to instead send the data to Slimserver and let it send the wav-data to SB/Transporter?

I recently asked this question too, in my "Couple of nagging questions..." (http://forums.slimdevices.com/showthread.php?t=41577&highlight=basic+cd+playback+functionality) thread...

I also think this would be a *great* SlimServer enhancement! :)

bpa
2008-01-12, 05:28
Mplayer is a Swiss army knife of an application. You can use it to play CDs amongst other things.

Back in 2006 I posted a plugin which enables a user to use mplayer directly through an URL prefix. ( http://forums.slimdevices.com/showpost.php?p=116967&postcount=4 )

The plugin works for Linux but you need mplayer installed. For Windows some modifications are necessary and there may be a problem with 6.5.4

You can use this to play CD track with URLS in Tune-in or playlist of the following

Place track 1
mply://cdda//1

Place track 4
mply://cdda//4

Place tracks 2-9
mply://cdda//2-9

All CD tracks
mply://cdda//

Phil Leigh
2008-01-12, 06:06
Mplayer is a Swiss army knife of an application. You can use it to play CDs amongst other things.

Back in 2006 I posted a plugin which enables a user to use mplayer directly through an URL prefix. ( http://forums.slimdevices.com/showpost.php?p=116967&postcount=4 )

The plugin works for Linux but you need mplayer installed. For Windows some modifications are necessary and there may be a problem with 6.5.4

You can use this to play CD track with URLS in Tune-in or playlist of the following

Place track 1
mply://cdda//1

Place track 4
mply://cdda//4

Place tracks 2-9
mply://cdda//2-9

All CD tracks
mply://cdda//


Any chance this will work under SC 7?

bpa
2008-01-12, 06:24
Probably - there's practically no code and no user interface or settings. It just to be wrapped as an SC 7 plugin with its install.xml etc. I haven't done that before. As I said in the previous a Windows version needs testing - "mply:" would need to be treated as a stream for it work by invoking socketwrapper.

It would be a few days before I can get around to it. Including an example OPML file to play CD track would be an obvious additions.

Phil Leigh
2008-01-12, 06:31
Probably - there's practically no code and no user interface or settings. It just to be wrapped as an SC 7 plugin with its install.xml etc. I haven't done that before. As I said in the previous a Windows version needs testing - "mply:" would need to be treated as a stream for it work by invoking socketwrapper.

It would be a few days before I can get around to it. Including an example OPML file to play CD track would be an obvious additions.

That would be fabulous - I'd do it myself if I knew how!
I'll wait expectantly - many thanks
Phil

bpa
2008-01-12, 07:09
Do you use Windows or Linux ?

Phil Leigh
2008-01-12, 07:44
Do you use Windows or Linux ?

erm...(whispers) "Windows"

holmsn
2008-01-12, 09:06
Have a look at http://forums.slimdevices.com/showthread.php?t=35718 - this plugin appears to answer your needs. I haven't tried it yet myself.

Chris

The WaveInput certainly does the business for me using 6.5.4 on a Windows XP box. I don't use the CD drive on the box for playing CD's but use the TOSlink out of a Quad CDP into the computer and thus can play CD's if required on the 2 remote SB3's I have. The thread above should tell you how to select the input for "Recording" in Windows Sound Mixer, mine is "SPDIF" but you would want "CD player" for a local drive I suppose.

Neil

bpa
2008-01-13, 10:28
Some good & bad news re CD solution on Windows.

I converted my Plugin quite easily to SC7. However, mplayer will not play CDs on Windows but I found another app called cdda2wav which will extract CD track and create a WAV stream. As long as tracks play to conclusion there is no problem but if user terminates a playing track from Slimserver - a CDDA2WAV process left behind which is not acceptable.

I'll have to leave it for now.

bpa
2008-01-19, 18:47
I've managed to get a basic SC7 CD player Plugin for windows working based on the initial idea. Updating the initial plugin to SC 7 was the easy bit.

This is not a polished CD Player plugin as I did more out of curiosity as I have no real use for it. I will not add features to it. I have not tested it extensively nor can I vouch for cdda2wav although it has been around for a long time and has many options. If you are going to use this plugin, I suggest you satisfy yourself about cdda2wav.exe in case it has some undesirable habits.

The update to socketwrapper only involves a final extra tidy up which terminates "orphan" processes. There is a very faint chance this may terminate an unrelated process.

As stated earlier Mplayer will not play CD on Windows so I have had to use cdda2wav instead. Unfortunately this app is not well behaved if a user terminates it and it may leave a process behind. This meant socketwrapper had to be updated to killoff the orphan processes.

To install.

1. Stop SqueezeCenter
2. Unzip the contents attached into the Server\Plugins directory so that there a CDplayer directory in the Plugins directory and it has the Plugin.pm file (amongst others).
3. Extract cdda2wav.exe from the zip file here ( http://www.student.tugraz.at/thomas.plank/cdrtools-2.01-win32-bin.zip ) and copy into Plugins\CDplayer\Bin directory.
4. If you do not have cygwin installed then get cygwin1.dll from the following zip file http://www.student.tugraz.at/thomas.plank/cygwin1.dll_1.5.25_.zip and copy into the Plugins\CDplayer\Bin directory.
5. Check that it cdda2wav works and to determine custom-convert.conf needs to be edited.
5.1 Opening a command prompt window and change to CDPlayer\Bin directory such as c:\Program Files\SqueezeCenter\server\Plugins\CDplayer\Bin if using default.
5.2 run "cdda2wav.exe -scanbus" command
5.1 It should run correctly Examine output - note the 3 digit tuple associated with your CD player.
5.2 If the tuple of your CD drive is not "0,0,0" then edit custom-convert.conf in CDplayer directory and change the "0,0,0" to the tuple in your system and save file.
6. Start SqueezeCenter - check in Settings there is a Plugin called CDplayer and in Advanced/FileTypes there should be an entry "CD Player" enabled to use cdda2wav.
7. To get easy to use entries in Favorites - edit Favorites and import the following file file://c:\Program Files\SqueezeCenter\server\Plugins\CDplayer\CDtrac ks.opml assuming default installation.
8. Download and extract sockwetwrapper.exe (v1.11b) from zip at this location http://homepage.eircom.net/~altondsl/slim/socketwrapper111b.zip.
9. Rename existing socketwrapper.exe in C:\Program Files\SqueezeCenter\server\Bin\MSWin32-x86-multi-thread directory so that you can revert if necessary.
10. Save the downloaded socketwrapper111b.zip and extract socketwrapper.exe into the C:\Program Files\SqueezeCenter\server\Bin\MSWin32-x86-multi-thread directory
11. Test by trying to play a track.
12. If problems then enable logging with player.cdplayer and player.source set to INFO and copy log to a post.

For reference cdda2wav URLs:
http://cdrecord.berlios.de/old/private/cdrecord.html
http://www.student.tugraz.at/thomas.plank/

pm314
2008-01-19, 20:29
I use WaveInput to stream from my CDP and tuner to SB3. Ive never had any problems with it.

bpa
2008-01-20, 01:26
Wavinput is a good general solution but Phil seemed eager for a proper CD solution.

CDplayer plugin might be useful for people with Vista or with soundcard where Wavinput doesn't work.

The cdda2wav app takes the PCM stream straight from CD - Wavinput is taken after Windows has "processed" the stream. You will not get other Windows sounds breaking in nor will it interrupt anything currently outputting audio on PC.

Also you select the tracks to be played from within SC (i.e. remote, Jive, SC web UI).

Phil Leigh
2008-01-20, 01:45
Wavinput is a good general solution but Phil seemed eager for a proper CD solution.

CDplayer plugin might be useful for people with Vista or with soundcard where Wavinput doesn't work.

The cdda2wav app takes the PCM stream straight from CD - Wavinput is taken after Windows has "processed" the stream. You will not get other Windows sounds breaking in nor will it interrupt anything currently outputting audio on PC.

Also you select the tracks to be played from within SC (i.e. remote, Jive, SC web UI).

BPA - you are "a wizard, a true star" - thank you so much. I've just followed your instructions - which were perfect - and it works!!! YES!
This is just exactly what I needed - plus I can even use my TACT RC on the tracks playing on the PC dvd drive via the SB.
You've made my day - thank you again
Phil

bpa
2008-01-20, 01:56
Phil,

That's good to know. Keep an eye on whether there are any memory or handle leaks or any processes left hanging around.

Did you have any problem with finding and altering the device number "0,0,0".

As my test system is XP with one DVD drive, I'd be interested to hear of user experiences with multiple CD drives and/or Vista.

Phil Leigh
2008-01-20, 02:05
Phil,

That's good to know. Keep an eye on whether there are any memory or handle leaks or any processes left hanging around.

Did you have any problem with finding and altering the device number "0,0,0".

As my test system is XP with one DVD drive, I'd be interested to hear of user experiences with multiple CD drives and/or Vista.

On my system, the DVD drive came up as 3,0,0 so I edited the conf file as you explained and it was fine.
On my system my "C" drive was 0,0,0

cdda2wav seems to clean itself if I stop the cd track - can't see any leaks or rogue processes...I'll keep a lookout
Regards
Phil

bpa
2008-01-20, 02:33
The modified socketwrapper seems to get all the stray cdda2wav processes. It used to occur, if I lined up a number of CD tracks to play and then as soon as one started, I skipped onto the next track.

Also on one occasion desktop Explorer disappeared and restarted itself - technically socketwrapper could have killed it although I don't think it did.

NewBuyer
2008-03-07, 20:41
Hey, this looks like a great solution for finally accomplishing CD playback through SlimServer/SqueezeCenter. Phil, has this solution continued to work well for you? Has anybody else tried it, any advice, etc?

bpa
2008-03-08, 01:02
The plugin only works on SC7.

I haven't any info about regular use of the plugin but I have been using cdda2wav.exe as part of the CDImport plugin and found some gotchas which may affect CDplayer.

The cdda2wav solution is for Windows only. It has been tested on XP only - I'm not sure whether it works on Vista.

cdda2wav seem to need a lot of RAM to read a track and so it didn't run on an XP system laptop with 512Mb RAM which was also running SC7 and Firefox. I also had problems with a Sony/Liteon DVD-RW drive until I upgraded the drive's firmware.

I am considering taking some code from CDImport and adding to CDPlayer which will simplify installation by autodiscovery of the CD compatible drives and also get track info to display when playing.

danco
2008-03-08, 02:03
Is there, or does anyone feel like creating, a similar plugin for Mac OS (and Linux)?

Mostly I play CDs from my music system, but playing them on my computer and using SqueezeCenter would let me play in several rooms.

An alternative approach (that costs) would be to send the music through Nicecast, which the SBs can tune into.

I do have a version of cdda2wav on my Mac.

bpa
2008-03-08, 02:26
Is there real interest in taking the CDPlayer furher ?

If I take some of the CDImport code back into CDPlayer- then I reckon I can make CDPlayer will work on Linux. To play the CDs on Linux I was think using mplayer rather than CDparanoia or cdd2wav as the latter's intent is to get a good rip rather than play in realtime.

Can mplayer play CDs on OSX ?
- try mplayer cdda://1 for track 1.

danco
2008-03-08, 04:37
OS X does have cdda.

However, the call you suggest does not work. It gives "file not found", and the same "file not found" if I try the full path.

I tried

mplayer cdda:///Volumes/Audio\ CD

(as the CD shows up on the desktop as Audio CD) and got the following

MPlayer dev-SVN-r21482-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (Family: 6, Model: 15, Stepping: 10)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Playing cdda:///Volumes/Audio CD/.
WARNING: Attempting to use DLL codecs but environment variable
DYLD_BIND_AT_LAUNCH not set. This will likely crash.
Win32 LoadLibrary failed to load: avisynth.dll, /usr/local/lib/codecs/avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll
Seek failed


Exiting... (End of file)


So then I tried

mplayer cdda:///Volumes/Audio\ CD/1\ Audio\ Track.aiff

(note. I did not type this in. Mac OS has this clever trick where dragging a file or folder into the Terminal window automatically inserts the full file path).

and got

MPlayer dev-SVN-r21482-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (Family: 6, Model: 15, Stepping: 10)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Playing cdda:///Volumes/Audio CD/1 Audio Track.aiff.
MPEG: Missing video stream!? Contact the author, it may be a bug :(
MPEG: Missing video stream!? Contact the author, it may be a bug :(
libavformat file format detected.
LAVF_header: av_open_input_stream() failed


Exiting... (End of file)


I think we can conclude that mplayer will work, but there is a fair bit of dealing with parameters, etc, before it will do what we want.

One thing that will be needed is to be sure that the name of the CD and the name of the track are not relevant, as a previous play of a CD may well change its name from the generic Audio CD and 1 Audio Track to the specific title of the CD and track.

bpa
2008-03-08, 04:47
I presume there was a CD loaded in the drive.

OK - mplayer looks too different on OSX - let's tey cdda2wav

1. First need to find the device of your CDROM (or equivalent) - use the command
cdd2wav -scanbus

Can you copy the output to a post.

2. Assuming there is a "removable CD-ROM" with a tuple say "1,2,3" then try the commands

Below should produce a list of the tracks on the CD
cdd2wav -device 1,2,3 -verbose-level toc

Below should rip track 1 into a file - audio.wav I think.
cdd2wav -device 1,2,3 -track 1

bpa
2008-03-08, 07:24
The cdda2wav command I suggested will probably not work on OSX either because access is needed to SCSI devices.

So you need to find a command that will play a selected track from the CD on your systems. The problem with OSX is finding the device which on linux systems is normally /dev/cdrom. It needs to be a device and not a Volume as the raw data has to be extracted. I suggest trying the following command with different device names.

mplayer cdda://1 -cdrom-device <nameofCDROMdevice>

The similar issues poccurs with cdda2wav - the device name. Sikilar things to try

cdda2wav -track 1 -device <nameofCDROM>

bpa
2008-03-08, 07:52
Danco,

The following is suggested on the cdda2wav site

For the N'th cdrom or cdburner device use (after substituting 1 for N if you have one drive)
cdda2wav -track 1 -Igeneric_scsi -DIOCompactDiskServices/N track1.wav

For a dvd drive use
cdda2wav -track 1 -Igeneric_scsi -DIODVDServices/N track1.wav

Edit:
Some email post imply that the device should be spelt as IOCompactDiscServices (with a 'C' and not a 'K' )

danco
2008-03-08, 09:07
I have to check a bit further.

I realise I may be only half right in saying that OS X has cdda.

Should there be a file named cdda? I can only find various files containing the name cddafs. Perhaps that's all that's needed.

When you say

-device <nameofCDROM>

is "name of CDROM" supposed to be "Audio CD" (the name I get on the desktop) or /dev/cdrom?

Or does /dev/cdrom replace the word "device" in the line you give?

Apart from the bits I don't actually understand in your suggestions, it's all a bit tricky on my system for various reasons. cdda2wav seems to insist on being run as root, and as I normally run as a non-administrator that means I have to su to an admin account and sudo all commands. And cdd2wav happens to be a binary inside another program, rather than part of the standard Unix folders, so I also have to remember to give the full path.

Anyway, when I remember to invoke cdd2wav correctly with the -scanbus parameter,what I get is

/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: There is no sound support configured!
/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: Error 0. No matching device found.. Cannot open SCSI driver.
/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: For possible targets try 'cdda2wav -scanbus'.
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'.


When I did try dev=help, I got

Supported SCSI transports for this platform:

Transport name: SCSITaskDeviceInterface
Transport descr.: Apple SCSI
Transp. layer ind.:
Target specifier: Mac Prom device name
Target example: IOCompactDiscServices/0 or IODVDServices/0
SCSI Bus scanning: not supported
Open via UNIX device: not supported

Transport name: RSCSI
Transport descr.: Remote SCSI
Transp. layer ind.: REMOTE:
Target specifier: rscsi@host:bus,target,lun
Target example: REMOTE:rscsi@host:1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported

That "open via UNIX device: not supported" looks a bit ominous.

If we really get stuck, there is always Nicecast, but that's another $40 or thereabouts.

bpa
2008-03-08, 09:13
with mplayer "cdda" is just internal notation to mplayer to use the player device defined by the "-cdrom-device" option. If no device is specified, mplayer will try to use /dev/cdrom/

/dev/cdrom is OK for most Linux systems but not for OSX.

cdda2wav operates slightly differently and wants to work on the device directly so usually the device id is a 3 digit identifier but again on OSX it is different. I believe the following could work depending on which ones has the typo.

cdda2wav -track 1 -Igeneric_scsi -DIOCompactDiskServices/1 track1.wav



or

cdda2wav -track 1 -Igeneric_scsi -DIOCompactDiscServices/1 track1.wav

These assume you have only one CDROM/DVDROM/Combo device.

Edit:
Your dev=help implies the 2nd cdda2wav command is the one to try. Perhaps with /0 if /1 fails.
edit 2

use IODVDServices/1 if you have a DVD or Combo drive and not a CD drive.

danco
2008-03-08, 09:44
Yes, my drive is a DVD drive.

This time, I got

sudo /Applications/D\'s\ apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav -track 1 -Igeneric_scsi -DIODVDServices/1 track1.wav
Password:
/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: There is no sound support configured!
/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: No such file or directory. Unable to get exclusive access to device. Cannot open SCSI driver.
/Applications/D's apps/Music/xACT.app/Contents/Resources/Binaries/bin/cdda2wav: For possible targets try 'cdda2wav -scanbus'.
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'.


Replacing /1 with/0 did not help, same errors.

bpa
2008-03-08, 11:19
I am at a loss as all my suggestion come from the postings of others.

If the device name is right then there is some sort of protection in action preventing mplayer or cdda2wav accessing the drive.

When testing - is the Audio CD mounted in some way. If so, then unmount it and try a cdda2wav command.

danco
2008-03-08, 11:30
Unmounted the CD using Disk Utility, and got same error messages as before

danco
2008-03-08, 12:15
bpa.

I have a program that takes a CD and provides a bin file and a toc file for it. The main part of the program is an AppleScript (that invokes a shell script involving cdrdao). I could send it to you (private message) and very likely you would be able to see a suitable syntax from it.

I can sort of read the script, but it's a bit much for me.

bpa
2008-03-08, 12:19
Go ahead - it took me awhile to get the cdda2wav syntax sorted for Windows so it is a case of persisting to find the answer.

NewBuyer
2008-03-08, 18:01
The plugin only works on SC7... The cdda2wav solution is for Windows only. It has been tested on XP only... I am considering taking some code from CDImport and adding to CDPlayer which will simplify installation by autodiscovery of the CD compatible drives and also get track info to display when playing.


Is there real interest in taking the CDPlayer furher ? ...

bpa, you are a prince! Your efforts are very valuable. They will also likely work very well for me, as my server is Windows XP with 4GB of RAM.

Thank you for doing this, and yes please I hope you will try your ideas for simplifying installation and track info display, as you mentioned above. I am very interested to hear from you on it. By the way, I think you should get paid for what you are doing, as getting CD playback to work well with the slim devices is a very valuable addition to our current enjoyment. If you deploy this plugin, would you consider at least making it donate-ware? I think you would be receiving donations in gratitude for your efforts.

NewBuyer
2008-03-15, 20:33
bpa I wonder if you had a chance to try your autodiscovery/track-info ideas yet? Just very curious please how it is going...

bpa
2008-03-16, 02:32
I've got the auto discovery of CD and supplying track info working OK on Linux. I now need to test on Windows.

I wanted to check cdda2wav out a bit more on Linux to make sure that the plugin could use the same application (cdda2wav) across Linux, Mac and Windows. Once I get the Windows and Linux in good shape, I want to sort out the MAC OSX command line options.

I was hoping to make the CDplayer plugin a little more user tolerant particularly if a user presses eject button when playing a track. Unfortunately on my Linux system, there is something wrong with Linux cdrom driver and pressing eject when playing a CD hangs the system and it needs to be be rebooted so I've stopped testing the Eject button. This happens with all CD playing apps not just cdda2wav so it is a Linux driver/kernel issue.

I'll test the same issue on Windows so at worst users of CDplayer will be warned what not to do.

Smiffy
2008-03-29, 23:26
Thanks for the great plug-in bpa. It's been a failing of the system not to be able to play a CD without first having to rip it, only then to find out the music was not worth the time & effort in the first place.

One quirk I have found is, if I play just track 4 (cdplay://-t 4) on any CD I only get 35 seconds worth of music? all other tracks play out completely? Is it me or has any one else found this.


System Details:
SqueezeCenter Version: 7.0 - 17793 - Windows XP - EN - cp1252
Server IP address: xxx.xxx.x.x
Perl Version: 5.8.8 MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt
Platform Architecture: 586
Hostname: MouseTrap
Server Port Number: 9000

bpa
2008-03-30, 01:51
I think it may be specific to your system/CDROM drive. The plugin is very simple - it passes the parameter (in this case -t 4 ) directly to cdda2wav and it tries to retrieve the audio from that track.

This plugin is a hack and there are a number of things that can go wrong - such as.
1. cdda2wav was not intended to do realtime playing so perhaps something with you system/drive is making it buffer data and it stalls.
2. cdd2wav is "upsetting" your drive.
3. SC timeouts waiting for data from cdda2wav.

I suspect the CDROM drive buffering is kicking in and that the drive is spinning up for a big buffer read and SC timeouts.

To SC the "cdplay:" device looks like a radio station URL so perhaps increasing Radio Station timeout (see Settings/Advanced/Network ) might help.

With one DVDROM drive I found cdda2wav could only play one track. To play another track I had to re-read the CD's Table of Contents. When I updated the DVDROM drive firmware - evrthing was OK. So cdda2wav/CD driver can upset some drive hardware in unexpected ways.

You could use cdd2wav to rip a track4 to a file and then play track 4 to verify. If that worked then you know the issue is probably buffering/timeouts - a log with player.source set to INFO might show somehting.

Smiffy
2008-03-30, 02:25
Thanks for that Bpa, my system is a little antiquated like it's user!

I'll try your suggestions.

It's no real problem as if I like the CD It's get ripped and if not I've only had to endure 30 seconds of it ;-).

keep up the good work it's appreciated.

bpa
2008-04-16, 18:05
Attached is an beta version of enhanced CDplayer for testing.

The main differences are
1. Support for platforms which run cdda2wav - Windows XP and many Linux. Mac/OSX needs some more effort to get cdd2wav to work. Not tested with Vista but should be OK.
2. Album content is identified using MusicBrainz. Album, track and artist info is displayed in menus and as track is played.

The intent behind this plugin is to provide a basic facility to play audio CD on a PC cdrom/dvd drive through SqueezeCenter. There are limitations because the CDDA2WAV app is intended for ripping rather than playing in real time so occassionally there will be gaps - depending on whether CD is spinning up/.down and buffer of the CDROM drive.

Basic Operation.

Once Installed - there will be a CDplayer menu in Extras on WebUI, SB and SBC. Click on CDplayer menu and you will get 1,2 or more menu items.

There will always be a "CD Tracks - raw format" entry. This menu has an entry for each track - the tracks are numbered. If Album cannot be identified then there will only be the "raw" entry. Occassionally an album will be wrongly identified so user can use "raw" entry to play track without showing incorrect info.

Occassionally there will be two or more records associated with an Album id - all matching records will be shown.

There is a setting to change operation of Pause to Stop within CDplayer. This is because I am not sure what happens if a playing CD audio stream is paused so I think stop may be better for CD drive.

There are two version of the plugin - Windows and Linux, so there are separate installation instructions.

Windows.
1. Stop SC
2. Download a Zip file from http://homepage.eircom.net/~altondsl/slim/CDplayer1beta.zip
3. Unzip the zipped file into server/Plugins so that you have a server/Plugins/CDplayer
4. Replacing socketwrappers help minimise stray processes left behind by cdda2wav. Following steps are optional.
4a.Download and extract sockwetwrapper.exe (v1.11b) from zip at this location http://homepage.eircom.net/~altondsl/slim/socketwrapper111b.zip
4b. Rename existing socketwrapper.exe in C:\Program Files\SqueezeCenter\server\Bin\MSWin32-x86-multi-thread directory so that you can revert if necessary.
4c. copy the downloaded socketwrapper.exe into the C:\Program Files\SqueezeCenter\server\Bin\MSWin32-x86-multi-thread directory
5. Start SqueezeCenter - check in Settings there is a Plugin called CDplayer and in Advanced/FileTypes there should be an entry "CD Player" enabled to use cdda2wav.
6. Put CD in drive and test.

Linux.
1. Stop SC
2. Download the tar.gz file attached to this post.
3. Install cdda2wav from the repository for your distro.
4. Untar the tar.gz file into server/Plugins such that you have a directoru server/Plugins/CDplayer
5. Start SqueezeCenter - check in Settings there is a Plugin called CDplayer and in Advanced/FileTypes there should be an entry "CD Player" enabled to use cdda2wav.
6. Put CD in drive and test.

bpa
2008-04-17, 02:30
Danco,

I'd like to get CDplayer working with OSX.

After looking at the script and searching using the info provided. The audio CD must not be mounted when running cdda2wav. I think one of the following will work on OSX to get CD Table of Contents.

cdda2wav dev=IOCompactDiscServices -verbose-level=toc -N -g -J
cdda2wav dev=IODVDServices -verbose-level=toc -N -g -J

The device name depends on whether the drive is a DVD or CD drive. If the total number of CD and DVD drives on your system is more than one - then the drives are numbered sequentially with a suffix. So if you have two drives in total - one of the following should work.

cdda2wav dev=IOCompactDiscServices/0 -verbose-level=toc -N -g -J
cdda2wav dev=IODVDServices/0 -verbose-level=toc -N -g -J
cdda2wav dev=IOCompactDiscServices/1 -verbose-level=toc -N -g -J
cdda2wav dev=IODVDServices/1 -verbose-level=toc -N -g -J

If there are still problems. The command line utility "ioreg" is supposed to give detailed info on CD/DVD drives. Try the command
ioreg -l

NewBuyer
2008-04-17, 11:39
Hi bpa,
With great anticipation, I tried the listed steps on my Windows XP machine, and SC shows a CD Player menu item now and pulls the loaded CD's track listing. At first, trying to play a CD would result in an error message about not being able to play the file type - but when I went into the "file types" SC menu and deselected all but the CDDA2WAV, it appeared that it was remedied. But now when I try to play a track, it says "Connecting.." for a time and the optical drive starts thrashing, and the song never plays. Even after I press Pause until the SB3 says "Stopping..", the optical drive continues to thrash around with the disk. Any ideas what I should do? The drive is a fairly generic Sony DVD ROM drive which can play both DVD and CD disks.
P.S. I also noticed many copies of the CD Player EXE in the list of active processes in Task Manager.

danco
2008-04-17, 12:28
I'll try cdda2wav on my Intel Mac in a few days. I'm out of town over the weekend.

bpa
2008-04-17, 13:47
Newbuyer,

What is the spec of your CDROM drive ?

The actual playing code hasn't changed since last version except for adding a parameter in the custom-convert.conf file. Edit custom-convert.conf and remove the "-S 4" settings on each line. Now the conf file is as per previous release.

Before starting a new test.
1. Stop SC.
2. Eject and re-insert CD
3. Using task manager kill any cdda2wav.exe processes
4. Unless there is an installation problem - Re-enable all Filetypes.

If you want a more complete explanation of what is happening - I have a long answer that I can post. All are side-effects of CDROM errors possibly due to the "-S 4" option and cdda2wav retrying operations.

The problem described in a previous post should re-occur. I think with some testing to get a correct parameter setting it might be possible to eliminate the problem.

danco
2008-04-25, 10:15
This what I got when running cdda2wav on my Intel iMac, OS 10.5.2, with a disk in the internal drive (I also have an external drive that was switched off).

/Applications/D's apps/Music/cdda2wav: There is no sound support configured!
Type: ROM, Vendor 'OPTIARC ' Model 'DVD RW AD-5630A ' Revision '1AHM' MMC+CDDA
176128 bytes buffer memory requested, transfer size 32768 bytes, 4 buffers, 13 sectors
#Cdda2wav version 2.01.01a28_darwin_8.10.1_i386_i386, libparanoia support
Tracks:15 71:59.69
CDINDEX discid: oRtVs7Hy90Hv_bHn1b4lkFPfV4A-
CDDB discid: 0xcf10df0f
CD-Text: detected
CD-Extra: not detected
Album title: 'Witchcraft & Magic' from ''
T01: 0 4:49.31 audio linear copyallowed stereo title '1' from 'W&Magic'
T02: 21706 3:50.41 audio linear copyallowed stereo title '2' from 'W&Magic'
T03: 38997 4:02.68 audio linear copyallowed stereo title '3' from 'W&Magic'
T04: 57215 4:39.22 audio linear copyallowed stereo title '4' from 'W&Magic'
T05: 78162 7:19.36 audio linear copyallowed stereo title '5' from 'W&Magic'
T06: 111123 9:07.43 audio linear copyallowed stereo title '6' from 'W&Magic'
T07: 152191 4:56.10 audio linear copyallowed stereo title '7' from 'W&Magic'
T08: 174401 2:02.57 audio linear copyallowed stereo title '8' from 'W&Magic'
T09: 183608 6:51.68 audio linear copyallowed stereo title '9' from 'W&Magic'
T10: 214501 3:24.70 audio linear copyallowed stereo title '10' from 'W&Magic'
T11: 229871 4:59.33 audio linear copyallowed stereo title '11' from 'W&Magic'
T12: 252329 2:57.65 audio linear copyallowed stereo title '12' from 'W&Magic'
T13: 265669 4:10.05 audio linear copyallowed stereo title '13' from 'W&Magic'
T14: 284424 5:05.19 audio linear copyallowed stereo title '14' from 'W&Magic'
T15: 307318 3:42.26 audio linear copyallowed stereo title '15' from 'W&Magic'
Leadout: 323994

Not knowing what's supposed to be happening, that looks good to me.

Using the external drive, with the modification in the parameters you give produced a virtually identical output.

bpa
2008-04-25, 11:03
That's great.

I coded up CDplayer to recognise OSX but I didn't test the codepaths. If you want to try - just enter the device name into the device name box in Settings and click apply. You will need to restart SC as device name settings are only read at startup.

danco
2008-04-25, 15:08
I installed the plugin, and it is recognised. But when I clicked on the Settings link I got the message

404 Not Found: settings/plugins/CDplayer/settings/basic.html

I can actually see this file path inside HTML/EN

It may be relevant that I am not using port 9000 for the Web interface, but 9020 (because 9000 is used for something else). But that is not an issue with other plugins.

By the way, I don't know if this is just an odd Mac error, but the custom-convert.conf and custom-types.conf items show up claiming to be Unix executable files, which does surprise me.

When you say "enter the device name"

do you mean IODVDServices? If not, what/ And, if so, will IODVDServices/0 work even when the external drive is not powered on (so that no change would be needed whether or not the external was on)?

bpa
2008-04-25, 15:50
I installed the plugin, and it is recognised. But when I clicked on the Settings link I got the message

404 Not Found: settings/plugins/CDplayer/settings/basic.html

WHat do you mean recognised ? Is there a CDplayer in the Extras menu. It is a normal Plugin and should be installed alongside plugins such as Alien.

If there is no CDplayer in the Extras menu but CDplayer appears in the Advanced/Plugins menu - then something is wrong with the installation. However I don't know where Plugin go on OSX and I only give general help.

I've seen the 404 error in the following cases
1. Plugins installed one level too deep e.g. Plugins/Plugins/CDplayer
2. CDplayer installed in the Slim/Plugin directory
3. In Plugins directory you have an empty folder called Plugin or Plugins and possibly only one Plugin (e.g. CDplayer) installed.

You should try restarting but deleting plugin-data.yaml before restarting SC.


It may be relevant that I am not using port 9000 for the Web interface, but 9020 (because 9000 is used for something else). But that is not an issue with other plugins.


No issue - CDplayer is very like AlienBBC just the cdda2wav program get its audio stream from a CD rather than the internet. All user interfaces and internet access for CD database use SC API.



By the way, I don't know if this is just an odd Mac error, but the custom-convert.conf and custom-types.conf items show up claiming to be Unix executable files, which does surprise me.

I think that is my fault - I may have put executable on all files in the tar by mistake.



When you say "enter the device name"


To get the CD track listing in your previous you issued a cdda2wav command with a parameter "dev=" (or possible "device=". The device name is whatever you put after "dev="

What is the full cdda2wav command you used to get the output in the previous post ?

danco
2008-04-26, 01:21
WHat do you mean recognised ? Is there a CDplayer in the Extras menu. It is a normal Plugin and should be installed alongside plugins such as Alien.

If there is no CDplayer in the Extras menu but CDplayer appears in the Advanced/Plugins menu - then something is wrong with the installation. However I don't know where Plugin go on OSX and I only give general help.

I've seen the 404 error in the following cases
1. Plugins installed one level too deep e.g. Plugins/Plugins/CDplayer
2. CDplayer installed in the Slim/Plugin directory
3. In Plugins directory you have an empty folder called Plugin or Plugins and possibly only one Plugin (e.g. CDplayer) installed.

You should try restarting but deleting plugin-data.yaml before restarting SC.


Right, there is no CDPlayer in the Extras menu, just in the Advanced/Plugins menu. This applies after deleting plugin-data.yaml and restarting SqueezeCenter.

I have put CDPlayer in the correct place, it is sitting in the same folder as all the other plugins installed by me. So your three suggestions can't be the issue. Any other thoughts?

(For the record, and to help others, the plugins live in ~/Library/Application Support/SqueezeCenter/Plugins).

Thanks for your answer about the device name. I thought that would be what was needed, but wanted to be sure.

bpa
2008-04-26, 01:50
I came across this "404" situation with an AlienBBC install and was surprised how many different ways it can be caused and how hard it is find the cause.

Essentially - Plugins have two passes. First the XML and conf files are processed and it seems to be a general search of all subdirectories of server/Plugins and Slim/Plugin. These files are processed and can be anywhere - not tied to their associated Plugin at all. So just because install.xml and conf files are processed, doesn't mean SC has found the Plugin code or the code is in the "right" place. Install.xml shows the way for the "Settings" code to "settings/basic.html".

The second pass - the actual loading of Plugin module code also has two passes. First pass to identify plugins and the second to load the code. In these "404" cases it seems the second pass thinks the Plugin in question has already been loaded.

Sometime a fresh pair of eyes can help.
1. If OSX has the "tree" command - can you do a tree of ~/Library/Application Support/SqueezeCenter/Plugins

2. Set server.plugins to debug and check the box to save at next application restart. Stop and restart SC and copy the SC log with the server.plugins debug info.

danco
2008-04-26, 03:19
I have found the problem.

The log said "can't locate Plugins/CDplayer/plugin.pm".

But the unarchived folder was not named CDplayer, its name was CDplayer 2. Changing the name to CDplayer got it going.

I haven't actually got a CD to play yet, but this is probably my error.

First, I have to remember to unmount the CD before trying to play it - which is mildly annoying, but one can live with it.

When I remember to do that, I can get as far as a menu that offers only one option, namely "CD tracks - raw format". Pressing Play in that option gets as far as "checking stream" but does not actually play anything. This is using SoftSqueeze, so that I don't have to keep moving between rooms to start things and change them.

The log says

[08-04-26 11:09:16.5930] Plugins::CDplayer::CDhandler::setMode (119) setmode called
[08-04-26 11:09:16.5932] Plugins::CDplayer::CDhandler::LoadCDandIdentify (135) Request to load CD and identify
[08-04-26 11:09:17.5975] Plugins::CDplayer::CDhandler::processCDTOCResponse (232) Searching MB for release data for vS_.lOC.YOss1.Oh_VcHYVrbWvI-
[08-04-26 11:09:18.1580] Plugins::CDplayer::CDhandler::retrieveMBBasicOK (291) Got Basic Release Info from MusicBrainz:
[08-04-26 11:09:32.2613] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&Lengths=23180&Offsets=150

with the last line repeated many times. I tried with two different CDs, neither of which had been played on my computer previously (so iTunes had not identified them, and they only show up as Audio CD). One was perhaps obscure, and might not have data on MusicBrainz, but I would have expected the other (Loreena McKennit's "The Visit" to be listed).

bpa
2008-04-26, 03:42
I'll check the tar for the "2" - it may be my fault or possibly whatever is used to unatr - I know sometimes when using Konqueror browser - it can add a "(2)" to a directory or Zip rather than overwrite.

The id "vS_.lOC.YOss1.Oh_VcHYVrbWvI-" is gives a CD "The Visit" by Lorna McKennit ( http://musicbrainz.org/show/release/?releaseid=35739 )

So there is a record and CDplayer has calculated the correct id from the listing of Tracks. It looks like the MB lookup has failed. There may be some differences on OSX (e.g. newlines) that is causing a problem. Alternatively it could be a network error or timeout.

Can you set logging plugin.cdplayer to DEBUG and try to load a CD again. The Lorna McKennit would be a good test as I know it is is MB..


Regarding "unmount" - if you have the command string - I can add it to CDplayer and so that it is issued from CDplayer before trying to read.

I am working on supporting FreeDB as an alternative to MusicBrainz as MusicBrainz does not have entries for a number of my CDs.

NewBuyer
2008-04-26, 04:08
Newbuyer,

What is the spec of your CDROM drive ?

The actual playing code hasn't changed since last version except for adding a parameter in the custom-convert.conf file. Edit custom-convert.conf and remove the "-S 4" settings on each line. Now the conf file is as per previous release.

Before starting a new test.
1. Stop SC.
2. Eject and re-insert CD
3. Using task manager kill any cdda2wav.exe processes
4. Unless there is an installation problem - Re-enable all Filetypes.

If you want a more complete explanation of what is happening - I have a long answer that I can post. All are side-effects of CDROM errors possibly due to the "-S 4" option and cdda2wav retrying operations.

The problem described in a previous post should re-occur. I think with some testing to get a correct parameter setting it might be possible to eliminate the problem.

Hi bpa,

Reading this thread again, and I see that you had asked me for my optical drive specs, and I didn't yet reply (sorry!)

My optical drive is identified by Windows XP as a Sony DVDROM DDU1615. Is that helpful?

Also, in your previous message, I'm not clear if you are recommending that I should actually edit/delete the "-S 4" pieces on each line - what does this do?

Thanks for reading this and for all your work so far. I'm really hopeful that I can get this to work on my Windows XP machine.

bpa
2008-04-26, 07:00
The DDU1615 is quite a fast (48x) DVDROM/CDROM drive - I was worried it might be a very slow drive.

I have an old DDU1613 (40x) - I installed in on an XP system and tested it and it worked OK with CDplayer. The DDU1615 is the next generation and I think should work as well.

What is the firmware rev in the DDU1615. If you are not sure run "cdda2wav -scanbus" in a command prompt window. The 4 letter code after the SONY name is the rev. I think it should be something like FRS3 or GYS1 or GYS2. If your PC is a Dell there are firmware updates on the Dell site.


The "-S 4" makes the drive run at 4x speed. To play a CD you only need 1x speed but to allow for buffering I chose 4x. I found if the drive ran at full aspeed (e.g. 40x 48x) - it would be reading ahead and if the user skipped tracks backwards - the drive had to slow down from a high speed, reposition and re-start. I found using 4x - skipping track had less delay. Also I couldn't get a Sony DVD-RW drive to work properly (same symptoms as you describe) until the speed was lowered.

danco
2008-04-26, 07:12
The Loreena McKennit album is recognised now. I don't know why it wasn't recognised before. We can just call it a glitch unless it happens on several albums.

It is still not actually playing. The log is too long to give here, though I could spread it across several posts. Looking at it, I can see that most of the lines are related to identifying the tracks. There is one line that looks crucial, though.

/usr/local/bin/cdda2wav: There is no sound support configured!

I am not sure what I am supposed to be doing. I note that in the File Types, the right types are listed (cdda2wav, cdda2wav/lame, cdda2wav/flac).

Here is part of the log.



[08-04-26 14:40:00.2128] Plugins::CDplayer::CDhandler::LoadCDandIdentify (137) cd use is 0 Busy=1
[08-04-26 14:40:00.2131] Plugins::CDplayer::CDhandler::LoadCDandIdentify (162) Create Fork to read CD TOC using cdda2wav
[08-04-26 14:40:00.2139] Plugins::CDplayer::Fork::go (84) Fork executing 'cdda2wav' with 'device=IODVDServices -verbose-level=toc -N -g -J'
[08-04-26 14:40:00.2141] Plugins::CDplayer::Fork::go (85) Fork actual executing '"/usr/local/bin/cdda2wav" device=IODVDServices -verbose-level=toc -N -g -J 2> "/Users/danco/Library/Caches/SlimServer/Forkoutput2.txt"'
[08-04-26 14:40:00.2195] Plugins::CDplayer::Fork::go (93) Child task (82988) forked: "/usr/local/bin/cdda2wav" device=IODVDServices -verbose-level=toc -N -g -J 2> "/Users/danco/Library/Caches/SlimServer/Forkoutput2.txt"
[08-04-26 14:40:00.2204] Plugins::CDplayer::Fork::go (94) Child task is alive
[08-04-26 14:40:01.2210] Plugins::CDplayer::Fork::checkFork (129) Forked task 82988 is not alive
[08-04-26 14:40:01.2213] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : /usr/local/bin/cdda2wav: There is no sound support configured!
[08-04-26 14:40:01.2215] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : Type: ROM, Vendor 'OPTIARC ' Model 'DVD RW AD-5630A ' Revision '1AHM' MMC+CDDA
[08-04-26 14:40:01.2217] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : 176128 bytes buffer memory requested, transfer size 32768 bytes, 4 buffers, 13 sectors
[08-04-26 14:40:01.2219] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : #Cdda2wav version 2.01.01a28_darwin_8.10.1_i386_i386, libparanoia support
[08-04-26 14:40:01.2221] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : Tracks:9 49:05.60
[08-04-26 14:40:01.2223] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : CDINDEX discid: vS_.lOC.YOss1.Oh_VcHYVrbWvI-
[08-04-26 14:40:01.2224] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : CDDB discid: 0x660b8109
[08-04-26 14:40:01.2226] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : CD-Text: not detected
[08-04-26 14:40:01.2228] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : CD-Extra: not detected
[08-04-26 14:40:01.2230] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : Album title: '' from ''
[08-04-26 14:40:01.2232] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T01: 0 5:09.05 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2233] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T02: 23180 4:20.63 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2235] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T03: 42743 3:41.22 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2237] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T04: 59340 11:34.25 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2239] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T05: 111415 4:26.23 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2241] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T06: 131388 4:09.62 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2243] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T07: 150125 4:57.20 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2255] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T08: 172420 5:45.03 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2258] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : T09: 198298 5:01.62 audio linear copydenied stereo title '' from ''
[08-04-26 14:40:01.2260] Plugins::CDplayer::Fork::checkFork (132) FORK 82988 : Leadout: 220935
[08-04-26 14:40:01.2263] Plugins::CDplayer::Fork::checkFork (138) Forked task complete, invoking callback
[08-04-26 14:40:01.2267] Plugins::CDplayer::CDhandler::computeMBDiscId (496) MusicBrainz DiscId is vS_.lOC.YOss1.Oh_VcHYVrbWvI-
[08-04-26 14:40:01.2273] Plugins::CDplayer::CDhandler::processCDTOCResponse (225) After compute MB id. Loaderror=0
[08-04-26 14:40:01.2275] Plugins::CDplayer::CDhandler::processCDTOCResponse (232) Searching MB for release data for vS_.lOC.YOss1.Oh_VcHYVrbWvI-
[08-04-26 14:40:01.2358] Plugins::CDplayer::Fork::checkFork (146) Deleting Bat and output files /Users/danco/Library/Caches/SlimServer/Forkoutput2.txt
[08-04-26 14:40:01.7396] Plugins::CDplayer::CDhandler::retrieveMBBasicOK (291) Got Basic Release Info from MusicBrainz:
[08-04-26 14:40:01.7398] Plugins::CDplayer::CDhandler::retrieveMBBasicOK (292) <?xml version="1.0" encoding="UTF-8"?><metadata xmlns="http://musicbrainz.org/ns/mmd-1.0#" xmlns:ext="http://musicbrainz.org/ns/ext-1.0#"><release-list><release id="7362e235-8e76-4b6d-96a2-6ae28f2ec5ce" type="Album Official" ext:score="100"><title>The Visit</title><text-representation language="ENG" script="Latn"/><asin>B000002LT2</asin><artist id="c1e5344e-1bff-4727-9417-a4f55e41b5ff" type="Person"><name>Loreena McKennitt</name><sort-name>McKennitt, Loreena</sort-name><life-span begin="1957-02-17"/></artist><release-event-list><event date="1991" country="CA" catalog-number="75151" barcode="090317515120" format="CD"/><event date="1991" country="DE" catalog-number="9031-75151-2" barcode="090317515120" format="CD"/><event date="1991" country="US"/></release-event-list><disc-list count="7"/><track-list count="9"/></release></release-list></metadata>
[08-04-26 14:40:01.7435] Plugins::CDplayer::CDhandler::renderAsOPML (387) renderasOPML called
[08-04-26 14:40:01.7442] Plugins::CDplayer::CDhandler::saveCDTOC (574) creating infobrowser menu file: /Users/danco/Music/Playlists/CDplayerCDTOC.opml
[08-04-26 14:40:01.7447] Plugins::CDplayer::CDhandler::ReadCDTOCSuccessCall back (339) setmode success - now display MB info
[08-04-26 14:40:11.3586] Plugins::CDplayer::CDPLAY::new (68) Full URL= cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150 Format=flc
[08-04-26 14:40:11.3666] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-26 14:40:11.4464] Plugins::CDplayer::CDPLAY::close (137) closing cdda2wav stream to SC

bpa
2008-04-26, 07:59
Don't worry about the "no sound support configured" - that command is only used to list the CD's index and it worked OK.

The MusicBrainz and FreeDB databases get overloaded from time to time either the network or the number of users and so the request is either denied or takes a long time (30 secs). Sometimes the initial connection take longer than subsequent ones as DNS has to work out the host ip address.

The lines in the log that worries me are


08-04-26 14:40:11.3586] Plugins::CDplayer::CDPLAY::new (68) Full URL= cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKe nnitt&TrackTitle=All%20Souls%20Night&TrackArtist=& Lengths=23180&Offsets=150 Format=flc
[08-04-26 14:40:11.3666] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKe nnitt&TrackTitle=All%20Souls%20Night&TrackArtist=& Lengths=23180&Offsets=150
[08-04-26 14:40:11.4464] Plugins::CDplayer::CDPLAY::close (137) closing cdda2wav stream to SC

The "new" which is starting a stream and the "close" are only 0.1 apart which makes me think the "cdplay" filetype is not set up correct.

Are all the 3 cdplay file types (under Settings/Advanced/Filetypes) enabled ?

danco
2008-04-26, 08:39
Yes, all three are as they should be. Precisely, the file types under CD player show as

FLAC cdda2wav/flac
MP3 cdda2wav/lame
WAV cdda2wav

I still can't get tracks to play. I also experimented with disabling some of the types, in case some helper app wasn't being found, but that did not seem to work.

Is cdda2wav being called during the process of identifying the CD? I assumed that it was. But if not, there is the possibility that it is not in a place where it is recognised.

You remember that with AlienBBC there was an issue when mplayer was put in /usr/local/bin, and this had to be dealt with. Could the same be a problem with cdda2wav? I do prefer putting my own stuff in /usr/local/bin, leaving /usr/bin and /usr/sbin for Apple-installed items, but I can move it if necessary.

I am not sure whether /usr/local/bin is in paths that are routinely checked. I know it used to be, but that may have changed when I upgraded from Tiger.

bpa
2008-04-26, 08:50
It's possible that SC is not finding the cdda2wav binary but if the types are enabled then SCs has found it. Unlike AlienBBC there is no intermediate shell script.

Can you check wehther the command line that is beingf issued to extract a track is working. The command below should extract Track 1 into a file called audio.wav

cdda2wav -S 4 --output-format raw -gui output-endianess=little device=IODVDServices -track 1

If the above works - can you try the following which is exactly what CDplayer will output for OSX.

cdda2wav -S 4 --output-format raw -gui output-endianess=little dev=IODVDServices -track 1

danco
2008-04-26, 09:13
It's possible that SC is not finding the cdda2wav binary but if the types are enabled then SCs has found it. Unlike AlienBBC there is no intermediate shell script.

Can you check wehther the command line that is beingf issued to extract a track is working. The command below should extract Track 1 into a file called audio.wav


This seems to be (part of) the problem.

The track extracts ok, but not into audio.wav.

It gives an audio.raw file and an associated audio.inf

bpa
2008-04-26, 09:26
I think things are quite good.

The filename shouldn't be the issue as it is output to stdout and piped into Lame or Flac when run by SC.

If both commands worked - there must be something else.

Can you do a log - starting just when requesting to play a CD track from the track list. This log needs plugin.cdplayer set to DEBUG and player.source set to INFO.

If the log file is big - save it as a plain text file (.txt), if necessary compress it (e.g. zip, gzip) and then attach to a post.

danco
2008-04-26, 09:56
Here is the zipped log file.

bpa
2008-04-26, 13:48
The log shows everything OK but for some reason the command to read a track doesn't execute. Since there is no copy of the actual command, I have added an extra log command to the CDPLAY.pm file - the modified version is attached. Can you replace the current CDPLAY.pm and restart SC.

Then repeat the playing a track with plugin.cdplayer set to DEBUG.

The log will have a line with "About to execute" similar to the one below


[08-04-26 21:33:47.5841] Plugins::CDplayer::CDPLAY::new (120) SetCurrentTitle for cdplay://1?MBDiscid=2mVIepbyx8bBXBh4.pTbt.NJ5as-&AlbumTitle=Urban%20Hymns&AlbumArtist=The%20Verve&TrackTitle=Bitter%20Sweet%20Symphony&TrackArtist=&Lengths=26882&Offsets=150
[08-04-26 21:33:47.6047] Plugins::CDplayer::CDPLAY::new (126) About to execute: '"/usr/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little --quiet dev=/dev/cdrom -track 1 - | "/home/repos/slim/7.0/trunk/server/Bin/i386-linux/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'
[08-04-26 21:34:01.4745] Plugins::CDplayer::CDPLAY::close (157) closing cdda2wav stream to SC


- can you copy the line to a post and check the path for cdda2wav.

danco
2008-04-26, 14:38
Here's a portion of the log, as requested. I wondered if there could be a permissions issue, but it doesn't look like it, as permissions are -rwxr-x-r-x.


[08-04-26 22:19:54.5198] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-26 22:19:54.5235] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/usr/local/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little --quiet dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'
[08-04-26 22:19:54.5283] Slim::Player::Source::openSong (1716) remoteURL is a song (audio): cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-26 22:19:54.5338] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-26 22:19:54.5340] Slim::Player::Source::openSong (1742) remoteURL command - type flc format flc
[08-04-26 22:19:54.5342] Slim::Player::Source::openSong (1743) remoteURL stream format : flc
[08-04-26 22:19:54.5574] Slim::Player::Source::playmode (401) fe:df:a9:6f:06:7b New play mode: play
[08-04-26 22:19:54.5601] Slim::Player::Transporter::play (99) Setting DigitalInput to 0 for [cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150]
[08-04-26 22:19:54.5603] Slim::Player::Transporter::setDigitalInput (179) Switching to digital input 0
[08-04-26 22:19:54.5654] Slim::Player::Source::playmode (556) fe:df:a9:6f:06:7b: Current playmode: play
[08-04-26 22:19:54.6430] Slim::Utils::Misc::msg (1241) Warning: [22:19:54.6428] Use of uninitialized value in concatenation (.) or string at /Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Source.pm line 2344.
[08-04-26 22:19:54.6433] Slim::Player::Source::readNextChunk (2343) end of file or error on socket, opening next song, (song pos: 8282(tell says: . 0), totalbytes: )
[08-04-26 22:19:54.6435] Slim::Player::Source::gotoNext (1206) Opening next song...
[08-04-26 22:19:54.6437] Plugins::CDplayer::CDPLAY::close (139) closing cdda2wav stream to SC

bpa
2008-04-26, 15:03
I don't believe it could be permission as cdda2wav had to be run to get the track index.

I'm wondering whether there is some command option which is not supported on OSX but itr is unlikely since you already ran the cdda2wav command to play a track.

To see if there are any error messages when the command is being run, you need to run Squeezecenter from a Terminal prompt. Before running it - change custom-convert.conf and remove "--quiet" from the cdda2wav lines.

Error message from lame or cdda2wav will get mixed in with SC log message.

danco
2008-04-26, 15:55
I ran SqueezeCenter from the command line ok.

However, when I tried to play a CD track, the Terminal just filled up with loads of lines flashing past before I could stop things. As far as I can see, this was repeated attempts to play the track, and therefore repeated lines.

I *think* this part of the display does cover everything.

You can see there is something a bit weird, as I had unmounted the CD and SoftSqueeze was showing the name of the CD and its tracks, which should mean that cdda2wav was workig as it should, and yet there is a complaint about it.

[08-04-26 23:19:35.6885] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-26 23:19:35.6918] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/usr/local/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little - dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'
/usr/local/bin/cdda2wav: There is no sound support configured!
[08-04-26 23:19:35.7053] Slim::Player::Source::openSong (1716) remoteURL is a song (audio): cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-26 23:19:35.7081] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-26 23:19:35.7084] Slim::Player::Source::openSong (1742) remoteURL command - type flc format flc
[08-04-26 23:19:35.7086] Slim::Player::Source::openSong (1743) remoteURL stream format : flc
/usr/local/bin/cdda2wav: No such file or directory. No matching device found.. Cannot open SCSI driver.
/usr/local/bin/cdda2wav: For possible targets try 'cdda2wav -scanbus'. Make sure you are root.
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'.
[08-04-26 23:19:35.7210] Slim::Player::Source::playmode (401) fe:df:a9:6f:06:7b New play mode: play
[08-04-26 23:19:35.7241] Slim::Player::Transporter::play (99) Setting DigitalInput to 0 for [cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150]
[08-04-26 23:19:35.7245] Slim::Player::Transporter::setDigitalInput (179) Switching to digital input 0
[08-04-26 23:19:35.7295] Slim::Player::Source::playmode (556) fe:df:a9:6f:06:7b: Current playmode: play
[08-04-26 23:19:35.7402] Slim::Utils::Misc::msg (1241) Warning: [23:19:35.7399] Use of uninitialized value in concatenation (.) or string at /Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Source.pm line 2344.
[08-04-26 23:19:35.7422] Slim::Player::Source::readNextChunk (2343) end of file or error on socket, opening next song, (song pos: 8282(tell says: . 0), totalbytes: )
[08-04-26 23:19:35.7430] Slim::Player::Source::gotoNext (1206) Opening next song...
[08-04-26 23:19:35.7434] Plugins::CDplayer::CDPLAY::close (139) closing cdda2wav stream to SC

bpa
2008-04-26, 16:00
Is there an error after editing the custom-convert.conf file ? It looks like there is a "-" left over in the conf file just after the "little"

Before:
About to execute: '"/usr/local/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little --quiet dev=IODVDServices -track 1 - |


After:
About to execute: '"/usr/local/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little - dev=IODVDServices -track 1 -

danco
2008-04-26, 16:15
I am not sure how cdda2wav is supposed to work as regards mounting and unmounting.

But the sequence I seem to get is the following (if my head is not in too much of a whirl).

Insert CD, and it shows up on the desktop.

Open Disk Utility, which shows the CD as mounted, and use Disk Utility to unmount it.

Run the CDplayer plugin, which gets the track information.

The CD is now mounted, it seems. Anyway, it shows on the desktop, and Disk Utility says it is mounted.

Also, I checked that using cdda2wav in Terminal just to get the table of contents mounts the disk.

So it is looking as though once cdda2wav has been run once it relinquishes control to the standard Mac interface, and so can't get it back when it is neededlater for playing a track.

Or is my lack of detailed knowledge of cdda2wav showing?


.

bpa
2008-04-26, 16:27
cdda2wav is pretty basic - it just accesses the CD drive through the standard Linux CDROM interface. However I think OSX has some special behaviour to simplify things for the user. Your ignorance of cdda2wav is unfortunately matched by my ignorance of OSX.

I came across the following when trying to sort out CDDA2WAV options. cdrecord is partner app to cdda2wav - cdrecord burns CDs. If the text is still valid, then it looks like not only must the CDROM be unmounted but also autodiskmount must be killed. Is there still an autodiskmounter in OSX ?


Ripping CDs to .wav for cdrecord via cdda2wav:
First, kill the autodiskmount process.
You can start it again as:
/sbin/autodiskmount -va
Then:
cdda2wav -D IOCompactDiscServices -t 3 bedrock
will drop track 3 into bedrock.wav (and bedrock.info)
and keep doing all the tracks you want.
If you want to eject a CD, you will need to:
/sbin/autodiskmount -va
hdiutil eject disk1 (get name from autodisk output)
kill autodiskmount again
Or, maybe after killing /sbin/autodiskmount once and restarting it,
it won't automount CDs anymore. Hm. :)
This will temp. mount the disk. Not sure yet how to
get autodiskmount to take control again. (short of reboot)
sudo mount -t cddafs /dev/disk1 /Volumes/Audio\ CD/
You can use Quicktime to see how long tracks are.
Or, use cdrecord -dummy to see if it will fit:
ls *.wav > toc
edit toc
cdrecord -v -dummy speed=8 -audio `cat toc`

NewBuyer
2008-04-26, 18:58
The DDU1615 is quite a fast (48x) DVDROM/CDROM drive - I was worried it might be a very slow drive.

I have an old DDU1613 (40x) - I installed in on an XP system and tested it and it worked OK with CDplayer. The DDU1615 is the next generation and I think should work as well.

What is the firmware rev in the DDU1615. If you are not sure run "cdda2wav -scanbus" in a command prompt window. The 4 letter code after the SONY name is the rev. I think it should be something like FRS3 or GYS1 or GYS2. If your PC is a Dell there are firmware updates on the Dell site.


The "-S 4" makes the drive run at 4x speed. To play a CD you only need 1x speed but to allow for buffering I chose 4x. I found if the drive ran at full aspeed (e.g. 40x 48x) - it would be reading ahead and if the user skipped tracks backwards - the drive had to slow down from a high speed, reposition and re-start. I found using 4x - skipping track had less delay. Also I couldn't get a Sony DVD-RW drive to work properly (same symptoms as you describe) until the speed was lowered.

Hi bpa,
The firmware on my Sony DDU1615 DVD-ROM is identified as GYS1 (Feb 24, 2006). I custom-build PC's, this machine is my own build. Do you think there is still hope, for me to get CDPlayer working on my Windows XP rig? If so, I will continue to try, with your kind help...

danco
2008-04-27, 00:59
autodiskmount does exist on my Mac but the manual for it says that it is deprecated and only present for backward compatibility. There are mount and umount commands. Issuing the mount command lists the mounted volumes and the line relevant to the CD is

/dev/disk1 on /Volumes/The Visit (cddafs, local, nodev, nosuid, read-only, noowners)

I tried using umount to unmount the CD, but I evidently did not have the correct syntax.

I am now pretty certain that this remounting is the issue.

I did the following. Insert disk and unmount it.

From the Terminal, type

cdda2wav dev=IODVDServices -verbose-level=toc -N -g -J

This produces sensible output.

Then did the same thing again. This time I got the complaint, similar to the one in the last log.

bpa
2008-04-27, 01:17
The autodiskmount command may be deprecated but the process may still be in use and running (i.e. control is through another application).

Can you check if the process is running ?

danco
2008-04-27, 01:26
As I said, Activity Monitor (which lists all processes) did not show it.

Anyway, after a fair bit of Google search, I have found a syntax to unmount the CD )I am not sure if /dev/disk1 would be correct if the CD is in an external drive, but we can try that later).

diskutil umount /dev/disk1

did it.

bpa
2008-04-27, 04:38
Newbuyer,

I can't think of a reason why cdda2wav won't work on your system but it may need some tests to find the correct settings.

First - you need to be able to reproduce the fault at will. Then it can be determined what settings work.

I found that if I started cdda2wav ripping a track midway through CD, interrupted it and started cdda2wav again this time ripping an earlier track - usually the CDROM went crazy. It would be interested to see if your system does the same. Try the following assuming you have done "cdda2wav -scanbus" and found the triplet for your drive.

1. Eject CD and re-insert CD. This resets internal CDROM firmware. Make sure it is a CD without any data track and you acknowledge windows prompt about what to do with CD - choose no action.

2. Issue the following command (with your tripplet and not 0,0,0
cdda2wav -S 4 --output-format raw -gui output-endianess=little -device 0,0,0 -track 6

3. CTRL/C when about 20% has been reached.

4. At the prompt with no delay, issue the following command (with your tripplet and not 0,0,0
cdda2wav -S 4 --output-format raw -gui output-endianess=little -device 0,0,0 -track 2

bpa
2008-04-27, 05:18
Anyway, after a fair bit of Google search, I have found a syntax to unmount the CD )I am not sure if /dev/disk1 would be correct if the CD is in an external drive, but we can try that later).

diskutil umount /dev/disk1

did it.


Does this mean you can do consecutive cdda2wav commands without "no matching device" errors ?

danco
2008-04-27, 05:55
Yes, that's what I meant. I've only done a quick check.

But trying

cdda2wav dev=IODVDServices -verbose-level=toc -N -g -J

followed by the same command again produced sensible output the first time and a complaint the second (plus I could see the CD on my desktop after the first command)

whereas giving the command

diskutil umount /dev/disk1

followed by the cdda2wav command a second time worked with no errors.

The diskutil command has to be issued between the two cdda2wav commands, not at the beginning.

bpa
2008-04-27, 09:07
I can create a shell script so that when playing a track diskutil umount is always run before playing cdda2wav but that would be a stopgap.

The ideal situation is to find out how to tell OSX to leave the CDROM drive alone.

danco
2008-04-27, 15:24
The ideal situation is to find out how to tell OSX to leave the CDROM drive alone.

I could ask around, but I am not sure exactly what I would need to ask. I looked in the manual pages for diskutil, but did not see anything relevant.

bpa
2008-04-27, 16:05
It looks like autodiskmount has been replaced by diskarbitrationd to which diskutil "talks". diskarbitrationd seems to manage mounts/dismounts of volumes/disk through diskutil - this prevent users doing umount on a drive if others areusing it.

diskarbitrationd uses the file /etc/fstab. Can you post a copy of your fstab to see if this is basis of "auto" setting or perhaps something else such as

Can you also check the file /etc/hostconfig for entries which are similar to the following:
AUTOCONFIG=-YES-
AUTODISKMOUNT=-REMOVABLE-
AUTOMOUNT=-YES-

danco
2008-04-28, 01:44
I think Apple is changing things as time goes by. There is no file by the exact name fstab in /etc. There is a file fstab.hd, but this says

IGNORE THIS FILE.
This file does nothing, contains no useful data, and might go away in
future releases. Do not depend on this file or its contents.

And /etc/hostconfig says

# This file is going away

AFPSERVER=-NO-
AUTHSERVER=-NO-
AUTOMOUNT=-YES-
NFSLOCKS=-AUTOMATIC-
NISDOMAIN=-NO-
TIMESYNC=-NO-
QTSSERVER=-NO-
WEBSERVER=-NO-
SMBSERVER=-NO-
SNMPSERVER=-NO-

Chasman666
2008-04-28, 03:12
The genius of people in this community never ceases to amaze me and CDplayer is just another example - a brilliant add-on that fills a function hole. Thanks to all who spend their free time getting things working for others and in this particular case to bpa. I hope that Logitech/Slim realise what they have here and never take it for granted...

Charlie

danco
2008-04-29, 14:02
I have done a little bit of asking around (I could do more). One answer I got seems so obvious that you must have thought of it and rejected it.

"Just replace all the calls to cdda2wav with calls to a procedure which
unmounts first then calls cdda2wav"

bpa
2008-04-29, 14:24
See post #76.( http://forums.slimdevices.com/showpost.php?p=296066&postcount=76 )

The issues I have with unmounted before playing a track is there may be a delay before starting to play a track also delays may result in SC closing pipe. Also the script will have to be edited by the user to provide the right disk to unmount (e.g. disk1). If the user gives wrong disk then strange errors may happen. I would prefer to minimise user config that cannot be controlled. As I said in post #76 - it would be a stopgap.

The fact that Automount=Yes in Hostconfig - means there is some process automounting and it should be possible to stop it. However without a Mac onhand I was going through Apple developer reference ( http://developer.apple.com/reference/MacOSX/index-date.html#//apple_ref/doc/uid/TP30001281-TP30000471 )

I hadn't got around to writing the script but this is roughly how it would be
1. change in custom-convert.conf [cdda2wav] to [cdda2wavosx.sh]
2. In Plugins/CDplayer/Bin create an executable shell script called cdda2wavosx.sh
3. I need to think a bit about the script cdda2wavosx.sh as cdda2wav can be badly behaved.

bpa
2008-04-29, 17:08
A simple approach to test use of shell script.

cdda2wav is called many times so rather than edit the source files do the following.

1. rename the current /usr/local/bin/cdda2wav to /usr/local/bin/cdda2wavreal. Check that it still runs with new name. (I have assumed cdda2wav is in /usr/local/bin )
2. Copy code below into a file called cdda2wav in Plugins/CDplayer/Bin. Make it executable.
3. Edit the script file to make the diskutil command run on your system.
4. Test script with the same params as previous runs of cdda2wav. There should be no difference in output.
5. If all OK - try with CDplayer plugin with SC. If SC is run from Terminal - when script is run the echo message will be displayed.



#!/bin/sh
app=cdda2wavreal

if [ -x /usr/local/bin/$app ] ; then
app=/usr/local/bin/$app
fi
# Next line is only a guess - needs to be edited but redirection of stdout (1) is essential
echo "cdda2wav script running " 1>&2
diskutil unmount /dev/disk1 1>&2
"$app" $*

danco
2008-04-30, 01:43
The script works fine by itself.

Trying to play a track fails. It's a bit odd, as the CD is definitely unmounted, but the log seems to indicate that it thinks it is mounted. Here's the log.

[08-04-30 09:28:10.5135] Slim::Player::Source::nextsong (1556) The next song is number 0, was 0
[08-04-30 09:28:10.5142] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-30 09:28:10.5144] Slim::Player::Source::gotoNext (1271) Playing out before starting next song. (old format: flc, new: flc)
[08-04-30 09:28:10.5146] Slim::Player::Source::playmode (298) fe:df:a9:6f:06:7b: Switching to mode playout-play from play
[08-04-30 09:28:10.5152] Slim::Player::Source::playmode (401) fe:df:a9:6f:06:7b New play mode: playout-play
[08-04-30 09:28:10.5161] Slim::Player::Source::playmode (556) fe:df:a9:6f:06:7b: Current playmode: playout-play
[08-04-30 09:28:10.5164] Slim::Player::Source::dropStreamingConnection (1315) No pending chunks - we're dropping the streaming connection
[08-04-30 09:28:10.5169] Slim::Player::Source::readNextChunk (2402) fe:df:a9:6f:06:7b: Can't opennext, returning no chunk.
[08-04-30 09:28:10.6142] Slim::Player::Source::decoderUnderrun (582) fe:df:a9:6f:06:7b: Decoder underrun while this mode: playout-play
[08-04-30 09:28:10.6145] Slim::Player::Source::nextsong (1556) The next song is number 0, was 0
[08-04-30 09:28:10.6154] Slim::Player::Source::decoderUnderrun (595) Track failed before playback, marking as played
[08-04-30 09:28:10.6158] Slim::Player::Source::playmode (298) fe:df:a9:6f:06:7b: Switching to mode playout-play from playout-play
[08-04-30 09:28:10.6159] Slim::Player::Source::playmode (305) Already in playmode playout-play : ignoring mode change
[08-04-30 09:28:10.6162] Slim::Player::Source::nextsong (1556) The next song is number 0, was 0
[08-04-30 09:28:10.6168] Slim::Player::Source::skipahead (873) **skipahead: opening next song
[08-04-30 09:28:10.6171] Slim::Player::Source::gotoNext (1206) Opening next song...
[08-04-30 09:28:10.6174] Slim::Player::Source::nextsong (1556) The next song is number 0, was 0
[08-04-30 09:28:10.6179] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-30 09:28:10.6183] Slim::Player::Source::gotoNext (1293) opening next song (old format: flc, new: flc) current playmode: playout-play
[08-04-30 09:28:10.6185] Slim::Player::Source::streamingSongIndex (1350) Adding song index 0 to song queue
[08-04-30 09:28:10.6187] Slim::Player::Source::streamingSongIndex (1371) Song queue is now 0,0
[08-04-30 09:28:10.6189] Slim::Player::Source::skipahead (879) **skipahead: restarting
[08-04-30 09:28:10.6191] Slim::Player::Source::playmode (298) fe:df:a9:6f:06:7b: Switching to mode play from playout-play
[08-04-30 09:28:10.6195] Slim::Player::Source::resetSong (1595) Resetting song buffer.
[08-04-30 09:28:10.6200] Slim::Player::Source::openSong (1690) Trying to open: cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-30 09:28:10.6202] Slim::Player::Source::openSong (1704) URL is remote (no direct streaming) [cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150]
[08-04-30 09:28:10.6204] Slim::Player::ProtocolHandlers::openRemoteStream (66) Trying to open protocol stream for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-30 09:28:10.6207] Slim::Player::ProtocolHandlers::openRemoteStream (70) Found handler for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150 - using Plugins::CDplayer::CDPLAY
[08-04-30 09:28:10.6245] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: cdplay Command: [cdda2wav] -S 4 --output-format raw -gui output-endianess=little - $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -
[08-04-30 09:28:10.6247] Plugins::CDplayer::CDPLAY::new (68) Full URL= cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150 Format=flc
[08-04-30 09:28:10.6406] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-30 09:28:10.6441] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/Bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little - dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'
[08-04-30 09:28:10.6576] Slim::Player::Source::openSong (1716) remoteURL is a song (audio): cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
cdda2wav script running
[08-04-30 09:28:10.6620] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-30 09:28:10.6623] Slim::Player::Source::openSong (1742) remoteURL command - type flc format flc
[08-04-30 09:28:10.6627] Slim::Player::Source::openSong (1743) remoteURL stream format : flc
[08-04-30 09:28:10.6740] Slim::Player::Source::playmode (401) fe:df:a9:6f:06:7b New play mode: play
[08-04-30 09:28:10.6757] Slim::Player::Transporter::play (99) Setting DigitalInput to 0 for [cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150]
[08-04-30 09:28:10.6764] Slim::Player::Transporter::setDigitalInput (179) Switching to digital input 0
[08-04-30 09:28:10.6826] Slim::Player::Source::playmode (556) fe:df:a9:6f:06:7b: Current playmode: play
[08-04-30 09:28:10.6843] Plugins::CDplayer::CDPLAY::getMetadataFor (157) getMetadatafor called
[08-04-30 09:28:10.7338] Plugins::CDplayer::CDPLAY::getMetadataFor (157) getMetadatafor called
[08-04-30 09:28:10.8060] Slim::Player::Squeezebox::buffering (303) Buffering... 0 / 20480
/usr/local/bin/cdda2wavreal: There is no sound support configured!
/usr/local/bin/cdda2wavreal: No such file or directory. No matching device found.. Cannot open SCSI driver.
/usr/local/bin/cdda2wavreal: For possible targets try 'cdda2wav -scanbus'. Make sure you are root.
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'.
[08-04-30 09:28:11.2039] Slim::Utils::Misc::msg (1241) Warning: [09:28:11.2037] Use of uninitialized value in concatenation (.) or string at /Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Source.pm line 2344.
[08-04-30 09:28:11.2063] Slim::Player::Source::readNextChunk (2343) end of file or error on socket, opening next song, (song pos: 8282(tell says: . 0), totalbytes: )
[08-04-30 09:28:11.2066] Slim::Player::Source::gotoNext (1206) Opening next song...
[08-04-30 09:28:11.2069] Plugins::CDplayer::CDPLAY::close (139) closing cdda2wav stream to SC

bpa
2008-04-30, 02:59
Can you double check the custom-convert.conf file - I can't be sure but it looks like a a dash (aka "-") has been inserted) between "little" and "dev=".


output-endianess=little - dev=IODVDServices


Perhaps left over from removing "--quiet". This may be causing the device problem - in which case the script is not necessary. To check.

1. Remove "-"
2. rename cdda2wavreal back to cdda2wav
3. rename CDplayer/Bin/cdda2wav to cdd2wavscript (anything will do just not cdda2wav)
4. REstart SC and test

If dash was not present or If above doesn't work then rename everything back again to get the script working and modify script to get more info.

I suggest the following to (i) verify the command and (ii) check status of disks. Edit disk name as appropriate.



#!/bin/sh
app=cdda2wavreal

if [ -x /usr/local/bin/$app ] ; then
app=/usr/local/bin/$app
fi
echo "cdda2wav script running " 1>&2
echo "command: $* "1>&2

# Next line is only a guess - needs to be edited but redirection of stdout (1) is essential
diskutil unmount /dev/disk1 1>&2
diskutil info /dev/disk1 1>&2
"$app" $*

bpa
2008-04-30, 03:27
I just tested my version of script - with the added "-" and I get the same error as you do.

The problem is the additional dash - I mentioned this in post #66 but you seem to have missed it.

Get rid of the erroneous dash in custom-convert.conf

danco
2008-04-30, 05:13
I will see what happens with your new version of the code.

I looked at my version of custom-convert.conf, and it reads

#
# cdd2wav Linux/ OSX verson
#
cdplay wav * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$

cdplay mp3 * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$ - | [lame] --silent -r -x -q $QUALITY$ -b $BITRATE$ - -

cdplay flc * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -

Should the dash after $FILES$ be there? Or is there something more seriously wrong with my custom-convert.conf?

I tried, in case this dash was the problem, disabling the mp3 and flac formats in the File Types setting for CDplayer, but that did not help.

bpa
2008-04-30, 05:27
Your log file shows the following - I have highlighted the dash in bold red. It will be after "little" and before $FILE$ in the conf file.


[08-04-30 09:28:10.6441] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/Bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little - dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'


If it is not in the custom-convert.conf file - then I apologise it must be in the OSX section of code. In my file - CDPLAY.pm the line of code would be


} elsif (Slim::Utils::OSDetect::OS() eq 'mac') {
$command =~ s|\"cdplay://(\d+)\"| dev=$cddevice -track $1|;


I don't have an extra "-" in the source code. What about on your system ?

danco
2008-04-30, 06:23
Now this is getting weird. I've given you my custom-convert.conf file, which does not have an extra dash in it.

And neither does my CDPLAY.cm file, where the relevant bit reads

} elsif (Slim::Utils::OSDetect::OS() eq 'mac') {
$command =~ s|\"cdplay://(\d+)\"| dev=$cddevice -track $1|;

which seems to be the same as yours.

bpa
2008-04-30, 07:08
Looking back at previous logs
The following has "--quiet" and no extra "-" - it makes me think the issue is still in the conf file. However the remainder of the log still showed that the device problem seemed to be presetn so the script with unmount may still be necessary.


[08-04-26 22:19:54.5235] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/usr/local/bin/cdda2wav" -S 4 --output-format raw -gui output-endianess=little --quiet dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'


I'd still like to find the source of this stray "-" as it may be confusing things.
When SC is starting - I think SC reads all the custom-convert.conf files it can find in any subdirectory of server/Plugins and server/Slim/Plugin. So if you have a backup of CDplayer's custom-convert.conf somewhere in the Plugins tree - SC could be reading that - and in the case of more than one set of rules for "cdplay", the last set of rules for "cdplay" processed will be the ones that are used.

Can you check for other copies of custom-convert.conf which have cdplay rules.

danco
2008-04-30, 07:46
Can you check for other copies of custom-convert.conf which have cdplay rules.

Nothing involving cdplay except the one in my CDplayer folder.

Except for one elsewhere on my drive (the original unpacked CDplayer in a folder where I keep installers).

bpa
2008-04-30, 07:58
It's definitely in a custom-convert.conf file - from you post #84 - in the log where the matching rule is found - this is before any of my code changes it.


[08-04-30 09:28:10.6245] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: cdplay Command: [cdda2wav] -S 4 --output-format raw -gui output-endianess=little - $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -


To confirm CDplayer is using the custom-convert.conf file - I suggest changing some of the files text and do another log.

for example. Change


cdplay flc * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -


to


cdplay flc * *
[cdda2wav] -S 4 -gui --output-format raw output-endianess=little $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -


If the change is not in the log file - then there is a hidden conf file. If the change is in the log - check for the extra "-". This change needs a restart of SC.

danco
2008-04-30, 08:53
I have changed the custom-convert.conf file, but am about to go out, and testing will have to wait till tomorrow.

Thanks for all your work, by the way.

danco
2008-04-30, 09:03
Just to help me understand about the extra dash.

Am I right in saying that it is the difference between

output-endianess=little - $FILE$ -

which occurs in the log

and

output-endianess=little $FILE$ -

which is in custom-convert.conf

bpa
2008-04-30, 09:53
Am I right in saying that it is the difference between

output-endianess=little - $FILE$ -

which occurs in the log

and

output-endianess=little $FILE$ -


Yes - the conf file provides templates for command to be executed by SC. The "$FILE$" string is replaced by the name of the file/url to be played before trying to execute the command - in this case something like "dev=IODVDServices -track 2".

In the original conf file the line looked like "output-endianess=little --quiet $FILE$ -" and I asked to remove the "--quiet" so that the error message from cdda2wav could be displayed.

cdda2wav expects an output file name to be the last item on the command. If a "-" is provided then cdda2wav thinks stdout is output. Our problem is the extra "-" is before the "dev=" which specifies which CDROM drive to use and so cdda2wav doesn't "see" the device specification and so it complains about missing drive etc.

I'm worried that conf file might have a funny character sequence such as
'L', 'I', 'T', 'T', 'L', 'E', space, space, dash, backspace, space which would mean that the dash is not "seen" when a file is displayed on a screen yet it is in the file.

There is no rush in testing - I'm just finishing up beta2 of CDplayer.

danco
2008-04-30, 15:30
I had a bit of spare time (waiting up for an American friend to call. She is having troubles with the hard drive on her Mac. It's really hard to diagnose from a distance, I have more respect for help desks than I used to have).

Tried using the shell script, and your revised custom-convert.conf.

Here's part of the log, I hope it's enough.

[08-04-30 23:13:14.6069] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: cdplay Command: [cdda2wav] -S 4-gui --output-format raw -gui output-endianess=little $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -
[08-04-30 23:13:14.6072] Plugins::CDplayer::CDPLAY::new (68) Full URL= cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150 Format=flc
[08-04-30 23:13:14.6198] Plugins::CDplayer::CDPLAY::new (101) SetCurrentTitle for cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-30 23:13:14.6239] Plugins::CDplayer::CDPLAY::new (107) About to execute: '"/Users/danco/Library/Application Support/SqueezeCenter/Plugins/CDplayer/Bin/cdda2wav" -S 4-gui --output-format raw -gui output-endianess=little dev=IODVDServices -track 1 - | "/Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -'
[08-04-30 23:13:08.1202] Slim::Player::Source::openSong (1716) remoteURL is a song (audio): cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150
[08-04-30 23:13:08.1261] Slim::Player::TranscodingHelper::getConvertCommand (302) Matched Format: flc Type: flc Command: -
[08-04-30 23:13:08.1276] Slim::Player::Source::openSong (1742) remoteURL command - type flc format flc
[08-04-30 23:13:08.1280] Slim::Player::Source::openSong (1743) remoteURL stream format : flc
cdda2wav script running
[08-04-30 23:13:08.1493] Slim::Player::Source::playmode (401) fe:df:a9:6f:06:7b New play mode: play
[08-04-30 23:13:08.1527] Slim::Player::Transporter::play (99) Setting DigitalInput to 0 for [cdplay://1?MBDiscid=vS_.lOC.YOss1.Oh_VcHYVrbWvI-&AlbumTitle=The%20Visit&AlbumArtist=Loreena%20McKennitt&TrackTitle=All%20Souls%20Night&TrackArtist=&Lengths=23180&Offsets=150]
[08-04-30 23:13:08.1530] Slim::Player::Transporter::setDigitalInput (179) Switching to digital input 0
[08-04-30 23:13:08.1694] Slim::Player::Source::playmode (556) fe:df:a9:6f:06:7b: Current playmode: play
[08-04-30 23:13:08.2910] Slim::Player::Squeezebox::buffering (303) Buffering... 0 / 20480
[08-04-30 23:13:08.6948] Slim::Player::Squeezebox::buffering (303) Buffering... 0 / 20480
/usr/local/bin/cdda2wavreal: Bad Option: -S.
use 'cdda2wav -help' to get more information.
[08-04-30 23:13:08.7387] Slim::Utils::Misc::msg (1241) Warning: [23:13:08.7384] Use of uninitialized value in concatenation (.) or string at /Users/danco/Library/PreferencePanes/SqueezeCenter.prefPane/Contents/server/Slim/Player/Source.pm line 2344.
[08-04-30 23:13:08.7390] Slim::Player::Source::readNextChunk (2343) end of file or error on socket, opening next song, (song pos: 8282(tell says: . 0), totalbytes: )
[08-04-30 23:13:08.7392] Slim::Player::Source::gotoNext (1206) Opening next song...
[08-04-30 23:13:08.7396] Plugins::CDplayer::CDPLAY::close (139) closing cdda2wav stream to SC



By the way, I noticed one other thing which must be relevant somehow. Different configurations (unfortunately I am not sure which is which) seem to get stuck at different places. I have seen the information on the SoftSqueeze screen get no further than "Checking Stream" with some setups and get to "Connecting" with others.

bpa
2008-04-30, 15:52
Good & bad news.

1. The extra dash has gone
2. The change you made has an error which I think resulted in the error message (but it indicates it is the conf file in use)


-S 4-gui --output-format raw -gui

There are two "-gui" but more important there is no space between the 4 and the "-gui". There should be a space. This gives the error from the log.


/usr/local/bin/cdda2wavreal: Bad Option: -S.


Regarding Softsqueeze - I'm a bit suspicious of it at the moment given that people have reported this Play/stop/play to get a track going.

Add a space after the "4" and get rid of one of the "-gui" and try again.

danco
2008-04-30, 16:15
I was going to report partial success only.

But you mentioned a SoftSqueeze issue, and it looks as though this had hit me.
Tried playing the track, and the buffering moved up to 12% when it got no further.

Started the track again and IT PLAYED!

A touch ragged at the start, but this may well be SoftSqueeze.

I'll try with my Squeezebox in the morning.

bpa
2008-04-30, 16:24
Sounds promising - I presume this is with the script and the diskutil command before cdda2wav.

A few times I've started a track playing, it plays a few secs of audio, pauses and then continues - I put this down to the getting audio from the CD. It only happens rarely and I've put it down to the fact cdda2wav is being used to get data in realtimewhich is not its main purpose and there is some sort of buffer mismatch.

Some tuning of parameters may be helpful once it is proved there is a reliable way of playing a track.

danco
2008-05-01, 02:53
Yes, it's working fine now!! Many thanks.

To be precise, using the shell script cdda2wav in the Bin folder of CDplayer, the original cdda2wav in /usr/local/bin renamed to cdda2wavreal, and the custom-convert.conf file reading

#
# cdd2wav Linux/ OSX verson
#
cdplay wav * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$

cdplay mp3 * *
[cdda2wav] -S 4 --output-format raw -gui output-endianess=little $FILE$ - | [lame] --silent -r -x -q $QUALITY$ -b $BITRATE$ - -

cdplay flc * *
[cdda2wav] -S 4 -gui --output-format raw output-endianess=little $FILE$ - | [flac] -cs --totally-silent --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 -

I did have one glitch when running SqueezeCenter from the Terminal. For some reason, the CD did not come back after I had stopped playing it. It wasn't even visible in Disk Utility as an unmounted drive. So I had a bit of a hassle ejecting it. But later uses have been fine, so it was probably just an oddity caused by the way I stopped things running.

The CD played fine both as an individual track 1 and playing the whole CD. I didn't do any experimenting on moving between tracks.

bpa
2008-05-01, 03:39
That's great.

I hope to have another beta out in a few days which can use the FreeDB database which has much more CD info (albeit of varying quality). Besides including the OSX stuff, it has a few other bugs fixes (e.g UTF8 characters) and enables caching of database info - so skipping from track to track is quicker.

I'm predefining OSX devices names so that the only installation issue for OSX users will be how to find the name of the drive to unmount and how to edit the script file.

bpa
2008-05-01, 13:27
Danco,

Can you attach a copy of your cdda2wav script file - I want to make sure I have the "diskutil" command syntax correct when putting together tar file for OSX.

danco
2008-05-02, 00:29
Here it is, as you supplied it. The standard cdda2wav in /usr/local/bin was renamed cdd2wavreal

#!/bin/sh
app=cdda2wavreal

if [ -x /usr/local/bin/$app ] ; then
app=/usr/local/bin/$app
fi
# Next line is only a guess - needs to be edited but redirection of stdout (1) is essential
echo "cdda2wav script running " 1>&2
diskutil unmount /dev/disk1 1>&2
"$app" $*

bpa
2008-05-02, 00:37
Thanks - I'm surprised at no changes.

I need to write some install instructions for OSX

What command did you use to find out that "disk1" is your DVD drive ?

Any other install info that you can think of ?

I am going to put the next beta in a new "Annnounce Plugin" thread so I want to get as much info together.

danco
2008-05-02, 03:19
The 'mount' command in Terminal with no parameters lists all the mounted drives.

Playing around with things suggests to me that the internal hard drive will always be disk0 with some suffixes (I have two partitions and they come out at disk0s2 and disk0s3. I think the s1 and s0 suffixes cover partition map info and the like).

External drives seem to have their numbers depending on mount order. I currently have disk2s2 and disk2s3, but the same drives came as disk4 when when I turned them on after some other hard drives.

I feel fairly sure (on general grounds, what else would it be) that for a normal installation the CD/DVD drive will always be disk1. Of course if one had a Mac Pro with two or more internal drives it might be different.

I think you are safe in regarding that as the default and leaving it fixed, with just a note that those with more than one internal hard drive or those using an external CD drive might have to make changes.

The one thing you need to be sure of is that the .tar.gz file unpacks to CDplayer and not to CDplayer 2, which caught me for some time. There seemed nothing on my system that would cause this, so I suspect you had not modified something. Otherwise the installation seemed pretty straightforward, it was only the bug - whatever it was - that caused problems.

You might want to tell people where the plugin goes. It is in ~/Library/Application Support/SqueezeCenter/Plugins. This folder may need to be created or may already exist.

bpa
2008-05-05, 16:56
I just started a thread for CDplayer in 3rd Party Plugins - see http://forums.slimdevices.com/showthread.php?t=47288.

It has the latest version of the CDplayer plugin - there are a few small changes from initial release.

- Support for FreeDB CD database - this has far more CD entries than MusicBrainz although quality of info is mixed. User settings to allow use of either FreeDB, MusicBrainz or neither.
- Fixed some bugs so that UTF8 album/track info is displayed properly.
- OSX support as per testing and also predefine Apple device names.
- Album/Track info is cached so that delays due to network fetches are reduced.