summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioFlinger.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-07-15 12:50:15 -0700
committerEric Laurent <elaurent@google.com>2010-07-15 12:50:15 -0700
commit76c40f74ced0b034a534ebc31ab9616425d3e711 (patch)
treeb33179a46bde9354636c76597b712a03d923547b /services/audioflinger/AudioFlinger.h
parentc98e431119867dbc4ae3da52d5c374607c0f67b9 (diff)
downloadframeworks_base-76c40f74ced0b034a534ebc31ab9616425d3e711.zip
frameworks_base-76c40f74ced0b034a534ebc31ab9616425d3e711.tar.gz
frameworks_base-76c40f74ced0b034a534ebc31ab9616425d3e711.tar.bz2
Several improvements in audio effects volume control.
- Fixed crash when deleting an effect chained before an effect having volume control - Changed EFFECT_FLAG_VOLUME_CTRL to implicitely include EFFECT_FLAG_VOLUME_IND (not need to set both in effect descriptor). - Volume control changes from one effect to another if needed according to effect enable state - EFFECT_CMD_SET_VOLUME is only sent when their is an actual change in volume Change-Id: Ieebaf09157e2627366023569d95516646e03e26c
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r--services/audioflinger/AudioFlinger.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 7013d76..4507a48 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -1061,18 +1061,17 @@ private:
mLock.unlock();
}
- status_t addEffect(sp<EffectModule>& handle);
- size_t removeEffect(const sp<EffectModule>& handle);
+ status_t addEffect_l(sp<EffectModule>& handle);
+ size_t removeEffect_l(const sp<EffectModule>& handle);
int sessionId() {
return mSessionId;
}
- sp<EffectModule> getEffectFromDesc(effect_descriptor_t *descriptor);
- sp<EffectModule> getEffectFromId(int id);
- sp<EffectModule> getVolumeController();
- bool setVolume(uint32_t *left, uint32_t *right);
- void setDevice(uint32_t device);
- void setMode(uint32_t mode);
+ sp<EffectModule> getEffectFromDesc_l(effect_descriptor_t *descriptor);
+ sp<EffectModule> getEffectFromId_l(int id);
+ bool setVolume_l(uint32_t *left, uint32_t *right);
+ void setDevice_l(uint32_t device);
+ void setMode_l(uint32_t mode);
void setInBuffer(int16_t *buffer, bool ownsBuffer = false) {
@@ -1106,9 +1105,11 @@ private:
int mSessionId; // audio session ID
int16_t *mInBuffer; // chain input buffer
int16_t *mOutBuffer; // chain output buffer
- int mVolumeCtrlIdx; // index of insert effect having control over volume
int mActiveTrackCnt; // number of active tracks connected
bool mOwnInBuffer; // true if the chain owns its input buffer
+ int mVolumeCtrlIdx; // index of insert effect having control over volume
+ uint32_t mLeftVolume; // previous volume on left channel
+ uint32_t mRightVolume; // previous volume on right channel
};
friend class RecordThread;