diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-24 14:59:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 14:59:57 +0200 |
commit | 8a113b914380cf96806897e6b764035cc7c0091b (patch) | |
tree | b4772167fcbde00811bd6442a92fd9562347eb40 /drivers/wasapi/audio_driver_wasapi.cpp | |
parent | b33acc3cb6d2efeadc2e2cfd8a7a57b292871f52 (diff) | |
parent | fa26a5511d5e14f97551bdd1d427ed004b7acd80 (diff) |
Merge pull request #23175 from marcelofg55/input_buffer_fix
Fix possible audio input buffer issues
Diffstat (limited to 'drivers/wasapi/audio_driver_wasapi.cpp')
-rw-r--r-- | drivers/wasapi/audio_driver_wasapi.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index a91e41b008..8665f701b1 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -336,10 +336,7 @@ Error AudioDriverWASAPI::init_capture_device(bool reinit) { HRESULT hr = audio_input.audio_client->GetBufferSize(&max_frames); ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); - // Set the buffer size - input_buffer.resize(max_frames * CAPTURE_BUFFER_CHANNELS); - input_position = 0; - input_size = 0; + input_buffer_init(max_frames); return OK; } |