mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-27 16:16:35 +03:00
make compile work if voice support is disabled
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#ifdef WITH_VOICE
|
||||
// clang-format off
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
@@ -8,6 +10,7 @@
|
||||
#include <miniaudio.h>
|
||||
#include <opus.h>
|
||||
#include <cstring>
|
||||
// clang-format on
|
||||
|
||||
const uint8_t *StripRTPExtensionHeader(const uint8_t *buf, int num_bytes, size_t &outlen) {
|
||||
if (buf[0] == 0xbe && buf[1] == 0xde && num_bytes > 4) {
|
||||
@@ -89,3 +92,4 @@ void AudioManager::FeedMeOpus(uint32_t ssrc, const std::vector<uint8_t> &data) {
|
||||
bool AudioManager::OK() const {
|
||||
return m_ok;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
#ifdef WITH_VOICE
|
||||
// clang-format off
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <deque>
|
||||
@@ -8,6 +10,7 @@
|
||||
#include <vector>
|
||||
#include <miniaudio.h>
|
||||
#include <opus.h>
|
||||
// clang-format on
|
||||
|
||||
class AudioManager {
|
||||
public:
|
||||
@@ -31,3 +34,4 @@ private:
|
||||
std::mutex m_mutex;
|
||||
std::unordered_map<uint32_t, std::pair<std::deque<int16_t>, OpusDecoder *>> m_sources;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user