mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-16 18:11:02 -05:00
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>
25 lines
747 B
C++
25 lines
747 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <Audio/AudioFormat.hpp>
|
|
#include <Audio/transcode/Transform.hpp>
|
|
|
|
#include <memory>
|
|
|
|
namespace audio::transcode
|
|
{
|
|
class TransformFactory
|
|
{
|
|
public:
|
|
auto makeTransform(AudioFormat sourceFormat, AudioFormat sinkFormat) const -> std::unique_ptr<Transform>;
|
|
|
|
private:
|
|
auto getSamplerateTransform(AudioFormat sourceFormat, AudioFormat sinkFormat) const
|
|
-> std::unique_ptr<Transform>;
|
|
auto getChannelsTransform(AudioFormat sourceFormat, AudioFormat sinkFormat) const -> std::unique_ptr<Transform>;
|
|
};
|
|
|
|
}; // namespace audio::transcode
|