-
Notifications
You must be signed in to change notification settings - Fork 1
/
Sound.h
57 lines (46 loc) · 1.33 KB
/
Sound.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __Sound__
#define __Sound__
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "includes.h"
#include "Texture.h"
#include "Camera.h"
using namespace cv;
using namespace irrklang;
class Song {
public:
char song_name[50]; // name of the song
char song_file[50]; // name of the .wav sound file
char vid_file[50]; // name of the .avi video file
float bpm; // # of beats per minute
int price; // price of the song in the shop
bool unlocked; // whether or not the song can be played
};
class Sound {
public:
Sound();
virtual ~Sound();
ISoundEngine* engine;
void initSound();
void playBackgroundMusic();
float playKaraokeMusic(int song);
void pauseSong();
void setVolume(float volume);
int getSongDuration();
Song getSongInfo(int song) { return karaoke_songs[song]; }
vector<Song> getSongs() { return karaoke_songs; }
void unlockSong(int song) { karaoke_songs[song].unlocked = true; }
void playContactSound();
void playBuzzerSound();
void playThwackSound();
void playSplatSound();
void playJumpSound();
void playCorrectSound();
void playIncorrectSound();
void playSoftDing();
void playLoudDing();
private:
vector<Song> karaoke_songs;
ISound* curSound;
};
#endif