Ensure NONTHREADSAFE_PSUEDOSTACK is never used
This commit is contained in:
parent
8ff5d9f82b
commit
52ba6fa7f7
@ -437,7 +437,7 @@ SET (STAR_EXT_LIBS ${STAR_EXT_LIBS}
|
||||
${FREETYPE_LIBRARY}
|
||||
${PNG_LIBRARY}
|
||||
${ZLIB_LIBRARY}
|
||||
"extern/opus/opus"
|
||||
opus
|
||||
)
|
||||
|
||||
IF (STAR_BUILD_GUI)
|
||||
|
9
source/extern/CMakeLists.txt
vendored
9
source/extern/CMakeLists.txt
vendored
@ -2,10 +2,17 @@ SET (OPUS_INSTALL_PKG_CONFIG_MODULE OFF)
|
||||
SET (OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF)
|
||||
SET (OPUS_X86_MAY_HAVE_AVX OFF)
|
||||
SET (OPUS_X86_MAY_HAVE_SSE4_1 OFF)
|
||||
SET (OPUS_STACK_PROTECTOR OFF)
|
||||
SET (OPUS_ENABLE_FLOAT_API ON)
|
||||
SET (OPUS_STACK_PROTECTOR OFF)
|
||||
SET (OPUS_NONTHREADSAFE_PSEUDOSTACK OFF)
|
||||
SET (OPUS_USE_ALLOCA ON)
|
||||
|
||||
ADD_SUBDIRECTORY (opus)
|
||||
|
||||
IF (OPUS_NONTHREADSAFE_PSEUDOSTACK)
|
||||
MESSAGE (FATAL_ERROR "Opus should not be using NONTHREADSAFE_PSEUDOSTACK")
|
||||
ENDIF ()
|
||||
|
||||
INCLUDE_DIRECTORIES (
|
||||
${STAR_EXTERN_INCLUDES}
|
||||
opus/include
|
||||
|
@ -250,9 +250,9 @@ void Voice::readAudioData(uint8_t* stream, int len) {
|
||||
|
||||
ByteArray encoded(VOICE_MAX_PACKET_SIZE, 0);
|
||||
size_t frameSamples = VOICE_FRAME_SIZE * (size_t)m_deviceChannels;
|
||||
while (m_capturedChunksFrames >= VOICE_FRAME_SIZE) {
|
||||
std::vector<opus_int16> samples;
|
||||
samples.reserve(frameSamples);
|
||||
while (m_capturedChunksFrames >= VOICE_FRAME_SIZE) {
|
||||
size_t samplesLeft = frameSamples;
|
||||
while (samplesLeft && !m_capturedChunks.empty()) {
|
||||
auto& front = m_capturedChunks.front();
|
||||
|
Loading…
Reference in New Issue
Block a user