1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Fix possible audio input buffer issues

This commit is contained in:
Marcelo Fernandez
2018-10-19 16:32:03 -03:00
parent cf7a66195f
commit fa26a5511d
8 changed files with 33 additions and 23 deletions

View File

@@ -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;
}