aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Burk <philburk@mobileer.com>2020-11-12 10:30:40 -0800
committerPhil Burk <philburk@mobileer.com>2020-11-18 10:29:42 -0800
commit32802e368b4eda01bebbadb0ff07dae405282698 (patch)
tree4bf94de6ad5a53f4b5a3883a99eb37cf9fc08acb /src
parent7b814ba2fcf8badf65b1565c62bafc6561a2cac5 (diff)
downloadoboe-32802e368b4eda01bebbadb0ff07dae405282698.tar.gz
oboe: cleanup new callbacks
Remove dead code and logs.
Diffstat (limited to 'src')
-rw-r--r--src/aaudio/AudioStreamAAudio.cpp1
-rw-r--r--src/common/AudioSourceCaller.cpp2
-rw-r--r--src/common/FilterAudioStream.cpp3
-rw-r--r--src/common/FilterAudioStream.h4
4 files changed, 4 insertions, 6 deletions
diff --git a/src/aaudio/AudioStreamAAudio.cpp b/src/aaudio/AudioStreamAAudio.cpp
index 0b7a2e8c..31917148 100644
--- a/src/aaudio/AudioStreamAAudio.cpp
+++ b/src/aaudio/AudioStreamAAudio.cpp
@@ -113,7 +113,6 @@ void AudioStreamAAudio::internalErrorCallback(
aaudio_result_t error) {
oboe::Result oboeResult = static_cast<Result>(error);
AudioStreamAAudio *oboeStream = reinterpret_cast<AudioStreamAAudio*>(userData);
- LOGI("%s() oboeResult = %d", __func__, oboeResult);
oboeStream->mErrorCallbackResult = oboeResult;
// Prevents deletion of the stream if the app is using AudioStreamBuilder::openStream(shared_ptr)
diff --git a/src/common/AudioSourceCaller.cpp b/src/common/AudioSourceCaller.cpp
index 854ade9c..a19cf813 100644
--- a/src/common/AudioSourceCaller.cpp
+++ b/src/common/AudioSourceCaller.cpp
@@ -20,7 +20,7 @@ using namespace oboe;
using namespace flowgraph;
int32_t AudioSourceCaller::onProcessFixedBlock(uint8_t *buffer, int32_t numBytes) {
- oboe::AudioStreamDataCallback *callback = mStream->getDataCallback();
+ AudioStreamDataCallback *callback = mStream->getDataCallback();
int32_t result = 0;
int32_t numFrames = numBytes / mStream->getBytesPerFrame();
if (callback != nullptr) {
diff --git a/src/common/FilterAudioStream.cpp b/src/common/FilterAudioStream.cpp
index bacb54b4..975b03dd 100644
--- a/src/common/FilterAudioStream.cpp
+++ b/src/common/FilterAudioStream.cpp
@@ -100,8 +100,7 @@ DataCallbackResult FilterAudioStream::onAudioReady(AudioStream *oboeStream,
} else {
framesProcessed = mFlowGraph->write(audioData, numFrames);
}
- LOGI("%s() framesProcessed = %d, numFrames = %d", __func__, framesProcessed, numFrames);
return (framesProcessed < numFrames)
? DataCallbackResult::Stop
: mFlowGraph->getDataCallbackResult();
-} \ No newline at end of file
+}
diff --git a/src/common/FilterAudioStream.h b/src/common/FilterAudioStream.h
index be652c9d..9aa9d649 100644
--- a/src/common/FilterAudioStream.h
+++ b/src/common/FilterAudioStream.h
@@ -42,10 +42,10 @@ public:
: AudioStream(builder)
, mChildStream(childStream) {
// Intercept the callback if used.
- if (builder.getErrorCallback() != nullptr) {
+ if (builder.isErrorCallbackSpecified()) {
mErrorCallback = mChildStream->swapErrorCallback(this);
}
- if (builder.getDataCallback() != nullptr) {
+ if (builder.isDataCallbackSpecified()) {
mDataCallback = mChildStream->swapDataCallback(this);
} else {
const int size = childStream->getFramesPerBurst() * childStream->getBytesPerFrame();