I found some libraries to read wav files (like
libsndfile) but none to
read both mp3 and wav
If such library exists I never heard of it, MP3 patent-related stuff
mixes badly. So you will probably have to use one library for each
format.
You can find the GStreamer framework interesting, since its a wrapper
around many libraries, including wav and mp3 decoders and audio output
devices, so all you have to do is create a chain of GSt modules.
L