Amuse
IBackendSubmix.hpp
1 #ifndef __AMUSE_IBACKENDSUBMIX_HPP__
2 #define __AMUSE_IBACKENDSUBMIX_HPP__
3 
4 #include <memory>
5 
6 namespace amuse
7 {
8 class IBackendVoice;
9 class Voice;
10 
11 enum class SubmixFormat
12 {
13  Int16,
14  Int32,
15  Float
16 };
17 
20 {
21 public:
22  virtual ~IBackendSubmix() = default;
23 
25  virtual void setChannelGains(const float gains[8])=0;
26 
28  virtual std::unique_ptr<IBackendVoice> allocateVoice(Voice& clientVox, double sampleRate, bool dynamicPitch)=0;
29 
31  virtual double getSampleRate() const=0;
32 
34  virtual SubmixFormat getSampleFormat() const=0;
35 };
36 
37 }
38 
39 #endif // __AMUSE_IBACKENDSUBMIX_HPP__