From 837adb30fd92406c266b9a7ac2a652db2e38cfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 20 Jan 2020 13:11:47 +0100 Subject: Revert "Exposes capture methods to AudioServer + documentation" #30468 Reverts the following commits: - c81ec6f26d40b70283958a4ef3e216fb32cbaf14: "Exposes capture methods to AudioServer, variable renames for consistency, added documentation." - 47c558b98abf842910c780294314326662410cdf: "Expose audio callbacks as signals." - dabaa11b3c451e9b8f2cca7e563bd9ec51edb169: "Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings." Some documentation improvements were kept for pre-existing methods. See rationale for reverting these changes in #30468. --- drivers/wasapi/audio_driver_wasapi.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/wasapi') diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 8b342fb416..9a05284aea 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -342,8 +342,8 @@ Error AudioDriverWASAPI::init_render_device(bool reinit) { // Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels) samples_in.resize(buffer_frames * channels); - capture_position = 0; - capture_size = 0; + input_position = 0; + input_size = 0; print_verbose("WASAPI: detected " + itos(channels) + " channels"); print_verbose("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); @@ -362,7 +362,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); - capture_buffer_init(max_frames); + input_buffer_init(max_frames); return OK; } @@ -715,8 +715,8 @@ void AudioDriverWASAPI::thread_func(void *p_udata) { } } - ad->capture_buffer_write(l); - ad->capture_buffer_write(r); + ad->input_buffer_write(l); + ad->input_buffer_write(r); } read_frames += num_frames_available; -- cgit v1.2.3