From 5a8a95de6dad1a3bcf3da5a37b35766e89086e13 Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Sat, 18 Apr 2015 14:47:04 -0700 Subject: 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 --- services/audioflinger/AudioMixer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/audioflinger/AudioMixer.h') diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h index e27a0d1..7165c6c 100644 --- a/services/audioflinger/AudioMixer.h +++ b/services/audioflinger/AudioMixer.h @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -259,8 +260,7 @@ private: audio_channel_mask_t mMixerChannelMask; uint32_t mMixerChannelCount; - float mSpeed; - float mPitch; + AudioPlaybackRate mPlaybackRate; bool needsRamp() { return (volumeInc[0] | volumeInc[1] | auxInc) != 0; } bool setResampler(uint32_t trackSampleRate, uint32_t devSampleRate); @@ -274,7 +274,7 @@ private: void unprepareForDownmix(); status_t prepareForReformat(); void unprepareForReformat(); - bool setPlaybackRate(float speed, float pitch); + bool setPlaybackRate(const AudioPlaybackRate &playbackRate); void reconfigureBufferProviders(); }; -- cgit v1.1