From 91bc41ea20686307cb5642a945cef6a237958b12 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2020 17:46:25 +0100 Subject: pcm/Dsd2Pcm: add `noexcept` and remove `extern` --- src/pcm/Dsd2Pcm.hxx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/pcm/Dsd2Pcm.hxx') diff --git a/src/pcm/Dsd2Pcm.hxx b/src/pcm/Dsd2Pcm.hxx index a56ff92cc..8179b4b6a 100644 --- a/src/pcm/Dsd2Pcm.hxx +++ b/src/pcm/Dsd2Pcm.hxx @@ -45,24 +45,28 @@ typedef struct dsd2pcm_ctx_s dsd2pcm_ctx; * POSIX thread-safety definition because it modifies global state * (lookup tables are computed during the first call) */ -extern dsd2pcm_ctx* dsd2pcm_init(); +dsd2pcm_ctx * +dsd2pcm_init() noexcept; /** * deinitializes a "dsd2pcm engine" * (releases memory, don't forget!) */ -extern void dsd2pcm_destroy(dsd2pcm_ctx *ctx); +void +dsd2pcm_destroy(dsd2pcm_ctx *ctx) noexcept; /** * clones the context and returns a pointer to the * newly allocated copy */ -extern dsd2pcm_ctx* dsd2pcm_clone(dsd2pcm_ctx *ctx); +dsd2pcm_ctx * +dsd2pcm_clone(dsd2pcm_ctx *ctx) noexcept; /** * resets the internal state for a fresh new stream */ -extern void dsd2pcm_reset(dsd2pcm_ctx *ctx); +void +dsd2pcm_reset(dsd2pcm_ctx *ctx) noexcept; /** * "translates" a stream of octets to a stream of floats @@ -75,11 +79,12 @@ extern void dsd2pcm_reset(dsd2pcm_ctx *ctx); * @param dst -- pointer to first float (output) * @param dst_stride -- dst pointer increment */ -extern void dsd2pcm_translate(dsd2pcm_ctx *ctx, - size_t samples, - const unsigned char *src, ptrdiff_t src_stride, - int lsbitfirst, - float *dst, ptrdiff_t dst_stride); +void +dsd2pcm_translate(dsd2pcm_ctx *ctx, + size_t samples, + const unsigned char *src, ptrdiff_t src_stride, + int lsbitfirst, + float *dst, ptrdiff_t dst_stride) noexcept; #endif /* include guard DSD2PCM_H_INCLUDED */ -- cgit v1.2.3