Hej på er igen. Någon som vet var dendära c++ sounds.zip eller vad den hätte, tog vägen?
Någon som har den kanske?
Var får man tag i den igen? för nu är den borta för mej.
hjälp!
EDIT:
jag hittade lite på denna:
http://www.daniweb.com/forums/thread15252.htmloch så gjorde jag dethär användarvänliga^^:
CODE
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include "iodos.h"
#include <windows.h>
using namespace std;
int main(int argc, char *argv[])
{
dos_console(850);
/*eep(440,100);
Beep(440,100);
Beep(523,100); // 523 hertz (C5) for 500 milliseconds
B
Beep(587,100);
Beep(659,100);
Beep(698,100);
Beep(784,100);
*/
int a, b;
cout<<"Skriv ett värde för önskad frekvensljud (mäts i hertz): ";
cin>>a;
cout<<"Skriv ett värde för önskad varaktig tid (mäts i millisekunder): ";
cin>>b;
if (b>8750)
{
cout<<"För lång tid kan resultera i irritation. "<<endl;
system("Pause");
}
else
Beep(a,B);
system("PAUSE");
return EXIT_SUCCESS;
}
EDIT2: titta här! jag hittade det på skolan!
CODE
#include <iostream>
#include <ctime>
#include <windows.h>
#include <conio.h>
using namespace std;
int main(){
//c 524.440
//d 589.293
//e 654.146
//f 718.999
//g 783.852
for(int a=0; a<2; a++){
Beep(105,100);
Beep(110,100);
Beep(115,100);
Beep(120,100);
Beep(125,100);
Beep(130,100);
Beep(135,100);
Beep(140,100);
Beep(145,100);
Beep(150,100);
Beep(150,100);
Beep(145,100);
Beep(140,100);
Beep(135,100);
Beep(130,100);
Beep(125,100);
Beep(120,100);
Beep(115,100);
Beep(110,100);
Beep(105,100);
}
char val;
cout << "Play whit num 1-5\n";
for (int g=0; g>(-1); g++){
val=getche();
switch (val){
case '1': //Jag har ingen aning om tonerna stämmer men det låter i alla fall ok
Beep(524.440,100); //c
break;
case '2':
Beep(589.293,100); //d
break;
case '3':
Beep(654.146,100); //e
break;
case '4':
Beep(718.999,100); //f
break;
case '5':
Beep(783.852,100); //g
break;
case ' ':
Beep(783.852,100); //g
break;
}
}
system ("pause");
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(718.999,300); //f
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Sleep(200);
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(783.852,300); //g
Beep(100,100); //mellan
Sleep(100);
Beep(100,100); //mellan
Beep(718.999,500); //f
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(718.999,300); //f
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Sleep(200);
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //
Beep(100,100); //melland
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(718.999,300); //f
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(654.146,300); //e
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(589.293,300); //d
Beep(100,100); //mellan
Beep(524.440,300); //c
Beep(100,100); //mellan
system ("pause");
return 0;
}