Amuse
IBackendVoiceAllocator.hpp
1 #ifndef __AMUSE_IBACKENDVOICEALLOCATOR_HPP__
2 #define __AMUSE_IBACKENDVOICEALLOCATOR_HPP__
3 
4 #include <memory>
5 
6 namespace amuse
7 {
8 class IBackendVoice;
9 class IBackendSubmix;
10 class Voice;
11 class Submix;
12 
14 enum class AudioChannelSet
15 {
16  Stereo,
17  Quad,
18  Surround51,
19  Surround71,
20  Unknown = 0xff
21 };
22 
25 {
26 public:
27  virtual ~IBackendVoiceAllocator() = default;
28 
30  virtual std::unique_ptr<IBackendVoice> allocateVoice(Voice& clientVox,
31  double sampleRate,
32  bool dynamicPitch)=0;
33 
35  virtual std::unique_ptr<IBackendSubmix> allocateSubmix(Submix& clientSmx)=0;
36 
38  virtual AudioChannelSet getAvailableSet()=0;
39 
41  virtual void pumpAndMixVoices()=0;
42 };
43 
44 }
45 
46 #endif // __AMUSE_IBACKENDVOICEALLOCATOR_HPP__