Cogs.Core
SoundManager.h
1#pragma once
2
3#include "Resources/ResourceManager.h"
4
5#include "Sound.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
11 using SoundLoadInfo = ResourceLoadInfoBase;
12
13 class SoundManager : public ResourceManager<Sound, SoundLoadInfo>
14 {
15 public:
16 SoundManager(Context * context) : ResourceManager(context) {}
17
18 SoundHandle loadSound(const StringView & path);
19
20 void handleLoad(SoundLoadInfo * loadInfo) override;
21 };
22 }
23}
24
25template<> inline Cogs::StringView getName<Cogs::Core::SoundManager>() { return "SoundManager"; }
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
The generic resource manager provides a base implementation for specialized resource managers to buil...
void handleLoad(SoundLoadInfo *loadInfo) override
Handler for resource loading.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23