#include "audio/utility/channel_mixing_matrix.h"
#include <stddef.h>
#include <algorithm>
#include "audio/utility/channel_mixer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace webrtc {
namespace {
ChannelLayout CheckInputLayout(ChannelLayout input_layout,
ChannelLayout output_layout) { … }
}
static void ValidateLayout(ChannelLayout layout) { … }
ChannelMixingMatrix::ChannelMixingMatrix(ChannelLayout input_layout,
int input_channels,
ChannelLayout output_layout,
int output_channels)
: … { … }
ChannelMixingMatrix::~ChannelMixingMatrix() = default;
bool ChannelMixingMatrix::CreateTransformationMatrix(
std::vector<std::vector<float>>* matrix) { … }
void ChannelMixingMatrix::AccountFor(Channels ch) { … }
bool ChannelMixingMatrix::IsUnaccounted(Channels ch) const { … }
bool ChannelMixingMatrix::HasInputChannel(Channels ch) const { … }
bool ChannelMixingMatrix::HasOutputChannel(Channels ch) const { … }
void ChannelMixingMatrix::Mix(Channels input_ch,
Channels output_ch,
float scale) { … }
void ChannelMixingMatrix::MixWithoutAccounting(Channels input_ch,
Channels output_ch,
float scale) { … }
}