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.