audio_collection.hpp 1018 Bytes
Newer Older
Georg Schaefer's avatar
Georg Schaefer committed
1
2
3
4
5
6
7
8
9
#ifndef __GDW_AUDIO_COLLECTION_HPP__
#define __GDW_AUDIO_COLLECTION_HPP__

#include <map>
#include <memory>
#include <string>

#include <audio/music.hpp>
#include <audio/music_manager.hpp>
Thomas Eppers's avatar
Thomas Eppers committed
10
#include <audio/sound_file.hpp>
Georg Schaefer's avatar
Georg Schaefer committed
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
#include <audio/sound_manager.hpp>

namespace gdw {
	class engine;
}

namespace gdw {
	class audio_collection {
	private:
		music_manager music_manager_;
		sound_manager sound_manager_;

		std::map<const std::string, music_ptr> music_collection_;
		std::map<const std::string, sound_ptr> sound_collection_;

	public:
		audio_collection(engine& engine) noexcept;
		~audio_collection();

		audio_collection(const audio_collection&) = delete;
		audio_collection& operator=(const audio_collection) = delete;

		audio_collection(audio_collection&&) = default;
		audio_collection& operator=(audio_collection&&) = default;

		void load_music_collection();
		void load_sound_collection();

		music_ptr music(const std::string& name) const;
		sound_ptr sound(const std::string& name) const;
	};

}

#endif