From c594afeee70b29cc88e337a3b8fbd2a39ac37822 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Fri, 5 Nov 2010 18:34:06 +0100
Subject: pipe: add helper function music_pipe_empty()

---
 src/pipe.h | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/pipe.h')

diff --git a/src/pipe.h b/src/pipe.h
index f91fc1c7f..2825b320a 100644
--- a/src/pipe.h
+++ b/src/pipe.h
@@ -99,4 +99,10 @@ music_pipe_push(struct music_pipe *mp, struct music_chunk *chunk);
 unsigned
 music_pipe_size(const struct music_pipe *mp);
 
+static inline bool
+music_pipe_empty(const struct music_pipe *mp)
+{
+	return music_pipe_size(mp) == 0;
+}
+
 #endif
-- 
cgit v1.2.3