From d709b1c94721cae577710164b7640d1d42b7cda4 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 10 Nov 2021 18:11:20 +1000
Subject: Fixes for Haiku


diff --git a/tgcalls/MediaManager.cpp b/tgcalls/MediaManager.cpp
index fd81ab1..73cdc47 100644
--- a/tgcalls/MediaManager.cpp
+++ b/tgcalls/MediaManager.cpp
@@ -964,7 +964,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
 }
 
 void MediaManager::setAudioInputDevice(std::string id) {
-#if defined(WEBRTC_IOS)
+#if defined(WEBRTC_IOS) || defined(__HAIKU__)
 #else
     SetAudioInputDeviceById(_audioDeviceModule.get(), id);
 #endif
diff --git a/tgcalls/group/GroupInstanceCustomImpl.cpp b/tgcalls/group/GroupInstanceCustomImpl.cpp
index b3fcaea..6a7ac01 100644
--- a/tgcalls/group/GroupInstanceCustomImpl.cpp
+++ b/tgcalls/group/GroupInstanceCustomImpl.cpp
@@ -2791,7 +2791,7 @@ public:
     }
 
     void setAudioOutputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
         _threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
             SetAudioOutputDeviceById(_audioDeviceModule.get(), id);
         });
@@ -2799,7 +2799,7 @@ public:
     }
 
     void setAudioInputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
         _threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
             SetAudioInputDeviceById(_audioDeviceModule.get(), id);
         });
-- 
2.30.2

