Clean up statistics display for backends with no sync. Flush pipe and stdout backends when play stops.
This commit is contained in:
+4
-2
@@ -86,8 +86,10 @@ static int play(void *buf, int samples) {
|
||||
|
||||
static void stop(void) {
|
||||
// Don't close the pipe just because a play session has stopped.
|
||||
// if (fd > 0)
|
||||
// close(fd);
|
||||
// Flush it instead
|
||||
if (fd > 0)
|
||||
if (fsync(fd) != 0)
|
||||
debug(1, "Error flushing pipe when play stopped: \"%s\".", strerror(errno));
|
||||
}
|
||||
|
||||
static int init(int argc, char **argv) {
|
||||
|
||||
Reference in New Issue
Block a user