diff options
author | Don Turner <donturner@google.com> | 2020-11-20 12:32:30 +0000 |
---|---|---|
committer | Don Turner <dturner@users.noreply.github.com> | 2020-11-24 16:48:05 +0000 |
commit | 7bc2eab88d41e37ae63ac78680a590f85be0bf9e (patch) | |
tree | 0c84e4917ffed5d8e252847524ff92ee379eac65 /src | |
parent | 18a06cb8512276b32b9e3df96c335041c525b098 (diff) | |
download | oboe-7bc2eab88d41e37ae63ac78680a590f85be0bf9e.tar.gz |
Add *FramesPerDataCallback and deprecate *FramesPerCallback methods
Diffstat (limited to 'src')
-rw-r--r-- | src/aaudio/AudioStreamAAudio.cpp | 2 | ||||
-rw-r--r-- | src/common/AudioStreamBuilder.cpp | 6 | ||||
-rw-r--r-- | src/common/DataConversionFlowGraph.cpp | 4 | ||||
-rw-r--r-- | src/common/QuirksManager.cpp | 2 | ||||
-rw-r--r-- | src/common/Utilities.cpp | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/aaudio/AudioStreamAAudio.cpp b/src/aaudio/AudioStreamAAudio.cpp index 1cd88d22..58b8bc8f 100644 --- a/src/aaudio/AudioStreamAAudio.cpp +++ b/src/aaudio/AudioStreamAAudio.cpp @@ -234,7 +234,7 @@ Result AudioStreamAAudio::open() { if (isDataCallbackSpecified()) { mLibLoader->builder_setDataCallback(aaudioBuilder, oboe_aaudio_data_callback_proc, this); - mLibLoader->builder_setFramesPerDataCallback(aaudioBuilder, getFramesPerCallback()); + mLibLoader->builder_setFramesPerDataCallback(aaudioBuilder, getFramesPerDataCallback()); if (!isErrorCallbackSpecified()) { // The app did not specify a callback so we should specify diff --git a/src/common/AudioStreamBuilder.cpp b/src/common/AudioStreamBuilder.cpp index 910b154e..dffcd75e 100644 --- a/src/common/AudioStreamBuilder.cpp +++ b/src/common/AudioStreamBuilder.cpp @@ -82,7 +82,7 @@ AudioStream *AudioStreamBuilder::build() { bool AudioStreamBuilder::isCompatible(AudioStreamBase &other) { return (getSampleRate() == oboe::Unspecified || getSampleRate() == other.getSampleRate()) && (getFormat() == (AudioFormat)oboe::Unspecified || getFormat() == other.getFormat()) - && (getFramesPerCallback() == oboe::Unspecified || getFramesPerCallback() == other.getFramesPerCallback()) + && (getFramesPerDataCallback() == oboe::Unspecified || getFramesPerDataCallback() == other.getFramesPerDataCallback()) && (getChannelCount() == oboe::Unspecified || getChannelCount() == other.getChannelCount()); } @@ -131,8 +131,8 @@ Result AudioStreamBuilder::openStream(AudioStream **streamPP) { if (getSampleRate() == oboe::Unspecified) { parentBuilder.setSampleRate(tempStream->getSampleRate()); } - if (getFramesPerCallback() == oboe::Unspecified) { - parentBuilder.setFramesPerCallback(tempStream->getFramesPerCallback()); + if (getFramesPerDataCallback() == oboe::Unspecified) { + parentBuilder.setFramesPerCallback(tempStream->getFramesPerDataCallback()); } // Use childStream in a FilterAudioStream. diff --git a/src/common/DataConversionFlowGraph.cpp b/src/common/DataConversionFlowGraph.cpp index ef99d6a7..2829e6f5 100644 --- a/src/common/DataConversionFlowGraph.cpp +++ b/src/common/DataConversionFlowGraph.cpp @@ -82,12 +82,12 @@ Result DataConversionFlowGraph::configure(AudioStream *sourceStream, AudioStream AudioFormat sourceFormat = sourceStream->getFormat(); int32_t sourceChannelCount = sourceStream->getChannelCount(); int32_t sourceSampleRate = sourceStream->getSampleRate(); - int32_t sourceFramesPerCallback = sourceStream->getFramesPerCallback(); + int32_t sourceFramesPerCallback = sourceStream->getFramesPerDataCallback(); AudioFormat sinkFormat = sinkStream->getFormat(); int32_t sinkChannelCount = sinkStream->getChannelCount(); int32_t sinkSampleRate = sinkStream->getSampleRate(); - int32_t sinkFramesPerCallback = sinkStream->getFramesPerCallback(); + int32_t sinkFramesPerCallback = sinkStream->getFramesPerDataCallback(); LOGI("%s() flowgraph converts channels: %d to %d, format: %d to %d" ", rate: %d to %d, cbsize: %d to %d, qual = %d", diff --git a/src/common/QuirksManager.cpp b/src/common/QuirksManager.cpp index 68f328e0..aa285de0 100644 --- a/src/common/QuirksManager.cpp +++ b/src/common/QuirksManager.cpp @@ -139,7 +139,7 @@ bool QuirksManager::isConversionNeeded( if (OboeGlobals::areWorkaroundsEnabled() && builder.willUseAAudio() && builder.isDataCallbackSpecified() - && builder.getFramesPerCallback() != 0 + && builder.getFramesPerDataCallback() != 0 && getSdkVersion() <= __ANDROID_API_R__) { LOGI("QuirksManager::%s() avoid setFramesPerCallback(n>0)", __func__); childBuilder.setFramesPerCallback(oboe::Unspecified); diff --git a/src/common/Utilities.cpp b/src/common/Utilities.cpp index c3acf476..d38874b5 100644 --- a/src/common/Utilities.cpp +++ b/src/common/Utilities.cpp @@ -183,7 +183,7 @@ const char *convertToText<AudioStream*>(AudioStream* stream) { <<"BufferCapacity: "<<stream->getBufferCapacityInFrames()<<std::endl <<"BufferSize: "<<stream->getBufferSizeInFrames()<<std::endl <<"FramesPerBurst: "<< stream->getFramesPerBurst()<<std::endl - <<"FramesPerCallback: "<<stream->getFramesPerCallback()<<std::endl + <<"FramesPerDataCallback: "<<stream->getFramesPerDataCallback()<<std::endl <<"SampleRate: "<<stream->getSampleRate()<<std::endl <<"ChannelCount: "<<stream->getChannelCount()<<std::endl <<"Format: "<<oboe::convertToText(stream->getFormat())<<std::endl |