summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/tests
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-03-29 00:49:22 -0700
committerAndy Hung <hunga@google.com>2015-04-08 14:31:58 -0700
commit6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec (patch)
tree1cec011ad26676dc9dc3eea778e18136c083e04f /services/audioflinger/tests
parent25f82752942b1c78aec8ee303d61afff85cff9d1 (diff)
downloadframeworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.zip
frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.gz
frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.bz2
Return number of frames output from resample method
Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f
Diffstat (limited to 'services/audioflinger/tests')
-rw-r--r--services/audioflinger/tests/resampler_tests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/audioflinger/tests/resampler_tests.cpp b/services/audioflinger/tests/resampler_tests.cpp
index d6217ba..9e375db 100644
--- a/services/audioflinger/tests/resampler_tests.cpp
+++ b/services/audioflinger/tests/resampler_tests.cpp
@@ -48,7 +48,10 @@ void resample(int channels, void *output,
if (thisFrames == 0 || thisFrames > outputFrames - i) {
thisFrames = outputFrames - i;
}
- resampler->resample((int32_t*) output + channels*i, thisFrames, provider);
+ size_t framesResampled = resampler->resample(
+ (int32_t*) output + channels*i, thisFrames, provider);
+ // we should have enough buffer space, so there is no short count.
+ ASSERT_EQ(thisFrames, framesResampled);
i += thisFrames;
}
}