From 27fe8029dc68af2342a447822f6c832d1cb63822 Mon Sep 17 00:00:00 2001 From: structix Date: Fri, 15 Dec 2017 17:36:21 +0100 Subject: [PATCH] Fixed memory leaks --- csoundbox.c | 2 +- sound.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csoundbox.c b/csoundbox.c index edfa5fc..77278b8 100644 --- a/csoundbox.c +++ b/csoundbox.c @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { //initialize libconfig cfginit(); - + ao_initialize(); while ( (c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1 ) { switch (c) { diff --git a/sound.c b/sound.c index e4a447d..ae4a0ad 100644 --- a/sound.c +++ b/sound.c @@ -35,7 +35,7 @@ void *playThreadFunc(void *arg) { long rate; /* initializations */ - ao_initialize(); + driver = ao_default_driver_id(); mpg123_init(); mh = mpg123_new(NULL, &err);