more consistent error report across examples
parent
7ad0e604af
commit
5ec11f4d5a
|
@ -37,10 +37,10 @@ int main(int argc, char const * arg[])
|
|||
out, olen, &odone, /* Output. */
|
||||
NULL, NULL, NULL); /* Default configuration.*/
|
||||
|
||||
unsigned i = 0; /* Print out the resampled data... */
|
||||
unsigned i = 0; /* Print out the resampled data, */
|
||||
while (i++ < odone)
|
||||
printf("%5.2f%c", out[i-1], " \n"[!(i&7) || i == odone]);
|
||||
puts(soxr_strerror(error)); /* ...and the reported result. */
|
||||
printf("%-26s %s\n", arg[0], soxr_strerror(error)); /* and reported result. */
|
||||
|
||||
free(out); /* Tidy up. */
|
||||
return !!error;
|
||||
|
|
|
@ -28,9 +28,9 @@ int main(int argc, char const * arg[])
|
|||
data.src_ratio = orate / irate;
|
||||
error = src_simple(&data, SRC_SINC_FASTEST, 1);
|
||||
|
||||
while (i++ < data.output_frames_gen) /* Print out the resampled data... */
|
||||
while (i++ < data.output_frames_gen) /* Print out the resampled data, */
|
||||
printf("%5.2f%c", out[i-1], " \n"[!(i&7) || i == data.output_frames_gen]);
|
||||
puts(src_strerror(error)); /* ...and the reported result. */
|
||||
printf("%-26s %s\n", arg[0], src_strerror(error)); /* and reported result. */
|
||||
|
||||
free(out); /* Tidy up. */
|
||||
return !!error;
|
||||
|
|
Loading…
Reference in New Issue