Merge "Add floating point volume handling to AudioMixer"
diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
index 695767d..38ee82b 100644
--- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
+++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp
@@ -163,7 +163,7 @@
extern "C" int EffectCreate(const effect_uuid_t *uuid,
int32_t sessionId,
- int32_t ioId,
+ int32_t ioId __unused,
effect_handle_t *pHandle){
int ret = 0;
int sessionNo;
@@ -1360,7 +1360,7 @@
// pLow: lower band range
// pLow: upper band range
//----------------------------------------------------------------------------
-int32_t EqualizerGetBandFreqRange(EffectContext *pContext, int32_t band, uint32_t *pLow,
+int32_t EqualizerGetBandFreqRange(EffectContext *pContext __unused, int32_t band, uint32_t *pLow,
uint32_t *pHi){
*pLow = bandFreqRange[band][0];
*pHi = bandFreqRange[band][1];
@@ -1384,7 +1384,7 @@
// pLow: lower band range
// pLow: upper band range
//----------------------------------------------------------------------------
-int32_t EqualizerGetBand(EffectContext *pContext, uint32_t targetFreq){
+int32_t EqualizerGetBand(EffectContext *pContext __unused, uint32_t targetFreq){
int band = 0;
if(targetFreq < bandFreqRange[0][0]){
@@ -1884,7 +1884,6 @@
int status = 0;
int32_t *pParamTemp = (int32_t *)pParam;
int32_t param = *pParamTemp++;
- int32_t param2;
char *name;
//ALOGV("\tVirtualizer_getParameter start");
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 63799e1..cd05c54 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -2949,6 +2949,7 @@
sp<IMediaHTTPService> savedHTTPService = mHTTPService;
+ bool wasLooping = mFlags & LOOPING;
// Reset and recreate
reset_l();
@@ -2967,6 +2968,9 @@
// a MEDIA_ERROR to the client and abort the prepare
mFlags |= PREPARE_CANCELLED;
}
+ if (wasLooping) {
+ mFlags |= LOOPING;
+ }
mAudioTearDown = true;
mIsAsyncPrepare = true;
diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
index e25709d..42c9956 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp
@@ -721,7 +721,7 @@
vin.uChan = vin.yChan + vin.height * vin.pitch;
vin.vChan = vin.uChan + ((vin.height * vin.pitch) >> 2);
- unsigned long modTimeMs = 0;
+ ULong modTimeMs = 0;
int32_t nLayer = 0;
MP4HintTrack hintTrack;
if (!PVEncodeVideoFrame(mHandle, &vin, &vout,
diff --git a/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h b/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h
index a54fd8b..9451479 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h
+++ b/media/libstagefright/codecs/m4v_h263/enc/include/mp4enc_api.h
@@ -29,7 +29,7 @@
typedef unsigned short UShort;
typedef short Short;
typedef unsigned int Bool;
-typedef unsigned long ULong;
+typedef uint32_t ULong;
#define PV_CODEC_INIT 0
#define PV_CODEC_STOP 1
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp
index 06e8926..9a967c2 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/motion_comp.cpp
@@ -363,7 +363,7 @@
/* initialize offset to adjust pixel counter */
/* the next row; full-pel resolution */
- tmp = (ULong)prev & 0x3;
+ tmp = (uintptr_t)prev & 0x3;
if (tmp == 0) /* word-aligned */
{
@@ -466,7 +466,7 @@
/* Branch based on pixel location (half-pel or full-pel) for x and y */
rec -= 12; /* preset */
- tmp = (ULong)prev & 3;
+ tmp = (uintptr_t)prev & 3;
mask = 254;
mask |= (mask << 8);
mask |= (mask << 16); /* 0xFEFEFEFE */
@@ -791,7 +791,7 @@
/* Branch based on pixel location (half-pel or full-pel) for x and y */
rec -= 12; /* preset */
- tmp = (ULong)prev & 3;
+ tmp = (uintptr_t)prev & 3;
mask = 254;
mask |= (mask << 8);
mask |= (mask << 16); /* 0xFEFEFEFE */
@@ -1140,7 +1140,7 @@
mask |= (mask << 8);
mask |= (mask << 16); /* 0x3f3f3f3f */
- tmp = (ULong)prev & 3;
+ tmp = (uintptr_t)prev & 3;
rec -= 4; /* preset */
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h b/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h
index 0d5a3e8..2d44482 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h
+++ b/media/libstagefright/codecs/m4v_h263/enc/src/mp4def.h
@@ -60,7 +60,7 @@
typedef short Short;
typedef short int SInt;
typedef unsigned int Bool;
-typedef unsigned long ULong;
+typedef uint32_t ULong;
typedef void Void;
#define PV_CODEC_INIT 0
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 4df0921..be19554 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -327,7 +327,7 @@
void purgeStaleEffects_l();
// Set kEnableExtendedPrecision to true to use extended precision in MixerThread
- static const bool kEnableExtendedPrecision = false;
+ static const bool kEnableExtendedPrecision = true;
// Returns true if format is permitted for the PCM sink in the MixerThread
static inline bool isValidPcmSinkFormat(audio_format_t format) {
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 98f367e..bb3bce8 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -4105,7 +4105,7 @@
const AudioPolicyManager::VolumeCurvePoint
AudioPolicyManager::sSpeakerMediaVolumeCurveDrc[AudioPolicyManager::VOLCNT] = {
- {1, -56.0f}, {20, -34.0f}, {86, -10.0f}, {100, 0.0f}
+ {1, -55.0f}, {20, -43.0f}, {86, -12.0f}, {100, 0.0f}
};
const AudioPolicyManager::VolumeCurvePoint