sound_manager.hpp 589 Bytes
Newer Older
Georg Schaefer's avatar
Georg Schaefer committed
1
2
3
#ifndef __GDW_SOUND_MANAGER_HPP__
#define __GDW_SOUND_MANAGER_HPP__

Thomas Eppers's avatar
Thomas Eppers committed
4
#include <audio/sound_file.hpp>
Georg Schaefer's avatar
Georg Schaefer committed
5
6
7
8
9
10
11
#include <util/cached_resource_manager.hpp>

namespace gdw{
	class engine;
}

namespace gdw {
Thomas Eppers's avatar
Thomas Eppers committed
12
	using sound_ptr = std::shared_ptr<const sound_file>;
Georg Schaefer's avatar
Georg Schaefer committed
13

Thomas Eppers's avatar
Thomas Eppers committed
14
	class sound_manager: public cached_resource_manager<const sound_file, sound_manager> {
Georg Schaefer's avatar
Georg Schaefer committed
15
16
17
	private:
		engine& engine_;

Thomas Eppers's avatar
Thomas Eppers committed
18
		friend class cached_resource_manager<const sound_file, sound_manager>;
Georg Schaefer's avatar
Georg Schaefer committed
19
20
21
22
23
24
25
26
27
28
29
30

	public:
		sound_manager(engine& engine);
		~sound_manager() = default;

	protected:
		sound_ptr load_new(const std::string& name);
	};

}

#endif