chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b32e91
)
disorder-normalize should wait for sox to finish. I think this is
author
Richard Kettlewell
<rjk@greenend.org.uk>
Fri, 21 Dec 2007 14:55:59 +0000
(14:55 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Fri, 21 Dec 2007 14:55:59 +0000
(14:55 +0000)
mostly a test-time issue: disorder-speaker doesn't care about program
termination, just whether it gets the audio data.
server/normalize.c
patch
|
blob
|
blame
|
history
diff --git
a/server/normalize.c
b/server/normalize.c
index 87b0f3d7bc5c356419d60e4f4d6e5a391ca5b465..28faa8168ba9d55ef95fbd1c16ceb34fce592110 100644
(file)
--- a/
server/normalize.c
+++ b/
server/normalize.c
@@
-249,6
+249,13
@@
int main(int argc, char attribute((unused)) **argv) {
}
if(outfd != -1)
xclose(outfd);
}
if(outfd != -1)
xclose(outfd);
+ if(pid != -1) {
+ /* There's still a converter running */
+ if(waitpid(pid, &n, 0) < 0)
+ fatal(errno, "error calling waitpid");
+ if(n)
+ fatal(0, "sox failed: %#x", n);
+ }
return 0;
}
return 0;
}