1 #ifndef __AMUSE_BOO_BACKEND_HPP__ 2 #define __AMUSE_BOO_BACKEND_HPP__ 4 #include <boo/audiodev/IAudioVoiceEngine.hpp> 5 #include <boo/audiodev/IAudioSubmix.hpp> 6 #include "IBackendVoice.hpp" 7 #include "IBackendSubmix.hpp" 8 #include "IBackendVoiceAllocator.hpp" 18 struct VoiceCallback : boo::IAudioVoiceCallback
21 size_t supplyAudio(boo::IAudioVoice& voice,
size_t frames, int16_t* data);
24 std::unique_ptr<boo::IAudioVoice> m_booVoice;
27 double sampleRate,
bool dynamicPitch);
29 double sampleRate,
bool dynamicPitch);
42 struct SubmixCallback : boo::IAudioSubmixCallback
45 bool canApplyEffect()
const;
46 void applyEffect(int16_t* audio,
size_t frameCount,
47 const boo::ChannelMap& chanMap,
double sampleRate)
const;
48 void applyEffect(int32_t* audio,
size_t frameCount,
49 const boo::ChannelMap& chanMap,
double sampleRate)
const;
50 void applyEffect(
float* audio,
size_t frameCount,
51 const boo::ChannelMap& chanMap,
double sampleRate)
const;
54 std::unique_ptr<boo::IAudioSubmix> m_booSubmix;
58 void setChannelGains(
const float gains[8]);
59 std::unique_ptr<IBackendVoice> allocateVoice(
Voice& clientVox,
double sampleRate,
bool dynamicPitch);
60 double getSampleRate()
const;
61 SubmixFormat getSampleFormat()
const;
67 boo::IAudioVoiceEngine& m_booEngine;
70 std::unique_ptr<IBackendVoice> allocateVoice(
Voice& clientVox,
double sampleRate,
bool dynamicPitch);
71 std::unique_ptr<IBackendSubmix> allocateSubmix(
Submix& clientSmx);
72 AudioChannelSet getAvailableSet();
73 void pumpAndMixVoices();
78 #endif // __AMUSE_BOO_BACKEND_HPP__ void resetSampleRate(double sampleRate)
void setMatrixCoefficients(const float coefs[8])
void setPitchRatio(double ratio, bool slew)