#include <stdmagic>
using namespace std;
int main()
{
magically_do_something_platform_and_implementation_specific(PLAY_MUSIC, "hello.mpg");
}
By the way, what OS and compiler are you using? :rolleyes:
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Not quite ZZ Top but it's a start!
The Windows Api has a little thing called Beep(), try it ...
// simple sounds via Beep(frequency_hrz, duration_ms)
#include <iostream>
#include <windows.h> // WinApi header file
using namespace std;
int main(int argc, char *argv[])
{
Beep(523.2511,500); // 523.2511 hertz (C5) for 500 milliseconds
Beep(587.3295,500);
Beep(659.2551,500);
Beep(698.4565,500);
Beep(783.9909,500);
cin.get(); // wait
return 0;
}
There are nicer things like sound(), that use the sound chip and midi voices. A little tough for C++. If you want to test it, get BCX free from: http://www.rjpcomputing.com/programming/bcx/devsuite.html
get used to BCXDX and learn to fly with sound and graphics! There are lots of sample files. This goes beyond the usual boring calculator and employee database stuff! You are still learning C/C++ though.
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417