diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-02 01:25:33 -0400 |
commit | 0a049856782397a7464d03c317ce3788559cdeda (patch) | |
tree | 9412d17c0ab9335d591d7b4590043b9cc4e3cc45 /src/audio | |
parent | 9c8d9e54fe96f97bdda2be26bab571e4cbf0c597 (diff) | |
download | abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.tar.gz abaddon-portaudio-0a049856782397a7464d03c317ce3788559cdeda.zip |
make compile work if voice support is disabled
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/manager.cpp | 4 | ||||
-rw-r--r-- | src/audio/manager.hpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/manager.cpp b/src/audio/manager.cpp index 9ba8c51..d7d0bb8 100644 --- a/src/audio/manager.cpp +++ b/src/audio/manager.cpp @@ -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 diff --git a/src/audio/manager.hpp b/src/audio/manager.hpp index 55ecdc3..d0f3a21 100644 --- a/src/audio/manager.hpp +++ b/src/audio/manager.hpp @@ -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 |