]> git.sesse.net Git - c64tapwav/commitdiff
More output to stderr.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 14 Mar 2015 17:23:44 +0000 (18:23 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 14 Mar 2015 17:23:44 +0000 (18:23 +0100)
decode.cpp

index a90ae8e6944167dc6051fb69c1f7e3f3450d8f2e..f9e525eeea07b8ebaf351d87d9870be36d1c22cb 100644 (file)
@@ -528,11 +528,11 @@ void spsa_train(const std::vector<float> &pcm, int sample_rate)
                        std::swap(pulses1, pulses2);
                }
                if (badness1 < best_badness) {
-                       printf("\nNew best filter (badness=%f):", badness1);
+                       fprintf(stderr, "\nNew best filter (badness=%f):", badness1);
                        for (int i = 0; i < NUM_FILTER_COEFF; ++i) {
-                               printf(" %.5f", vals1[i + 2]);
+                               fprintf(stderr, " %.5f", vals1[i + 2]);
                        }
-                       printf(", hysteresis limits = %f %f\n", vals1[0], vals1[1]);
+                       fprintf(stderr, ", hysteresis limits = %f %f\n", vals1[0], vals1[1]);
                        best_badness = badness1;
 
                        find_kmeans(pulses1, 1.0, train_snap_points);
@@ -541,8 +541,8 @@ void spsa_train(const std::vector<float> &pcm, int sample_rate)
                                output_cycle_plot(pulses1, 1.0);
                        }
                }
-               printf("%d ", n);
-               fflush(stdout);
+               fprintf(stderr, "%d ", n);
+               fflush(stderr);
        }
 }