diff options
author | Max Kellermann <max@duempel.org> | 2011-10-20 02:25:40 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-20 02:27:41 +0200 |
commit | 13ad2b4dc2a11ab7bad3703cdca050dd55243b6b (patch) | |
tree | a27cdf3ef1ba02e0091dd145959bd9d3693668af /src/pcm_mix.h | |
parent | d01934301776909a705558632ab616fd0153e21f (diff) | |
download | mpd-13ad2b4dc2a11ab7bad3703cdca050dd55243b6b.tar.gz mpd-13ad2b4dc2a11ab7bad3703cdca050dd55243b6b.tar.xz mpd-13ad2b4dc2a11ab7bad3703cdca050dd55243b6b.zip |
pcm_mix: return bool, make unimplemented format non-fatal
Let the caller deal with a failure.
Diffstat (limited to '')
-rw-r--r-- | src/pcm_mix.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pcm_mix.h b/src/pcm_mix.h index 10a07168f..0e58d01ee 100644 --- a/src/pcm_mix.h +++ b/src/pcm_mix.h @@ -22,6 +22,7 @@ #include "audio_format.h" +#include <stdbool.h> #include <stddef.h> /* @@ -37,8 +38,11 @@ * @param portion1 a number between 0.0 and 1.0 specifying the portion * of the first buffer in the mix; portion2 = (1.0 - portion1). The value * NaN is used by the MixRamp code to specify that simple addition is required. + * + * @return true on success, false if the format is not supported */ -void +G_GNUC_WARN_UNUSED_RESULT +bool pcm_mix(void *buffer1, const void *buffer2, size_t size, enum sample_format format, float portion1); |