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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user