diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-07 13:27:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 13:27:25 +0200 |
commit | af935af38dc0dfc01b010920c8624ac09491ea55 (patch) | |
tree | ab7ba5d301b6c5a4e9b06c259c160fa43252a038 /drivers/wasapi/audio_driver_wasapi.cpp | |
parent | 1f2bcb8f025e33718d06a72cbd439f1ba02aed0f (diff) | |
parent | 47c558b98abf842910c780294314326662410cdf (diff) |
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
Diffstat (limited to 'drivers/wasapi/audio_driver_wasapi.cpp')
-rw-r--r-- | drivers/wasapi/audio_driver_wasapi.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index fea38ee95d..b0f102f1a3 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -343,8 +343,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); - input_position = 0; - input_size = 0; + capture_position = 0; + capture_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"); @@ -363,7 +363,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); - input_buffer_init(max_frames); + capture_buffer_init(max_frames); return OK; } @@ -716,8 +716,8 @@ void AudioDriverWASAPI::thread_func(void *p_udata) { } } - ad->input_buffer_write(l); - ad->input_buffer_write(r); + ad->capture_buffer_write(l); + ad->capture_buffer_write(r); } read_frames += num_frames_available; |