You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +00:00
Implement Audio Input support on Android
This commit is contained in:
@@ -54,13 +54,18 @@ class AudioDriverOpenSL : public AudioDriver {
|
||||
int32_t *mixdown_buffer;
|
||||
int last_free;
|
||||
|
||||
Vector<int16_t> rec_buffer;
|
||||
|
||||
SLPlayItf playItf;
|
||||
SLRecordItf recordItf;
|
||||
SLObjectItf sl;
|
||||
SLEngineItf EngineItf;
|
||||
SLObjectItf OutputMix;
|
||||
SLVolumeItf volumeItf;
|
||||
SLObjectItf player;
|
||||
SLObjectItf recorder;
|
||||
SLAndroidSimpleBufferQueueItf bufferQueueItf;
|
||||
SLAndroidSimpleBufferQueueItf recordBufferQueueItf;
|
||||
SLDataSource audioSource;
|
||||
SLDataFormat_PCM pcm;
|
||||
SLDataSink audioSink;
|
||||
@@ -76,6 +81,13 @@ class AudioDriverOpenSL : public AudioDriver {
|
||||
SLAndroidSimpleBufferQueueItf queueItf,
|
||||
void *pContext);
|
||||
|
||||
void _record_buffer_callback(
|
||||
SLAndroidSimpleBufferQueueItf queueItf);
|
||||
|
||||
static void _record_buffer_callbacks(
|
||||
SLAndroidSimpleBufferQueueItf queueItf,
|
||||
void *pContext);
|
||||
|
||||
public:
|
||||
void set_singleton();
|
||||
|
||||
@@ -91,6 +103,9 @@ public:
|
||||
|
||||
virtual void set_pause(bool p_pause);
|
||||
|
||||
virtual Error capture_start();
|
||||
virtual Error capture_stop();
|
||||
|
||||
AudioDriverOpenSL();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user