// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "DummyAudioDevice.hpp" using namespace audio; class DummyAudioFactory : public AudioDeviceFactory { public: std::shared_ptr createCellularAudioDevice() override { return nullptr; } protected: std::shared_ptr getDevice([[maybe_unused]] const audio::Profile &profile) override { if (profile.GetAudioDeviceType() == AudioDevice::Type::Audiocodec) { return std::make_shared(); } return nullptr; } }; std::unique_ptr AudioPlatform::GetDeviceFactory() { return std::make_unique(); } auto DummyAudioDevice::Start() -> AudioDevice::RetCode { return AudioDevice::RetCode::Success; } auto DummyAudioDevice::Stop() -> AudioDevice::RetCode { return AudioDevice::RetCode::Success; } auto DummyAudioDevice::setOutputVolume(float vol) -> AudioDevice::RetCode { return AudioDevice::RetCode::Success; } auto DummyAudioDevice::setInputGain(float gain) -> AudioDevice::RetCode { return AudioDevice::RetCode::Success; } auto DummyAudioDevice::getTraits() const -> Endpoint::Traits { return Endpoint::Traits(); } auto DummyAudioDevice::getSupportedFormats() -> std::vector { return std::vector(); } auto DummyAudioDevice::getSourceFormat() -> audio::AudioFormat { return audio::AudioFormat(); } void DummyAudioDevice::onDataSend() {} void DummyAudioDevice::onDataReceive() {} void DummyAudioDevice::enableInput() {} void DummyAudioDevice::enableOutput() {} void DummyAudioDevice::disableInput() {} void DummyAudioDevice::disableOutput() {}