aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/jack.c
diff options
context:
space:
mode:
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;
}