#include "boo/audiodev/AudioMatrix.hpp" #include namespace boo { void AudioMatrixMono::setDefaultMatrixCoefficients() { memset(m_coefs, 0, sizeof(m_coefs)); switch (m_setOut) { case AudioChannelSet::Mono: case AudioChannelSet::Stereo: case AudioChannelSet::Quad: m_coefs[AudioChannel::FrontLeft] = 1.0; m_coefs[AudioChannel::FrontRight] = 1.0; break; case AudioChannelSet::Surround51: case AudioChannelSet::Surround71: m_coefs[AudioChannel::FrontCenter] = 1.0; break; } } void AudioMatrixMono::bufferMonoSampleData(IAudioVoice& voice, const int16_t* data, size_t samples) { const ChannelMap& chmap = voice.channelMap(); m_interleaveBuf.clear(); m_interleaveBuf.reserve(samples * chmap.m_channelCount); for (size_t s=0 ; s