Files
MuditaOS/module-audio/Audio/transcode/NullTransform.cpp
Marcin Smoczyński ece6a51e5b [EGD-6800] Enable voice transcoding
Add voice transcoding during phone call with two basic transforms:
 - sample rate downscaling by a factor of 2 with a decimator
 - sample rate upscaling by a factor of 2 with an interpolator (no
low-pass filter)

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-05-21 18:12:57 +02:00

32 lines
856 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "NullTransform.hpp"
using ::audio::transcode::NullTransform;
auto NullTransform::transform(const Span &span, const Span &transformSpace) const -> Span
{
return span;
}
auto NullTransform::validateInputFormat(const audio::AudioFormat &inputFormat) const noexcept -> bool
{
return true;
}
auto NullTransform::transformFormat(const audio::AudioFormat &inputFormat) const noexcept -> audio::AudioFormat
{
return inputFormat;
}
auto NullTransform::transformBlockSize(std::size_t inputBufferSize) const noexcept -> std::size_t
{
return inputBufferSize;
}
auto NullTransform::transformBlockSizeInverted(std::size_t outputBufferSize) const noexcept -> std::size_t
{
return outputBufferSize;
}