diff options
author | Max Kellermann <max@duempel.org> | 2008-10-21 22:53:16 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-21 22:53:16 +0200 |
commit | e6d90d4e83263c37bbee878aed782bf13669daa1 (patch) | |
tree | 08ce9780ddad6f653edad4b958e844f7e9be568f /src/pcm_utils.c | |
parent | ca6e613a7f3a05d414353c44d18d30c5e77ac8c3 (diff) | |
download | mpd-e6d90d4e83263c37bbee878aed782bf13669daa1.tar.gz mpd-e6d90d4e83263c37bbee878aed782bf13669daa1.tar.xz mpd-e6d90d4e83263c37bbee878aed782bf13669daa1.zip |
pcm_utils: added pcm_convert_init()
Instead of manually calling memset(0) on the pcm_convert_state struct,
client code should use a library function from pcm_utils.c. This way,
we can change the semantics of the struct easily.
Diffstat (limited to '')
-rw-r--r-- | src/pcm_utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 29932ba4b..5d315bdb3 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -205,6 +205,11 @@ void pcm_mix(char *buffer1, const char *buffer2, size_t size, pcm_add(buffer1, buffer2, size, vol1, 1000 - vol1, format); } +void pcm_convert_init(struct pcm_convert_state *state) +{ + memset(state, 0, sizeof(*state)); +} + #ifdef HAVE_LIBSAMPLERATE static int pcm_resample_get_converter(void) { |