diff --git a/src/rtaudio.cpp b/src/rtaudio.cpp index 6df33186..276e8f3c 100644 --- a/src/rtaudio.cpp +++ b/src/rtaudio.cpp @@ -191,6 +191,8 @@ struct RtAudioDevice : audio::Device { RtAudioDevice* device = (RtAudioDevice*) userData; assert(device); + system::setThreadName("RtAudio"); + int inputStride = device->getNumInputs(); int outputStride = device->getNumOutputs(); device->processBuffer((const float*) inputBuffer, inputStride, (float*) outputBuffer, outputStride, nFrames); diff --git a/src/system.cpp b/src/system.cpp index 1c6058e0..3c52f64b 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -560,7 +560,7 @@ int getLogicalCoreCount() { void setThreadName(const std::string& name) { #if defined ARCH_LIN - pthread_setname_np(pthread_self(), name.c_str()); + pthread_setname_np(pthread_self(), name.substr(0, 15).c_str()); #elif defined ARCH_MAC // Not supported (yet) on Mac #elif defined ARCH_WIN