From 80026d7fe631bb2d1fcac37dcc13145c868ecfa2 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 16 May 2016 10:21:20 -1000 Subject: [PATCH] Better buffer handling for audio mixing --- lib/audiodev/AudioMatrix.cpp | 30 ++++++++++++++++++------------ lib/audiodev/AudioMatrix.hpp | 24 ++++++++++++------------ lib/audiodev/AudioVoice.cpp | 33 ++++++++++++++------------------- lib/audiodev/AudioVoice.hpp | 1 + 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/lib/audiodev/AudioMatrix.cpp b/lib/audiodev/AudioMatrix.cpp index 4510937..995ae49 100644 --- a/lib/audiodev/AudioMatrix.cpp +++ b/lib/audiodev/AudioMatrix.cpp @@ -23,8 +23,8 @@ void AudioMatrixMono::setDefaultMatrixCoefficients(AudioChannelSet acSet) } } -void AudioMatrixMono::mixMonoSampleData(const AudioVoiceEngineMixInfo& info, - const int16_t* dataIn, int16_t* dataOut, size_t samples) const +int16_t* AudioMatrixMono::mixMonoSampleData(const AudioVoiceEngineMixInfo& info, + const int16_t* dataIn, int16_t* dataOut, size_t samples) const { const ChannelMap& chmap = info.m_channelMap; for (size_t s=0 ; s