From 883421df03d88ef634fd06d6e5dc2faf70e52198 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Sun, 27 May 2018 05:57:52 +0100 Subject: [PATCH] stream: pa_stream_[writable|readable]_size: constify --- src/pulse/stream.c | 4 ++-- src/pulse/stream.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pulse/stream.c b/src/pulse/stream.c index e32dd00..4786d75 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -1678,7 +1678,7 @@ int pa_stream_drop(pa_stream *s) { return 0; } -size_t pa_stream_writable_size(pa_stream *s) { +size_t pa_stream_writable_size(const pa_stream *s) { pa_assert(s); pa_assert(PA_REFCNT_VALUE(s) >= 1); @@ -1689,7 +1689,7 @@ size_t pa_stream_writable_size(pa_stream *s) { return s->requested_bytes > 0 ? (size_t) s->requested_bytes : 0; } -size_t pa_stream_readable_size(pa_stream *s) { +size_t pa_stream_readable_size(const pa_stream *s) { pa_assert(s); pa_assert(PA_REFCNT_VALUE(s) >= 1); diff --git a/src/pulse/stream.h b/src/pulse/stream.h index 89a8924..4a2efad 100644 --- a/src/pulse/stream.h +++ b/src/pulse/stream.h @@ -566,12 +566,12 @@ int pa_stream_drop(pa_stream *p); * * (size_t) -1 is returned on error. */ -size_t pa_stream_writable_size(pa_stream *p); +size_t pa_stream_writable_size(const pa_stream *p); /** Return the number of bytes that may be read using pa_stream_peek(). * * (size_t) -1 is returned on error. */ -size_t pa_stream_readable_size(pa_stream *p); +size_t pa_stream_readable_size(const pa_stream *p); /** Drain a playback stream. Use this for notification when the * playback buffer is empty after playing all the audio in the buffer. -- 2.7.4