v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
34
source/frontend/StarMainMixer.hpp
Normal file
34
source/frontend/StarMainMixer.hpp
Normal file
|
@ -0,0 +1,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
|
Loading…
Add table
Add a link
Reference in a new issue