diff options
author | Max Kellermann <max@duempel.org> | 2009-03-07 19:56:31 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-07 19:56:31 +0100 |
commit | 39d352195608f0f5ffa9f3762dbdebf4e44bccdc (patch) | |
tree | a72aefedc2b9159fe55ce17878ca3f4c53e9c761 /src/pipe.h | |
parent | b13cd03f756db4afe3fd719e551801cd632a596b (diff) |
music_pipe: added music_pipe_peek()
music_pipe_peek() is similar to music_pipe_shift(), but doesn't remove
the chunk. This allows it to be used with a "const" music_pipe.
Diffstat (limited to 'src/pipe.h')
-rw-r--r-- | src/pipe.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pipe.h b/src/pipe.h index f1a231542..7ed6c917d 100644 --- a/src/pipe.h +++ b/src/pipe.h @@ -41,6 +41,13 @@ void music_pipe_free(struct music_pipe *mp); /** + * Returns the first #music_chunk from the pipe. Returns NULL if the + * pipe is empty. + */ +const struct music_chunk * +music_pipe_peek(const struct music_pipe *mp); + +/** * Removes the first chunk from the head, and returns it. */ struct music_chunk * |