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 /include | |
parent | 18a06cb8512276b32b9e3df96c335041c525b098 (diff) | |
download | oboe-7bc2eab88d41e37ae63ac78680a590f85be0bf9e.tar.gz |
Add *FramesPerDataCallback and deprecate *FramesPerCallback methods
Diffstat (limited to 'include')
-rw-r--r-- | include/oboe/AudioStreamBase.h | 9 | ||||
-rw-r--r-- | include/oboe/AudioStreamBuilder.h | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/include/oboe/AudioStreamBase.h b/include/oboe/AudioStreamBase.h index 4597c3fb..d4317672 100644 --- a/include/oboe/AudioStreamBase.h +++ b/include/oboe/AudioStreamBase.h @@ -62,9 +62,14 @@ public: int32_t getSampleRate() const { return mSampleRate; } /** - * @return the number of frames in each callback or kUnspecified. + * @deprecated use `getFramesPerDataCallback` instead. */ - int32_t getFramesPerCallback() const { return mFramesPerCallback; } + int32_t getFramesPerCallback() const { return getFramesPerDataCallback(); } + + /** + * @return the number of frames in each data callback or kUnspecified. + */ + int32_t getFramesPerDataCallback() const { return mFramesPerCallback; } /** * @return the audio sample format (e.g. Float or I16) diff --git a/include/oboe/AudioStreamBuilder.h b/include/oboe/AudioStreamBuilder.h index d63578c3..de9c6069 100644 --- a/include/oboe/AudioStreamBuilder.h +++ b/include/oboe/AudioStreamBuilder.h @@ -75,6 +75,13 @@ public: } /** + * @deprecated use `setFramesPerDataCallback` instead. + */ + AudioStreamBuilder *setFramesPerCallback(int framesPerCallback) { + return setFramesPerDataCallback(framesPerCallback); + } + + /** * Request a specific number of frames for the data callback. * * Default is kUnspecified. If the value is unspecified then @@ -88,7 +95,7 @@ public: * @param framesPerCallback * @return pointer to the builder so calls can be chained */ - AudioStreamBuilder *setFramesPerCallback(int framesPerCallback) { + AudioStreamBuilder *setFramesPerDataCallback(int framesPerCallback) { mFramesPerCallback = framesPerCallback; return this; } |