mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(audio): implement voice chat using Opus codec
Add voice chat support with Opus encoding/decoding, push-to-talk (V key), and new audio recording infrastructure.
This commit is contained in:
25
cmake/modules/FindOpus.cmake
Normal file
25
cmake/modules/FindOpus.cmake
Normal file
@@ -0,0 +1,25 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(OPUS_INCLUDE_DIR
|
||||
NAMES opus/opus.h opus.h
|
||||
)
|
||||
|
||||
find_library(OPUS_LIBRARY
|
||||
NAMES opus
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
Opus
|
||||
REQUIRED_VARS
|
||||
OPUS_INCLUDE_DIR
|
||||
OPUS_LIBRARY
|
||||
)
|
||||
|
||||
if(Opus_FOUND)
|
||||
add_library(Opus::Opus UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Opus::Opus PROPERTIES
|
||||
IMPORTED_LOCATION "${OPUS_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
Reference in New Issue
Block a user