10-21-2019, 12:55 PM
@hifix
That HowTo describes a CD ripping service, not a CD playback service.
I've gotten jammed up with non-moOde tasks ("real life" has a way of raising its ugly head at inconvenient times!) and haven't had time to make sure what Ashley and I did back in July works with moOde 6.3.0.
In the meanwhile, here's a brute-force-and-ignorance approach to playing a CD which doesn't require any additional scripts, services, or modification to Tim's extensive code. Sorry. This description assumes the user knows some basic Linux command line-fu.
1. plug in a USB CD/DVD player. I've used several garden-variety models with success. You should see that /dev/cdrom is now a symlink to /dev/sr0. As root change the permissions of /dev/sr0 to 666. Here's what I see in the /dev directory before and after I've done this
Once in a while I've seen cdrom link to sr1 instead. Not sure why, but if it does, change the permissions on sr1. Either way, this permissions-setting exercise will have to be done each time you plug in a player or reboot (told you this is brute force! This is automated in the work I haven't posted yet).
2. Tim has already compiled MPD to include its cdda plugin. As root, use your favorite editor to create a custom playlist /var/lib/mpd/playlists/CD.m3u with one entry, cdda://, which tells MPD to use the plugin to play a whole disc. Here's the dump of mine where I used the vi editor:
"CD", or whether name you give the .m3u file, will appear among moOde's playlists.
3. Inset a music CD and add the CD playlist to your current playlist (I usually use "clear/add" or "clear/play" to avoid confusion). Here's a screen capture of my playback panel with just the CD playlist added:
![[Image: fJOjUJu.png]](https://imgur.com/fJOjUJu.png)
That's pretty raw
Not even an indication of the number of tracks on the CD. But it plays!
The point of our scripts and mods to Tim's code is to take care of the device permissions, to enumerate the tracks on the CD, to clear the current playlist and then load the CD tracks into it with prettier formatting, and to display a default cover. Hope to get back to them soon.
Regards,
Kent
PS - be sure SoX resampling is disabled. I've had problems with aural dropouts when I had inadvertently left resampling enabled.
That HowTo describes a CD ripping service, not a CD playback service.
I've gotten jammed up with non-moOde tasks ("real life" has a way of raising its ugly head at inconvenient times!) and haven't had time to make sure what Ashley and I did back in July works with moOde 6.3.0.
In the meanwhile, here's a brute-force-and-ignorance approach to playing a CD which doesn't require any additional scripts, services, or modification to Tim's extensive code. Sorry. This description assumes the user knows some basic Linux command line-fu.
1. plug in a USB CD/DVD player. I've used several garden-variety models with success. You should see that /dev/cdrom is now a symlink to /dev/sr0. As root change the permissions of /dev/sr0 to 666. Here's what I see in the /dev directory before and after I've done this
Code:
pi@moode4b:~ $ ls -l /dev|grep cdrom
lrwxrwxrwx 1 root root 3 Oct 21 07:03 cdrom -> sr0
crw-rw---- 1 root cdrom 21, 1 Oct 21 07:03 sg1 # we can ignore this
brw-rw---- 1 root cdrom 11, 0 Oct 21 07:03 sr0
pi@moode4b:~ $ sudo chmod 666 /dev/sr0
pi@moode4b:~ $ ls -l /dev|grep cdrom
lrwxrwxrwx 1 root root 3 Oct 21 07:03 cdrom -> sr0
crw-rw---- 1 root cdrom 21, 1 Oct 21 07:03 sg1 # we can ignore this
brw-rw-rw- 1 root cdrom 11, 0 Oct 21 07:03 sr0
Once in a while I've seen cdrom link to sr1 instead. Not sure why, but if it does, change the permissions on sr1. Either way, this permissions-setting exercise will have to be done each time you plug in a player or reboot (told you this is brute force! This is automated in the work I haven't posted yet).
2. Tim has already compiled MPD to include its cdda plugin. As root, use your favorite editor to create a custom playlist /var/lib/mpd/playlists/CD.m3u with one entry, cdda://, which tells MPD to use the plugin to play a whole disc. Here's the dump of mine where I used the vi editor:
Code:
pi@moode4b:~ $ sudo vi /var/lib/mpd/playlists/CD.m3u
...edit and save file...
pi@moode4b:~ $ cat /var/lib/mpd/playlists/CD.m3u
cdda://
"CD", or whether name you give the .m3u file, will appear among moOde's playlists.
3. Inset a music CD and add the CD playlist to your current playlist (I usually use "clear/add" or "clear/play" to avoid confusion). Here's a screen capture of my playback panel with just the CD playlist added:
![[Image: fJOjUJu.png]](https://imgur.com/fJOjUJu.png)
That's pretty raw

The point of our scripts and mods to Tim's code is to take care of the device permissions, to enumerate the tracks on the CD, to clear the current playlist and then load the CD tracks into it with prettier formatting, and to display a default cover. Hope to get back to them soon.
Regards,
Kent
PS - be sure SoX resampling is disabled. I've had problems with aural dropouts when I had inadvertently left resampling enabled.