mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-24 22:08:33 -05:00
Audio devices are created in the audio subsystem and it is not possible to send a device to bt service upon creation. Introduce hookable audio device factory to allow sharing bluetooth audio device. Move audio devices from bsp to audio allowing removal of unwanted bsp -> audio dependency. Remove Bluetooth proxy device which turned out to be a dead end. Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
26 lines
622 B
C++
26 lines
622 B
C++
// Copyright (c) 2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include <Audio/AudioPlatform.hpp>
|
|
|
|
#include <memory>
|
|
#include <utility>
|
|
|
|
using audio::AudioDevice;
|
|
using audio::AudioDeviceFactory;
|
|
using audio::AudioPlatform;
|
|
|
|
class DummyAudioFactory : public AudioDeviceFactory
|
|
{
|
|
protected:
|
|
std::shared_ptr<AudioDevice> getDeviceFromType([[maybe_unused]] AudioDevice::Type deviceType)
|
|
{
|
|
return nullptr;
|
|
}
|
|
};
|
|
|
|
std::unique_ptr<AudioDeviceFactory> AudioPlatform::GetDeviceFactory()
|
|
{
|
|
return std::make_unique<DummyAudioFactory>();
|
|
}
|