summaryrefslogtreecommitdiffstats
path: root/media/libeffects
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-07-19 06:24:46 -0700
committerEric Laurent <elaurent@google.com>2010-07-19 06:31:30 -0700
commit0d7e048cf2e38d32568261760aef82d1ee145126 (patch)
tree8cc4ce1bd601dae9c7f98d0235ff2be3a28275cf /media/libeffects
parentfaf775e772e329e821d81ba735474df097b1e1e9 (diff)
downloadframeworks_base-0d7e048cf2e38d32568261760aef82d1ee145126.zip
frameworks_base-0d7e048cf2e38d32568261760aef82d1ee145126.tar.gz
frameworks_base-0d7e048cf2e38d32568261760aef82d1ee145126.tar.bz2
Fixed problems in audio effect volume control.
Fixed the following problems in audio effect volume control in AudioFlinger: - Make sure that the volumes returned by EffectChain::setVolume_l() are correct even is no change is detected since last call - Do not use isEnabled() to validate volume control but mState >= ACTIVE instead as the volume control must be also active in STOPPING and STOPPED states. Change-Id: Id62da3164fad500ee8a5efd6cd78c77e8fdcb541
Diffstat (limited to 'media/libeffects')
-rw-r--r--media/libeffects/visualizer/EffectVisualizer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libeffects/visualizer/EffectVisualizer.cpp b/media/libeffects/visualizer/EffectVisualizer.cpp
index bcda06e..ec13557 100644
--- a/media/libeffects/visualizer/EffectVisualizer.cpp
+++ b/media/libeffects/visualizer/EffectVisualizer.cpp
@@ -230,9 +230,6 @@ extern "C" int Visualizer_process(
if (pContext == NULL) {
return -EINVAL;
}
- if (pContext->mState != VISUALIZER_STATE_ACTIVE) {
- return -ENODATA;
- }
if (inBuffer == NULL || inBuffer->raw == NULL ||
outBuffer == NULL || outBuffer->raw == NULL ||
@@ -269,6 +266,9 @@ extern "C" int Visualizer_process(
memcpy(outBuffer->raw, inBuffer->raw, outBuffer->frameCount * 2 * sizeof(int16_t));
}
}
+ if (pContext->mState != VISUALIZER_STATE_ACTIVE) {
+ return -ENODATA;
+ }
return 0;
} // end Visualizer_process