~aleteoryx/muditaos

691ca41c1f0319476033507bb49119c5208673a2 — Hubert Chrzaniuk 5 years ago 7ccc52c
[EGD-4378] Fix audio bugs (#1003)

* fix - call ear-speaker does not work
* fix - BT sink state is not stored
2 files changed, 2 insertions(+), 2 deletions(-)

M module-audio/Audio/AudioCommon.hpp
M module-audio/Audio/Operation/RouterOperation.cpp
M module-audio/Audio/AudioCommon.hpp => module-audio/Audio/AudioCommon.hpp +1 -1
@@ 129,7 129,7 @@ namespace audio
        std::vector<std::shared_ptr<Event>> getUpdateEvents() const
        {
            std::vector<std::shared_ptr<Event>> updateEvents;
            for (size_t i = 0; i < hwStateUpdateMaxEvent; i++) {
            for (size_t i = 0; i <= hwStateUpdateMaxEvent; i++) {
                auto isConnected =
                    audioSinkState.test(i) ? Event::DeviceState::Connected : Event::DeviceState::Disconnected;
                auto updateEvt = magic_enum::enum_cast<EventType>(i);

M module-audio/Audio/Operation/RouterOperation.cpp => module-audio/Audio/Operation/RouterOperation.cpp +1 -1
@@ 143,7 143,7 @@ namespace audio
                Profile::Type::RoutingLoudspeaker, nullptr, routingLoudspeakerVolume, routingLoudspeakerGain),
            true);

        auto defaultProfile = GetProfile(Profile::Type::PlaybackLoudspeaker);
        auto defaultProfile = GetProfile(Profile::Type::RoutingEarspeaker);
        if (!defaultProfile) {
            throw AudioInitException("Error during initializing profile", RetCode::ProfileNotSet);
        }