Tools required to build a music player

Hi, I am a relative beginner in c++.
I've covered my c++ fundamentals (loops,conditionals,STL,etc) and now I would like to build a music player to put my knowledge to a test, and also learn more. So it would be very helpful if someone could perhaps tell me the basic tools required to build one,or even nudge me towards any useful resources.

Edit: It seems I need a UI library, an Audio Library, and a decoder
Last edited on
Start simple. Don't go for a full-on GUI right off the bat. For an initial prototype you can do a simple text-based interface where the user has to type in commands like "load <path>", "play", "pause", etc. Or even simpler still, just take a path from command line and play the file from start to finish.

For an audio library you can use PortAudio. It can handle most of the low-level details of dealing with audio devices directly.
http://www.portaudio.com/

I recommend starting with either raw PCM files or simple WAVs (either mono or stereo signed 16-bit samples). If you want to go straight to a compressed format, I think libflac or libogg+libvorbis are probably good options.

I'll reiterate: start simple. Go for something you can see working right away, even if it's super incomplete. You can add functionality later.
A bit of research shows that playing mp3s is very cumbersome, and requires a lot of decoding (i think), so for now I think I will stick to making a working WAV player and then add functionalities as I go on.

I am thinking of using wxWidgets. It seems to have all the 3(UI,audio lib,decoder) inbuilt (or so i've heard).
https://www.youtube.com/watch?v=FOIbK4bJKS8
I am using this youtube video as the reference for gui programming using wxwidgets.

Please do share what you think, and correct me if I am wrong anywhere.

Edit: This tutorial has scared the hell out of me, creating gui in c++ really is tough; I think for now I will create a command based interface like you suggested.
Last edited on
Topic archived. No new replies allowed.