diff options
author | Andy Hung <hunga@google.com> | 2015-04-08 22:23:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-08 22:23:03 +0000 |
commit | 0c0acdadc9ca961acd1f3b4b85c2befef2dc7161 (patch) | |
tree | 7f0237c465a72f3a7e7f447835a7b558dc58a795 /services/audioflinger/tests/resampler_tests.cpp | |
parent | 303db9de6506db0c2b300863c39ece81721dd4e9 (diff) | |
parent | 6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec (diff) | |
download | frameworks_av-0c0acdadc9ca961acd1f3b4b85c2befef2dc7161.zip frameworks_av-0c0acdadc9ca961acd1f3b4b85c2befef2dc7161.tar.gz frameworks_av-0c0acdadc9ca961acd1f3b4b85c2befef2dc7161.tar.bz2 |
Merge "Return number of frames output from resample method"
Diffstat (limited to 'services/audioflinger/tests/resampler_tests.cpp')
-rw-r--r-- | services/audioflinger/tests/resampler_tests.cpp | 5 |
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; } } |