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

@@ -124,6 +124,8 @@ static void decoder_run_song(const struct song *song, const char *uri)
return;
}
pcm_convert_init(&decoder.conv_state);
ret = false;
if (!song_is_file(song)) {
unsigned int next = 0;
@@ -187,6 +189,8 @@ static void decoder_run_song(const struct song *song, const char *uri)
}
}
pcm_convert_deinit(&decoder.conv_state);
music_pipe_flush();
if (close_instream)