summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-04-05 10:55:58 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-04-05 10:55:58 -0700
commit11d43b969589cd3b853c812f624db602dcdc0458 (patch)
tree551fc67ee1879f0273d6ad5419b3532cdacb14fc
parent7de711fdc11b1cf480e144bcee9d61678bca9487 (diff)
parentc5843be1d4f1b43c46210a3c5f46c9d90bee53fc (diff)
downloadandroid_external_sonivox-11d43b969589cd3b853c812f624db602dcdc0458.tar.gz
android_external_sonivox-11d43b969589cd3b853c812f624db602dcdc0458.tar.bz2
android_external_sonivox-11d43b969589cd3b853c812f624db602dcdc0458.zip
Merge tag 'android-6.0.1_r20' into HEAD
Ticket: CYNGNOS-2213 Android 6.0.1 release 20
-rw-r--r--arm-wt-22k/lib_src/eas_wtengine.c33
-rw-r--r--arm-wt-22k/lib_src/eas_wtsynth.c8
2 files changed, 41 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_wtengine.c b/arm-wt-22k/lib_src/eas_wtengine.c
index 224f60d..854d4b4 100644
--- a/arm-wt-22k/lib_src/eas_wtengine.c
+++ b/arm-wt-22k/lib_src/eas_wtengine.c
@@ -32,6 +32,9 @@
* includes
*------------------------------------
*/
+#include "log/log.h"
+#include <cutils/log.h>
+
#include "eas_types.h"
#include "eas_math.h"
#include "eas_audioconst.h"
@@ -88,6 +91,11 @@ void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pMixBuffer = pWTIntFrame->pMixBuffer;
pInputBuffer = pWTIntFrame->pAudioBuffer;
@@ -182,6 +190,11 @@ void WT_Interpolate (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pOutputBuffer = pWTIntFrame->pAudioBuffer;
loopEnd = (const EAS_SAMPLE*) pWTVoice->loopEnd + 1;
@@ -275,6 +288,11 @@ void WT_InterpolateNoLoop (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pOutputBuffer = pWTIntFrame->pAudioBuffer;
phaseInc = pWTIntFrame->frame.phaseIncrement;
@@ -363,6 +381,11 @@ void WT_VoiceFilter (S_FILTER_CONTROL *pFilter, S_WT_INT_FRAME *pWTIntFrame)
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pAudioBuffer = pWTIntFrame->pAudioBuffer;
z1 = pFilter->z1;
@@ -426,6 +449,11 @@ void WT_VoiceFilter (S_FILTER_CONTROL *pFilter, S_WT_INT_FRAME *pWTIntFrame)
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pOutputBuffer = pWTIntFrame->pAudioBuffer;
phaseInc = pWTIntFrame->frame.phaseIncrement;
@@ -569,6 +597,11 @@ void WT_InterpolateMono (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
EAS_I8 *pLoopStart;
numSamples = pWTIntFrame->numSamples;
+ if (numSamples <= 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ return;
+ }
pMixBuffer = pWTIntFrame->pMixBuffer;
/* calculate gain increment */
diff --git a/arm-wt-22k/lib_src/eas_wtsynth.c b/arm-wt-22k/lib_src/eas_wtsynth.c
index 45cf4b1..9257951 100644
--- a/arm-wt-22k/lib_src/eas_wtsynth.c
+++ b/arm-wt-22k/lib_src/eas_wtsynth.c
@@ -28,6 +28,9 @@
*/
// includes
+#include "log/log.h"
+#include <cutils/log.h>
+
#include "eas_data.h"
#include "eas_report.h"
#include "eas_host.h"
@@ -467,6 +470,11 @@ EAS_BOOL WT_CheckSampleEnd (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame, E
} else {
pWTIntFrame->numSamples = numSamples;
}
+ if (pWTIntFrame->numSamples < 0) {
+ ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
+ pWTIntFrame->numSamples = 0;
+ }
/* sound will be done this frame */
done = EAS_TRUE;