1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Cleanup Android C++ code

This commit is contained in:
Marcel Admiraal
2022-05-30 22:13:49 +01:00
parent a837accc5d
commit 2afef001e7
33 changed files with 181 additions and 238 deletions

View File

@@ -80,8 +80,6 @@ void AudioDriverOpenSL::_buffer_callbacks(
ad->_buffer_callback(queueItf);
}
AudioDriverOpenSL *AudioDriverOpenSL::s_ad = nullptr;
const char *AudioDriverOpenSL::get_name() const {
return "Android";
}
@@ -133,8 +131,6 @@ void AudioDriverOpenSL::start() {
ERR_FAIL_COND(res != SL_RESULT_SUCCESS);
SLDataLocator_AndroidSimpleBufferQueue loc_bufq = { SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, BUFFER_COUNT };
//bufferQueue.locatorType = SL_DATALOCATOR_BUFFERQUEUE;
//bufferQueue.numBuffers = BUFFER_COUNT; /* Four buffers in our buffer queue */
/* Setup the format of the content in the buffer queue */
pcm.formatType = SL_DATAFORMAT_PCM;
pcm.numChannels = 2;
@@ -155,13 +151,8 @@ void AudioDriverOpenSL::start() {
locator_outputmix.outputMix = OutputMix;
audioSink.pLocator = (void *)&locator_outputmix;
audioSink.pFormat = nullptr;
/* Initialize the context for Buffer queue callbacks */
//cntxt.pDataBase = (void*)&pcmData;
//cntxt.pData = cntxt.pDataBase;
//cntxt.size = sizeof(pcmData);
/* Create the music player */
{
const SLInterfaceID ids[2] = { SL_IID_BUFFERQUEUE, SL_IID_EFFECTSEND };
const SLboolean req[2] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
@@ -341,5 +332,4 @@ void AudioDriverOpenSL::set_pause(bool p_pause) {
}
AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
}