diff options
Diffstat (limited to 'src/common/AudioStreamBuilder.cpp')
-rw-r--r-- | src/common/AudioStreamBuilder.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/AudioStreamBuilder.cpp b/src/common/AudioStreamBuilder.cpp index 5dbe38cc..f655f9fc 100644 --- a/src/common/AudioStreamBuilder.cpp +++ b/src/common/AudioStreamBuilder.cpp @@ -89,6 +89,11 @@ bool AudioStreamBuilder::isCompatible(AudioStreamBase &other) { } Result AudioStreamBuilder::openStream(AudioStream **streamPP) { + LOGW("Passing AudioStream pointer deprecated, Use openStream(std::shared_ptr<oboe::AudioStream> &stream) instead."); + return openStreamInternal(streamPP); +} + +Result AudioStreamBuilder::openStreamInternal(AudioStream **streamPP) { auto result = isValidConfig(); if (result != Result::OK) { LOGW("%s() invalid config %d", __func__, result); @@ -202,6 +207,7 @@ Result AudioStreamBuilder::openStream(AudioStream **streamPP) { } Result AudioStreamBuilder::openManagedStream(oboe::ManagedStream &stream) { + LOGW("`openManagedStream` is deprecated. Use openStream(std::shared_ptr<oboe::AudioStream> &stream) instead."); stream.reset(); AudioStream *streamptr; auto result = openStream(&streamptr); @@ -212,7 +218,7 @@ Result AudioStreamBuilder::openManagedStream(oboe::ManagedStream &stream) { Result AudioStreamBuilder::openStream(std::shared_ptr<AudioStream> &sharedStream) { sharedStream.reset(); AudioStream *streamptr; - auto result = openStream(&streamptr); + auto result = openStreamInternal(&streamptr); if (result == Result::OK) { sharedStream.reset(streamptr); // Save a weak_ptr in the stream for use with callbacks. |