pcm: added pcm_convert_deinit(), pcm_resample_deinit()

Free memory allocated by libsamplerate when the output or the decoder
is closed.
This commit is contained in:
Max Kellermann
2009-01-07 22:20:30 +01:00
parent 97b844ec72
commit 7f34e9410e
8 changed files with 29 additions and 2 deletions

View File

@@ -29,6 +29,13 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "pcm"
void pcm_resample_deinit(G_GNUC_UNUSED struct pcm_resample_state *state)
{
if (state->state != NULL)
state->state = src_delete(state->state);
}
static int pcm_resample_get_converter(void)
{
const char *conf = getConfigParamValue(CONF_SAMPLERATE_CONVERTER);