]> code.delx.au - pulseaudio/commitdiff
tests: Minor alignment adjustment fix for cpu-test
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 30 Oct 2012 14:58:24 +0000 (20:28 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 30 Oct 2012 15:04:20 +0000 (20:34 +0530)
src/tests/cpu-test.c

index 8f6f936a4969f10d2035ce5310de56dd969bf0e6..8e196e5bf71c20448eaf9b3cb1e2dea48da84b8c 100644 (file)
@@ -83,7 +83,8 @@ static void run_volume_test(pa_do_volume_func_t func, pa_do_volume_func_t orig_f
     samples_ref = s_ref + (8 - align);
     samples_orig = s_orig + (8 - align);
     nsamples = SAMPLES - (8 - align);
-    nsamples += nsamples % channels;
+    if (nsamples % channels)
+        nsamples += nsamples % channels;
     size = nsamples * sizeof(*samples);
 
     pa_random(samples, size);