summaryrefslogtreecommitdiff
path: root/platform/android/audio_driver_opensl.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-07 13:27:25 +0200
committerGitHub <noreply@github.com>2019-08-07 13:27:25 +0200
commitaf935af38dc0dfc01b010920c8624ac09491ea55 (patch)
treeab7ba5d301b6c5a4e9b06c259c160fa43252a038 /platform/android/audio_driver_opensl.cpp
parent1f2bcb8f025e33718d06a72cbd439f1ba02aed0f (diff)
parent47c558b98abf842910c780294314326662410cdf (diff)
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
Diffstat (limited to 'platform/android/audio_driver_opensl.cpp')
-rw-r--r--platform/android/audio_driver_opensl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index 1232fc7453..3f7fd07997 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -215,8 +215,8 @@ void AudioDriverOpenSL::_record_buffer_callback(SLAndroidSimpleBufferQueueItf qu
for (int i = 0; i < rec_buffer.size(); i++) {
int32_t sample = rec_buffer[i] << 16;
- input_buffer_write(sample);
- input_buffer_write(sample); // call twice to convert to Stereo
+ capture_buffer_write(sample);
+ capture_buffer_write(sample); // call twice to convert to Stereo
}
SLresult res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t));
@@ -287,7 +287,7 @@ Error AudioDriverOpenSL::capture_init_device() {
const int rec_buffer_frames = 2048;
rec_buffer.resize(rec_buffer_frames);
- input_buffer_init(rec_buffer_frames);
+ capture_buffer_init(rec_buffer_frames);
res = (*recordBufferQueueItf)->Enqueue(recordBufferQueueItf, rec_buffer.ptrw(), rec_buffer.size() * sizeof(int16_t));
ERR_FAIL_COND_V(res != SL_RESULT_SUCCESS, ERR_CANT_OPEN);