aboutsummaryrefslogtreecommitdiff
path: root/src/replay_gain_info.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-02-15 14:36:05 +0100
committerMax Kellermann <max@duempel.org>2010-02-15 19:09:24 +0100
commiteeef501ed865b4ef9e0c971829a39a98c7b81ee9 (patch)
tree89e5df10c0b123ed75d73f47ad3ffac84ba8ada1 /src/replay_gain_info.h
parentf4e9275f7c2f6b304aa3b2d3c83ee4ad1cf6ed95 (diff)
replay_gain: added function defined()
This function determines whether replay gain data is available.
Diffstat (limited to 'src/replay_gain_info.h')
-rw-r--r--src/replay_gain_info.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/replay_gain_info.h b/src/replay_gain_info.h
index 51a167ce..9a11a896 100644
--- a/src/replay_gain_info.h
+++ b/src/replay_gain_info.h
@@ -22,6 +22,8 @@
#include "check.h"
+#include <stdbool.h>
+
enum replay_gain_mode {
REPLAY_GAIN_OFF = -1,
REPLAY_GAIN_ALBUM,
@@ -49,4 +51,10 @@ replay_gain_info_dup(const struct replay_gain_info *src);
void
replay_gain_info_free(struct replay_gain_info *info);
+static inline bool
+replay_gain_tuple_defined(const struct replay_gain_tuple *tuple)
+{
+ return tuple->gain > 0.0;
+}
+
#endif