aboutsummaryrefslogtreecommitdiff
path: root/src/output_internal.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-28 20:43:23 +0100
committerMax Kellermann <max@duempel.org>2009-02-28 20:43:23 +0100
commitec4fd9fd88a10bfc88154e8e6791d5d69858a2e5 (patch)
treec98fe447adcafe85ba9ee94d93d98377f9ffdaeb /src/output_internal.h
parenta5c09c91c414ba08d915331797e717334ac06456 (diff)
output: use GTimer instead of time_t for reopen after failure
time() is not a monotonic timer, and MPD might get confused by clock skews. clock_gettime() provides a monotonic clock, but is not portable to non-POSIX systems (i.e. Windows). This patch uses GLib's GTimer API, which aims to be portable.
Diffstat (limited to 'src/output_internal.h')
-rw-r--r--src/output_internal.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/output_internal.h b/src/output_internal.h
index c5ed7652..498f45d0 100644
--- a/src/output_internal.h
+++ b/src/output_internal.h
@@ -65,10 +65,11 @@ struct audio_output {
bool open;
/**
- * If not zero, the device has failed, and should not be
- * reopened automatically before this time stamp.
+ * If not NULL, the device has failed, and this timer is used
+ * to estimate how long it should stay disabled (unless
+ * explicitly reopened with "play").
*/
- time_t reopen_after;
+ GTimer *fail_timer;
/**
* The audio_format in which audio data is received from the