-
playing music in C++
Howdy, another random question, me and my friends in uni were wondering if it is possible to play an .mp3 or .wav continously through a simple program.
A simple example would be ideal but not essential, a point in the right direction would be great even.
Thanks for your time
-
A .wav could be played with something called DirectSound, although I don't think it can play .mp3s.
-
Even simpler. PlaySound() can play .wav s... really tricky heh ?
-
Look into fmod, it's a free(?) library that deals with music 'n stuff. If you just want to play .wav's, then PlaySound() (in <windows.h> should work fine. Otherwise, you can look into the mp3 file format at wotsit.org, then write your own decoder and stream the data manually (probably using DirectSound).
I don't believe there's any such thing as a 'simple' example of playing .mp3, although times may have changed.