PDA

View Full Version : Sound Maker



Lethal323
11-22-2007, 01:43 AM
My friend wants to know if there is anyway to make it when a program ends for his computer to play a sound? He asked me and I googled it and couldnt find much.

All help would be appriciated...

Moonbat
11-22-2007, 09:37 AM
In C++ you can use \a like so.

#include <iostream>
using namespace std;

int main()
{
cout << "Hello!\a";
return 0;
}

This brings up two questions. What language is your friend coding his program in? Does he want a simple 'bell' noise like the example above, or does he want some sort of music to be played?

Lethal323
11-22-2007, 09:43 AM
Well hes not coding it...

His point is he plays an online game called Silk Road and he bots, well his game crashes alot so he just wants a program that when the program crashes to make a noise(wether its musik or w/e)Hes not the sharpest knife in the stump

Moonbat
11-22-2007, 09:47 AM
Ok, I get it. But I never play games alot, so I'm not sure how to go about this.

<2 minutes later>

Yep, I'm not sure how to tackle this problem, I'm not a good coder. Maybe DANIEL2488, SyntaX****** or another member can help you.

Just curious, why does your friend want this? It's not going to help him in any way.

Lethal323
11-22-2007, 09:48 AM
Alright Thanks mucho


Lets leave this open and see if any of the other people on here know how to do this...

Ezekiel
11-23-2007, 03:39 AM
Use the Windows beep() function. It's awesome -- I made my annoying 'hacking' program with it.