diff options
author | Robert Wu <85952307+robertwu1@users.noreply.github.com> | 2023-07-10 10:06:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-10 10:06:43 -0700 |
commit | 64f8811144101986b4a8781d7b85a68a0f136f13 (patch) | |
tree | 1a9306b5ea8a70de78ccc11525ca3ceca67b56f4 | |
parent | fa445435372da84252f3e1cf2da6e71fdc4c09f9 (diff) | |
download | oboe-64f8811144101986b4a8781d7b85a68a0f136f13.tar.gz |
OboeTester: clear volume ramps on start (#1848)
-rw-r--r-- | apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp | 9 | ||||
-rw-r--r-- | apps/OboeTester/app/src/main/cpp/NativeAudioContext.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp index 59afa377..cd5639dd 100644 --- a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp +++ b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.cpp @@ -497,6 +497,15 @@ void ActivityTestOutput::runBlockingIO() { } } +oboe::Result ActivityTestOutput::startStreams() { + mSinkFloat->pullReset(); + mSinkI16->pullReset(); + mSinkI24->pullReset(); + mSinkI32->pullReset(); + mVolumeRamp->setTarget(mAmplitude); + return getOutputStream()->start(); +} + // ======================================================================= ActivityTestInput void ActivityTestInput::configureAfterOpen() { mInputAnalyzer.reset(); diff --git a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.h b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.h index e04f0dbf..a2180a92 100644 --- a/apps/OboeTester/app/src/main/cpp/NativeAudioContext.h +++ b/apps/OboeTester/app/src/main/cpp/NativeAudioContext.h @@ -410,9 +410,7 @@ public: void close(int32_t streamIndex) override; - oboe::Result startStreams() override { - return getOutputStream()->start(); - } + oboe::Result startStreams() override; void configureAfterOpen() override; |