blob: e0f12231f56de344077feb2839b525d71fb0eb59 (
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
|
#ifndef STAR_MAIN_MIXER_HPP
#define STAR_MAIN_MIXER_HPP
#include "StarMixer.hpp"
#include "StarGameTypes.hpp"
namespace Star {
STAR_CLASS(UniverseClient);
STAR_CLASS(MainMixer);
class MainMixer {
public:
MainMixer(unsigned sampleRate, unsigned channels);
void setUniverseClient(UniverseClientPtr universeClient);
void update(bool muteSfx = false, bool muteMusic = false);
MixerPtr mixer() const;
void setVolume(float volume, float rampTime = 0.0f);
void read(int16_t* sampleData, size_t frameCount);
private:
UniverseClientPtr m_universeClient;
MixerPtr m_mixer;
Set<MixerGroup> m_mutedGroups;
Map<MixerGroup, float> m_groupVolumes;
};
}
#endif
|