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/volume.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/volume.h') diff --git a/src/volume.h b/src/volume.h index 0db231ef6..66e7c43f0 100644 --- a/src/volume.h +++ b/src/volume.h @@ -36,4 +36,13 @@ read_sw_volume_state(const char *line); void save_sw_volume_state(FILE *fp); +/** + * Generates a hash number for the current state of the software + * volume control. This is used by timer_save_state_file() to + * determine whether the state has changed and the state file should + * be saved. + */ +unsigned +sw_volume_state_get_hash(void); + #endif -- cgit v1.2.3