liboboe: rename Oboe to AAudio
All of the edits were done using scripts in media/liboboe/scripts.
The conversion is done using SED, which is called from
convert_oboe_aaudio.sh
The conversion can be reverted when debugging using revert_all_aaudio.sh
The string substitutions are in oboe_to_aaudio.sed
Bug: 34749573
Test: cts/tests/tests/nativemedia/aaudio
Change-Id: Ia10b34472a90df2652b87607c99156e9084e57aa
Signed-off-by: Phil Burk <philburk@google.com>
diff --git a/media/liboboe/src/client/AudioEndpoint.cpp b/media/liboboe/src/client/AudioEndpoint.cpp
index 160c37e..5cd9782 100644
--- a/media/liboboe/src/client/AudioEndpoint.cpp
+++ b/media/liboboe/src/client/AudioEndpoint.cpp
@@ -14,19 +14,19 @@
* limitations under the License.
*/
-#define LOG_TAG "OboeAudio"
+#define LOG_TAG "AAudio"
//#define LOG_NDEBUG 0
#include <utils/Log.h>
#include <cassert>
-#include <oboe/OboeDefinitions.h>
+#include <aaudio/AAudioDefinitions.h>
#include "AudioEndpointParcelable.h"
#include "AudioEndpoint.h"
-#include "OboeServiceMessage.h"
+#include "AAudioServiceMessage.h"
using namespace android;
-using namespace oboe;
+using namespace aaudio;
AudioEndpoint::AudioEndpoint()
: mOutputFreeRunning(false)
@@ -80,13 +80,13 @@
AudioEndpoint_validateQueueDescriptor("data", &pEndpointDescriptor->downDataQueueDescriptor);
}
-oboe_result_t AudioEndpoint::configure(const EndpointDescriptor *pEndpointDescriptor)
+aaudio_result_t AudioEndpoint::configure(const EndpointDescriptor *pEndpointDescriptor)
{
- oboe_result_t result = OBOE_OK;
+ aaudio_result_t result = AAUDIO_OK;
AudioEndpoint_validateDescriptor(pEndpointDescriptor); // FIXME remove after debugging
const RingBufferDescriptor *descriptor = &pEndpointDescriptor->upMessageQueueDescriptor;
- assert(descriptor->bytesPerFrame == sizeof(OboeServiceMessage));
+ assert(descriptor->bytesPerFrame == sizeof(AAudioServiceMessage));
assert(descriptor->readCounterAddress != nullptr);
assert(descriptor->writeCounterAddress != nullptr);
mUpCommandQueue = new FifoBuffer(
@@ -137,12 +137,12 @@
return result;
}
-oboe_result_t AudioEndpoint::readUpCommand(OboeServiceMessage *commandPtr)
+aaudio_result_t AudioEndpoint::readUpCommand(AAudioServiceMessage *commandPtr)
{
return mUpCommandQueue->read(commandPtr, 1);
}
-oboe_result_t AudioEndpoint::writeDataNow(const void *buffer, int32_t numFrames)
+aaudio_result_t AudioEndpoint::writeDataNow(const void *buffer, int32_t numFrames)
{
return mDownDataQueue->write(buffer, numFrames);
}
@@ -167,15 +167,15 @@
return mDownDataQueue->getWriteCounter();
}
-oboe_size_frames_t AudioEndpoint::setBufferSizeInFrames(oboe_size_frames_t requestedFrames,
- oboe_size_frames_t *actualFrames)
+aaudio_size_frames_t AudioEndpoint::setBufferSizeInFrames(aaudio_size_frames_t requestedFrames,
+ aaudio_size_frames_t *actualFrames)
{
if (requestedFrames < ENDPOINT_DATA_QUEUE_SIZE_MIN) {
requestedFrames = ENDPOINT_DATA_QUEUE_SIZE_MIN;
}
mDownDataQueue->setThreshold(requestedFrames);
*actualFrames = mDownDataQueue->getThreshold();
- return OBOE_OK;
+ return AAUDIO_OK;
}
int32_t AudioEndpoint::getBufferSizeInFrames() const