ref: 08286bbf24bdc732e78975cc0dccdc8884a5063b
parent: c770ed0961baf45b0fbc905dfe629f1a4f7ba7c4
author: Ulrich Klauer <ulrich@chirlu.de>
date: Sun Mar 3 15:54:37 EST 2013
Use binary mode when writing spectrogram to stdout Set standard output to binary mode before writing a spectrogram there. Necessary for Windows.
--- a/src/spectrogram.c
+++ b/src/spectrogram.c
@@ -537,9 +537,10 @@
double limit;
free(p->shared);
- if (p->using_stdout)
+ if (p->using_stdout) {+ SET_BINARY_MODE(stdout);
file = stdout;
- else {+ } else {file = fopen(p->out_name, "wb");
if (!file) { lsx_fail("failed to create `%s': %s", p->out_name, strerror(errno));--
⑨