Hacker News new | ask | show | jobs
by Jeremysr 4701 days ago
Aw, I was hoping to see that slave mode was fixed. I want to use slave mode to make a music player with my own user interface and library/playlist manager in Ruby without having to worry about how to actually play the music. Unfortunately slave mode in mplayer seems kind of unstable and sometimes even gives the wrong answer (I think it's a known bug). I wasn't aware of mplayer2, I'll have to try that and see if it works any better.

But does anyone know of a program or library with a proper interface for controlling a music player?

2 comments

Have you heard of MPD? I think it's pretty much what you're looking for, there's even a ruby library. Check it out, it's a great piece of software. http://www.musicpd.org/
That or xmms2.
While MPD is probably ideal for your use case, there are lots of toolkits that facilitate this delegation. Many Linux apps utilize GStreamer to do this, including several very prominent ones. Heck, even VLC and mplayer are just "interfaces" on top of decoders. It's pretty uncommon to rewrite this type of code, considering its complexity. There a lot of tools that allow you to reuse media decoders and output frameworks.