3 * Author: Jindrich Kovar
4 * Uses OpenAL (alut.h, alc.h, al.h)
11 //#include "../exceptions/GeneralException.h"
12 #include "../exceptions/CAudioException.h"
17 #define SOUND_NOTHING -1
18 #define MUSIC_NOTHING -1
20 #define MUSIC_SLOW_SOURCE "sound/soundfiles/SonIntro1.wav"
21 #define MUSIC_FAST_SOURCE "sound/soundfiles/.wav"
22 #define SOUND_BUTTON_SUCCESS_SOURCE "sound/soundfiles/ButtonSuc.wav"
23 #define SOUND_BUTTON_HOVER_SOURCE "sound/soundfiles/.wav"
24 #define SOUND_GAME_OVER_SOURCE "sound/soundfiles/game_over.wav"
25 #define SOUND_GAME_VICTORY_SOURCE "sound/soundfiles/woohoo.wav"
29 #define SOUND_BUTTON_SUCCESS 2
30 #define SOUND_BUTTON_HOVER 3
31 #define SOUND_GAME_OVER 4
32 #define SOUND_GAME_VICTORY 5
38 void PlayMusic(int id
);
40 void PlaySound(int id
);
45 ALuint Buffers
[NUM_BUFFERS
]; // Buffers hold sound data.
46 ALuint Sources
[NUM_SOURCES
]; // Sources are points of emitting sound.
47 ALfloat SourcesPos
[NUM_SOURCES
][3]; // Position of the source sounds.
48 ALfloat SourcesVel
[NUM_SOURCES
][3]; // Velocity of the source sounds.
49 ALfloat ListenerPos
[3] ;// Position of the listener.
50 ALfloat ListenerVel
[3] ;// Velocity of the listener.
51 ALfloat ListenerOri
[6] ;// Orientation of the listener. (first 3 elements are "at", second 3 are "up")
52 int iActuallyPlayingMusic
;
53 int iActuallyPlayingSound
;