1 semester of Training, can I incorporate songs into my program?

I know all the basics of C++ but I although I don't understand the complex stuff, I want to learn.

See, I'm making a study tool for me and my roommate to study for our music class. I want one of the options to be to pick a song from a list (Song 1, Song 2, etc...) and then it'll play that song (or even better just a portion of it) and the user will be asked info about it such as the composer or title of the work.

Is this possible for a relative beginner to do? Where do I start? Can I control when the song stops and what happens when it does, will it just move on to my questions? I've already read about PlaySound and I'm not interested. If you don't wanna patiently explain it to me, links to relevant websites will work I guess.
Well there are two ways to do this.
You either use a 3rd party library from people who know what they are doing and have already done all the hard work for you, like fmod (www.fmod.org) which is really fast (in terms of setting it up and getting results), easy and powerful, or if you want to do it yourself, you need to basically fill an array of samples (a buffer) manually and send it to the sound card using the platform specific API, for Windows one option would be DirectSound.
I don't know if there is anything besides DirectSound since It's the only thing I have ever used.

If you want to do it manually with for example DirectSound and you want to play MP3s you also have to read in the MP3 file yourself, then decompress it and convert it to an array of samples, which can be anything from a byte to 4 byte, depending on sampling depth, then send it to the sound card.
I don't remember ALL the details, but since it's all very much a pain in the ass I suggest you just go with a 3rd party library unless you need more control if you're programming a synthesizer or something ;)

If you still want to try coding it yourself instead, you can either look it up on MSDN or maybe look for a video on YouTube.
But it may be intimidating for beginners.
https://msdn.microsoft.com/en-us/library/windows/desktop/bb318665%28v=vs.85%29.aspx
Here is a video that explains part of it, but It's kind of in the middle of a series and may not be suited for beginners:
https://youtu.be/qGC3xiliJW8?t=16m37s

If you don't use Windows, well, you will have to look for something else because DirectSound is Windows only :)
I highly recommed fmod though. That should also be multi-platform I think.
Don't reinvent the wheel. Find a library that does what you want and use it. You can learn how to do it yourself when you have actual free time ;)
Topic archived. No new replies allowed.