diff options
author | David Robillard <d@drobilla.net> | 2022-05-30 17:21:08 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:17 -0400 |
commit | 630072071fd852d9f5ee7d0f99862f3d0f19bf1d (patch) | |
tree | 80c99072e39f6535b695ab4caddc474491e5babb /src | |
parent | 6471195da2544b56fd2669092c197b83aeb4008e (diff) | |
download | jalv-630072071fd852d9f5ee7d0f99862f3d0f19bf1d.tar.gz jalv-630072071fd852d9f5ee7d0f99862f3d0f19bf1d.tar.bz2 jalv-630072071fd852d9f5ee7d0f99862f3d0f19bf1d.zip |
Separate backend.h from jalv_internal.h
Diffstat (limited to 'src')
-rw-r--r-- | src/backend.h | 37 | ||||
-rw-r--r-- | src/jack.c | 2 | ||||
-rw-r--r-- | src/jalv.c | 1 | ||||
-rw-r--r-- | src/jalv_internal.h | 16 | ||||
-rw-r--r-- | src/portaudio.c | 2 |
5 files changed, 42 insertions, 16 deletions
diff --git a/src/backend.h b/src/backend.h new file mode 100644 index 0000000..f05d687 --- /dev/null +++ b/src/backend.h @@ -0,0 +1,37 @@ +// Copyright 2007-2022 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#ifndef JALV_BACKEND_H +#define JALV_BACKEND_H + +#include "jalv_internal.h" + +#include <stdint.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// Audio/MIDI I/O backend interface + +JalvBackend* +jalv_backend_init(Jalv* jalv); + +void +jalv_backend_activate(Jalv* jalv); + +void +jalv_backend_deactivate(Jalv* jalv); + +void +jalv_backend_close(Jalv* jalv); + +/// Expose a port to the system (if applicable) and connect it to its buffer +void +jalv_backend_activate_port(Jalv* jalv, uint32_t port_index); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // JALV_BACKEND_H @@ -1,6 +1,8 @@ // Copyright 2007-2022 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#include "backend.h" + #include "jalv_config.h" #include "jalv_internal.h" #include "log.h" @@ -5,6 +5,7 @@ #define _XOPEN_SOURCE 600 // for S_IFMT and S_IFDIF #define _DARWIN_C_SOURCE // for mkdtemp on Darwin +#include "backend.h" #include "jalv_config.h" #include "jalv_internal.h" #include "log.h" diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 250b3d8..6b242a6 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -328,22 +328,6 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts); int jalv_close(Jalv* jalv); -JalvBackend* -jalv_backend_init(Jalv* jalv); - -void -jalv_backend_activate(Jalv* jalv); - -void -jalv_backend_deactivate(Jalv* jalv); - -void -jalv_backend_close(Jalv* jalv); - -/// Expose a port to the system (if applicable) and connect it to its buffer -void -jalv_backend_activate_port(Jalv* jalv, uint32_t port_index); - void jalv_create_ports(Jalv* jalv); diff --git a/src/portaudio.c b/src/portaudio.c index 87c9df9..403002c 100644 --- a/src/portaudio.c +++ b/src/portaudio.c @@ -1,6 +1,8 @@ // Copyright 2007-2022 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC +#include "backend.h" + #include "jalv_internal.h" #include "worker.h" |