Ok, I took an Old 486 running Redhat 6.1 and made a mp3 box for my home stereo. Well it works but theres a couple things I would like it to do...
1) Is there anyway to control mpg123 from a keyboard, or anyway to setup certain keys to run bash scripts or something?
2) Would it be possible to make a script, that would check /mnt/cdrom for mp3 files, and if there were, run mpg123 and if not run a cdplayer, and then if the program is exited, eject the cdrom, wait for it to be closed and start over? Maybe just something close to that would work...
Ok well, its pretty easy the way I did it. All I did was took an old 120mhz 486 ( you really need a low-end pentium), an old cdrom (4x or lower), a small harddisk (about 400MB or so) and a sound-blaster compatible sound card. Then I installed RedHat 6.1, edited fstab so the cdrom would automount, and added a line to /etc/rc.local so mpg123 would automatically start. Of course I stuck a mp3 filled cd in the cdrom. Then all you need is a phono jack to RC cord to plug into your sound card and into your home stereo and viola! its done.
I've looked into a buncha sites about this, and I plan on eventually using LIRC with an old stereo remote to control it, so this is just a temporary thing, and I haven't been able to find out any info about using a keyboard to control it.
It shouldn't be all that hard to make a front-end for mpg123 that controls it from the keyboard. But I don't know of any way you could make a program auto-detect when cd's are inserted. That might not be possible.
Just about any language will let you do it. You could make it so a certain key starts playing the cd, and then a certain key stops it. I'm already getting ideas about how to do it in C. I haven't programmed anything in a while so I might just take on the challenge later. But there'll be no auto-detecting. You'll just have to put in the cd and press enter or something.