From 6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Sun, 29 Mar 2015 00:49:22 -0700 Subject: Return number of frames output from resample method Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f --- services/audioflinger/tests/resampler_tests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/tests') 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; } } -- cgit v1.1