From 88e209dcf8c2ebddda5c272f46d1bd5478bc639c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 7 Jul 2009 07:10:45 -0700 Subject: Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t. Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate(). AudioTrack::setSampleRate() no returns a status. --- include/media/AudioRecord.h | 4 +--- include/media/AudioTrack.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'include/media') diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 3694803..13e51ee 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -197,7 +197,6 @@ public: /* getters, see constructor */ - uint32_t sampleRate() const; int format() const; int channelCount() const; uint32_t frameCount() const; @@ -217,7 +216,7 @@ public: status_t stop(); bool stopped() const; - /* get sample rate for this track + /* get sample rate for this record track */ uint32_t getSampleRate(); @@ -323,7 +322,6 @@ private: sp mClientRecordThread; Mutex mRecordThreadLock; - uint32_t mSampleRate; uint32_t mFrameCount; audio_track_cblk_t* mCblk; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index ba0467c..7c86a65 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -201,7 +201,6 @@ public: /* getters, see constructor */ int streamType() const; - uint32_t sampleRate() const; int format() const; int channelCount() const; uint32_t frameCount() const; @@ -246,7 +245,7 @@ public: /* set sample rate for this track, mostly used for games' sound effects */ - void setSampleRate(int sampleRate); + status_t setSampleRate(int sampleRate); uint32_t getSampleRate(); /* Enables looping and sets the start and end points of looping. -- cgit v1.1