diff --git a/native/serverconnection/CMakeLists.txt b/native/serverconnection/CMakeLists.txt index 3fa4640..dd1c316 100644 --- a/native/serverconnection/CMakeLists.txt +++ b/native/serverconnection/CMakeLists.txt @@ -67,6 +67,7 @@ target_link_libraries(${MODULE_NAME} ${NODEJS_LIBRARIES}) find_package(soundio REQUIRED) include_directories(${soundio_INCLUDE_DIR}) +add_compile_definitions(SOUNDIO_STATIC_LIBRARY) find_package(TomMath REQUIRED) include_directories(${TomMath_INCLUDE_DIR}) @@ -77,8 +78,10 @@ include_directories(${TomCrypt_INCLUDE_DIR}) find_package(DataPipes REQUIRED) include_directories(${DataPipes_INCLUDE_DIR}) +set(_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) find_package(Libevent REQUIRED) include_directories(${LIBEVENT_INCLUDE_DIRS}) +set(CMAKE_FIND_LIBRARY_SUFFIXES ${_CMAKE_FIND_LIBRARY_SUFFIXES}) find_package(TeaSpeak_SharedLib REQUIRED) include_directories(${TeaSpeak_SharedLib_INCLUDE_DIR}) @@ -125,8 +128,7 @@ set(REQUIRED_LIBRARIES ${opus_LIBRARIES_STATIC} ${ed25519_LIBRARIES_STATIC} - #soundio::static - ${soundio_LIBRARIES_STATIC} + soundio::static spdlog::spdlog_header_only Nan::Helpers diff --git a/native/serverconnection/src/audio/driver/SoundIORecord.cpp b/native/serverconnection/src/audio/driver/SoundIORecord.cpp index 2029fec..c13b6f3 100644 --- a/native/serverconnection/src/audio/driver/SoundIORecord.cpp +++ b/native/serverconnection/src/audio/driver/SoundIORecord.cpp @@ -105,6 +105,11 @@ void SoundIORecord::read_callback(int frame_count_min, int frame_count_max) { return; } + if(!areas) { + log_warn(category::audio, tr("Input audio underflow for {} ({} samples)"), this->device_handle->name, frame_count_max); + return; + } + /* test for interleaved */ { char* begin = areas[0].ptr - sizeof(float); diff --git a/package.json b/package.json index 5509a08..f1d3438 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TeaClient", - "version": "1.4.2-5", + "version": "1.4.3", "description": "", "main": "main.js", "scripts": {