Signed-off-by: Peter Meerwald <pme...@pmeerw.net> --- src/pulse/sample.c | 4 ---- src/pulse/sample.h | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/pulse/sample.c b/src/pulse/sample.c index 0d81a32..52ded48 100644 --- a/src/pulse/sample.c +++ b/src/pulse/sample.c @@ -111,10 +111,6 @@ int pa_sample_rate_valid(uint32_t rate) { return rate > 0 && rate <= PA_RATE_MAX; } -int pa_channels_valid(uint8_t channels) { - return channels > 0 && channels <= PA_CHANNELS_MAX; -} - int pa_sample_spec_valid(const pa_sample_spec *spec) { pa_assert(spec); diff --git a/src/pulse/sample.h b/src/pulse/sample.h index 86973d4..86f65b1 100644 --- a/src/pulse/sample.h +++ b/src/pulse/sample.h @@ -297,7 +297,9 @@ int pa_sample_rate_valid(uint32_t rate) PA_GCC_PURE; /** Return non-zero if the channel count is within the supported range. * \since 5.0 */ -int pa_channels_valid(uint8_t channels) PA_GCC_PURE; +static inline int pa_channels_valid(uint8_t channels) { + return channels > 0 && channels <= PA_CHANNELS_MAX; +} /** Return non-zero when the sample type specification is valid */ int pa_sample_spec_valid(const pa_sample_spec *spec) PA_GCC_PURE; -- 1.9.1 _______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss