blob: 10d7c3cc64515fa50e51e93155a77807855bbc0d (
plain)
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
|
#pragma once
#include <soloud/soloud.h>
#include <soloud/soloud_wav.h>
#include "../Resource.h"
namespace crepe {
class SoundContext;
/**
* \brief Sound resource facade
*
* This class is a wrapper around a \c SoLoud::Wav instance, which holds a
* single sample. It is part of the sound facade.
*/
class Sound : public Resource {
public:
Sound(const Asset & src);
~Sound(); // dbg_trace
class Handle {
private:
SoLoud::handle handle;
float volume = 1.0f;
bool looping = false;
friend class SoundContext;
};
private:
SoLoud::Wav sample;
friend class SoundContext;
};
} // namespace crepe
|