AboutForm.ui: About dialog for mines3d v2.
[mines3d.git] / sound / main.cpp
blob33e248f7e750bcb73c62206c9fcea0d6c6201e33
1 //#include <cstdlib>
2 #include <iostream>
3 #include <conio.h>
5 #include "CAudio.h"
7 using namespace std;
9 int main(int argc, char *argv[])
11 cout<<"Audio test"<<endl;
12 bool bNoError=true;
14 CAudio *Audio=NULL;
15 try
17 Audio=new CAudio();
19 catch (GeneralException e)
21 cout<<e.errText<<endl;
22 bNoError=false;
25 char c;
26 while (c != 'q')
28 c = getche();
29 switch (c)
31 case '0':
32 if (bNoError)Audio->PlayMusic(MUSIC_SLOW);
33 break;
34 case '1':
35 if (bNoError)Audio->PlayMusic(MUSIC_FAST);
36 break;
37 case '2':
38 if (bNoError)Audio->PlaySound(SOUND_BUTTON_SUCCESS);
39 break;
40 case '3':
41 if (bNoError)Audio->PlaySound(SOUND_BUTTON_HOVER);
42 break;
43 case '4':
44 if (bNoError)Audio->PlaySound(SOUND_GAME_OVER);
45 break;
46 case '5':
47 if (bNoError)Audio->PlaySound(SOUND_GAME_VICTORY);
48 break;
49 case '6':
50 if (bNoError)Audio->PlaySound(-4);
51 break;
52 case '7':
53 if (bNoError)Audio->PlaySound(7);
54 break;
55 case '8':
56 if (bNoError)Audio->StopMusic();
57 break;
61 if (bNoError)delete Audio;
62 return EXIT_SUCCESS;