diff options
author | Ricardo Garcia <rago@google.com> | 2015-04-18 14:47:04 -0700 |
---|---|---|
committer | Ricardo Garcia <rago@google.com> | 2015-04-22 10:57:24 -0700 |
commit | 5a8a95de6dad1a3bcf3da5a37b35766e89086e13 (patch) | |
tree | 64b82016eaef26f51b75470714172c06287c9c56 /include/media/AudioTrack.h | |
parent | ea44f41bb142555e747cc11382296e94af99d312 (diff) | |
download | frameworks_av-5a8a95de6dad1a3bcf3da5a37b35766e89086e13.zip frameworks_av-5a8a95de6dad1a3bcf3da5a37b35766e89086e13.tar.gz frameworks_av-5a8a95de6dad1a3bcf3da5a37b35766e89086e13.tar.bz2 |
Use AudioPlaybackRate to hold TimestretchBufferProvider parameters
Use this struct to handle the parameters for TimestretchBufferProvider all
across the system.
Add stretch mode and fallback mode to TimestretchBuffer Provider.
Change-Id: I19099924a7003c62e48bb6ead56c785cb129fba2
Diffstat (limited to 'include/media/AudioTrack.h')
-rw-r--r-- | include/media/AudioTrack.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index a06197f..2d34c02 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -21,6 +21,7 @@ #include <media/AudioSystem.h> #include <media/AudioTimestamp.h> #include <media/IAudioTrack.h> +#include <media/AudioResamplerPublic.h> #include <utils/threads.h> namespace android { @@ -369,10 +370,10 @@ public: * Speed increases the playback rate of media, but does not alter pitch. * Pitch increases the "tonal frequency" of media, but does not affect the playback rate. */ - status_t setPlaybackRate(float speed, float pitch); + status_t setPlaybackRate(const AudioPlaybackRate &playbackRate); /* Return current playback rate */ - void getPlaybackRate(float *speed, float *pitch) const; + const AudioPlaybackRate& getPlaybackRate() const; /* Enables looping and sets the start and end points of looping. * Only supported for static buffer mode. @@ -748,8 +749,7 @@ protected: float mVolume[2]; float mSendLevel; mutable uint32_t mSampleRate; // mutable because getSampleRate() can update it - float mSpeed; // timestretch: 1.0f for normal speed. - float mPitch; // timestretch: 1.0f for normal pitch. + AudioPlaybackRate mPlaybackRate; size_t mFrameCount; // corresponds to current IAudioTrack, value is // reported back by AudioFlinger to the client size_t mReqFrameCount; // frame count to request the first or next time |