aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/jack.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-11 23:24:23 +0100
committercbdev <cb@cbcdn.com>2019-12-11 23:24:23 +0100
commit9624d46436576b415c639ea7390012cdd95c88f7 (patch)
treefb3aadbaf01fcee5da8ecdb8355ff191341b666d /backends/jack.c
parent48e12201f5c57cda581bc0c713d99da6524c49a8 (diff)
parentf6d6eefe9bb9934f4fa3e665734d746f02471cdb (diff)
downloadmidimonster-9624d46436576b415c639ea7390012cdd95c88f7.tar.gz
midimonster-9624d46436576b415c639ea7390012cdd95c88f7.tar.bz2
midimonster-9624d46436576b415c639ea7390012cdd95c88f7.zip
Merge branch 'master' into rtpmidi
Diffstat (limited to 'backends/jack.c')
-rw-r--r--backends/jack.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/backends/jack.c b/backends/jack.c
index e7bed04..eb53190 100644
--- a/backends/jack.c
+++ b/backends/jack.c
@@ -593,10 +593,9 @@ static int mmjack_handle(size_t num, managed_fd* fds){
return 0;
}
-static int mmjack_start(){
+static int mmjack_start(size_t n, instance** inst){
int rv = 1, feedback_fd[2];
- size_t n, u, p;
- instance** inst = NULL;
+ size_t u, p;
pthread_mutexattr_t mutex_attr;
mmjack_instance_data* data = NULL;
jack_status_t error;
@@ -618,12 +617,6 @@ static int mmjack_start(){
goto bail;
}
- //fetch all instances
- if(mm_backend_instances(BACKEND_NAME, &n, &inst)){
- fprintf(stderr, "Failed to fetch instance list\n");
- goto bail;
- }
-
for(u = 0; u < n; u++){
data = (mmjack_instance_data*) inst[u]->impl;
@@ -689,20 +682,13 @@ static int mmjack_start(){
rv = 0;
bail:
pthread_mutexattr_destroy(&mutex_attr);
- free(inst);
return rv;
}
-static int mmjack_shutdown(){
- size_t n, u, p;
- instance** inst = NULL;
+static int mmjack_shutdown(size_t n, instance** inst){
+ size_t u, p;
mmjack_instance_data* data = NULL;
- if(mm_backend_instances(BACKEND_NAME, &n, &inst)){
- fprintf(stderr, "Failed to fetch instance list\n");
- return 1;
- }
-
for(u = 0; u < n; u++){
data = (mmjack_instance_data*) inst[u]->impl;
@@ -741,8 +727,6 @@ static int mmjack_shutdown(){
data->fd = -1;
}
- free(inst);
-
fprintf(stderr, "jack backend shut down\n");
return 0;
}