From ecb118f1edab572a904890eddafd3b11c0a79a79 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Oct 2009 15:22:39 +0200 Subject: state_file: save only if something has changed If nothing has changed since the last save, don't save the state file. Saving will spin up the hard drive, which is undesirable on hosts where MPD is idling in background. --- src/output_state.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/output_state.c') diff --git a/src/output_state.c b/src/output_state.c index 7fc60518c..be135f6d0 100644 --- a/src/output_state.c +++ b/src/output_state.c @@ -34,6 +34,8 @@ #define AUDIO_DEVICE_STATE "audio_device_state:" +unsigned audio_output_state_version; + void audio_output_state_save(FILE *fp) { @@ -80,3 +82,9 @@ audio_output_state_read(const char *line) ao->enabled = false; return true; } + +unsigned +audio_output_state_get_version(void) +{ + return audio_output_state_version; +} -- cgit v1.2.3