I am making a text-based adventure game in language C. I am using CodeBlocks and the game will be a console application.
Is it possible to put a "background music" thingy in the program? It would make the game much more catchy.
I only know that the music should be in .wav format. But I have only found C# and C++ solutions for this problem (and the C++ solution was a video on YouTube with very bad quality).
So, if it is possible in C, then can someone tell me how to do it?
It would be greatly appreciated! (also, I would like the music to replay itself, since it is only 2 minutes long, but I want it to play over and over as long as the program is running).
Thanks for the help in advance!
There are no portable ways to play the music in C, which means there are very different solutions for DOS, linux, mac and windows. Here is a quick overview of the methods. All of them are somewhat complex:
open file.wav
to play file in the default music player, but this will likely be very annoying to user.