diff options
| author | Marcus Tomlinson <themarcustomlinson@gmail.com> | 2019-01-27 16:25:03 +0000 |
|---|---|---|
| committer | Marcus Tomlinson <themarcustomlinson@gmail.com> | 2019-01-27 16:25:03 +0000 |
| commit | f31e1f80e4b96001735fb7faad9a21014906643b (patch) | |
| tree | a446dc4ecd028958ba4a8fe2fc8538c7dadb0f56 /RtAudio.cpp | |
| parent | 8c8240ecb91415f29b6809479a0ddea2b04dc210 (diff) | |
WASAPI: calloc stream buffers to ensure unused channels are left silent
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index 9927b26..babe13b 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -5191,8 +5191,8 @@ void RtApiWasapi::wasapiThread() } convBuffSize *= 2; // allow overflow for *SrRatio remainders - convBuffer = ( char* ) malloc( convBuffSize ); - stream_.deviceBuffer = ( char* ) malloc( deviceBuffSize ); + convBuffer = ( char* ) calloc( convBuffSize, 1 ); + stream_.deviceBuffer = ( char* ) calloc( deviceBuffSize, 1 ); if ( !convBuffer || !stream_.deviceBuffer ) { errorType = RtAudioError::MEMORY_ERROR; errorText = "RtApiWasapi::wasapiThread: Error allocating device buffer memory."; |
