From: Lyndon Brown Date: Sun, 27 May 2018 04:57:52 +0000 (+0100) Subject: stream: pa_stream_[writable|readable]_size: constify X-Git-Tag: v12.99.1~331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=883421df03d88ef634fd06d6e5dc2faf70e52198;p=platform%2Fupstream%2Fpulseaudio.git stream: pa_stream_[writable|readable]_size: constify --- 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.