diff options
author | Eric Laurent <elaurent@google.com> | 2009-05-22 09:18:15 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2009-05-26 07:44:28 -0700 |
commit | 4bc035a65cac177be9294e69f110497e3b6e34e6 (patch) | |
tree | 634b5bde8fc4cae5a7b77ee3cde01f04bc9ae7fc /libs/audioflinger/AudioFlinger.h | |
parent | a5f158bdde77f8d173d1f1c95d0f92405c519b0f (diff) | |
download | frameworks_base-4bc035a65cac177be9294e69f110497e3b6e34e6.zip frameworks_base-4bc035a65cac177be9294e69f110497e3b6e34e6.tar.gz frameworks_base-4bc035a65cac177be9294e69f110497e3b6e34e6.tar.bz2 |
Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.
A second change is required in opencore author driver and android audio input to completely fix the issue.
Diffstat (limited to 'libs/audioflinger/AudioFlinger.h')
-rw-r--r-- | libs/audioflinger/AudioFlinger.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h index c7ca9ec..8e47b29 100644 --- a/libs/audioflinger/AudioFlinger.h +++ b/libs/audioflinger/AudioFlinger.h @@ -139,7 +139,7 @@ public: // record interface virtual sp<IAudioRecord> openRecord( pid_t pid, - int streamType, + int inputSource, uint32_t sampleRate, int format, int channelCount, @@ -232,7 +232,6 @@ private: TrackBase(const sp<MixerThread>& mixerThread, const sp<Client>& client, - int streamType, uint32_t sampleRate, int format, int channelCount, @@ -260,10 +259,6 @@ private: return mCblk; } - int type() const { - return mStreamType; - } - int format() const { return mFormat; } @@ -293,7 +288,6 @@ private: sp<Client> mClient; sp<IMemory> mCblkMemory; audio_track_cblk_t* mCblk; - int mStreamType; void* mBuffer; void* mBufferEnd; uint32_t mFrameCount; @@ -328,6 +322,11 @@ private: void mute(bool); void setVolume(float left, float right); + int type() const { + return mStreamType; + } + + protected: friend class MixerThread; friend class AudioFlinger; @@ -364,6 +363,7 @@ private: int8_t mRetryCount; sp<IMemory> mSharedBuffer; bool mResetDone; + int mStreamType; }; // end of Track // record track @@ -371,7 +371,7 @@ private: public: RecordTrack(const sp<MixerThread>& mixerThread, const sp<Client>& client, - int streamType, + int inputSource, uint32_t sampleRate, int format, int channelCount, @@ -385,6 +385,8 @@ private: bool overflow() { bool tmp = mOverflow; mOverflow = false; return tmp; } bool setOverflow() { bool tmp = mOverflow; mOverflow = true; return tmp; } + int inputSource() const { return mInputSource; } + private: friend class AudioFlinger; friend class AudioFlinger::RecordHandle; @@ -397,6 +399,7 @@ private: virtual status_t getNextBuffer(AudioBufferProvider::Buffer* buffer); bool mOverflow; + int mInputSource; }; // playback track |