aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/jack.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-01-12 17:34:14 +0100
committercbdev <cb@cbcdn.com>2020-01-12 17:34:14 +0100
commit78b21a9ac3f975f35ec7b61108531e1495eb91c0 (patch)
treef41cfc78f3392d501293c3afdd7b42111c863615 /backends/jack.c
parent0a696be5af7db63c1c7354518c839d8543f1ba25 (diff)
downloadmidimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.gz
midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.bz2
midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.zip
Rework instance creation
Diffstat (limited to 'backends/jack.c')
-rw-r--r--backends/jack.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/backends/jack.c b/backends/jack.c
index d7f68c4..c862096 100644
--- a/backends/jack.c
+++ b/backends/jack.c
@@ -334,19 +334,13 @@ static int mmjack_configure_instance(instance* inst, char* option, char* value){
return 0;
}
-static instance* mmjack_instance(){
- instance* inst = mm_instance();
- if(!inst){
- return NULL;
- }
-
+static int mmjack_instance(instance* inst){
inst->impl = calloc(1, sizeof(mmjack_instance_data));
if(!inst->impl){
LOG("Failed to allocate memory");
- return NULL;
+ return 1;
}
-
- return inst;
+ return 0;
}
static int mmjack_parse_midispec(mmjack_channel_ident* ident, char* spec){