1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_SOUNDSET_H
20 #define OPENXCOM_SOUNDSET_H
21 
22 #include <map>
23 #include <string>
24 
25 namespace OpenXcom
26 {
27 
28 class Sound;
29 
30 /**
31  * Container of a set of sounds.
32  * Used to manage file sets that contain a pack
33  * of sounds inside.
34  */
35 class SoundSet
36 {
37 private:
38 	std::map<int, Sound*> _sounds;
39 public:
40 	/// Crates a sound set.
41 	SoundSet();
42 	/// Cleans up the sound set.
43 	~SoundSet();
44 	/// Loads an X-Com CAT set of sound files.
45 	void loadCat(const std::string &filename, bool wav = true);
46 	/// Gets a particular sound from the set.
47 	Sound *getSound(unsigned int i);
48 	/// Creates a new sound and returns a pointer to it.
49 	Sound *addSound(unsigned int i);
50 	/// Gets the total sounds in the set.
51 	size_t getTotalSounds() const;
52 };
53 
54 }
55 
56 #endif
57