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.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/output_state.h') diff --git a/src/output_state.h b/src/output_state.h index 1efae94a1..3b865f5fe 100644 --- a/src/output_state.h +++ b/src/output_state.h @@ -34,4 +34,12 @@ audio_output_state_read(const char *line); void audio_output_state_save(FILE *fp); +/** + * Generates a version number for the current state of the audio + * outputs. This is used by timer_save_state_file() to determine + * whether the state has changed and the state file should be saved. + */ +unsigned +audio_output_state_get_version(void); + #endif -- cgit v1.2.3