// Copyright 2007-2022 David Robillard // SPDX-License-Identifier: ISC #ifndef JALV_BACKEND_H #define JALV_BACKEND_H #include "attributes.h" #include "types.h" #include // Interface that must be implemented by audio/MIDI backends JALV_BEGIN_DECLS /// Allocate a new uninitialized backend JalvBackend* jalv_backend_allocate(void); /// Free a backend allocated with jalv_backend_allocate() void jalv_backend_free(JalvBackend* backend); /// Open the audio/MIDI system int jalv_backend_open(Jalv* jalv); /// Close the audio/MIDI system void jalv_backend_close(Jalv* jalv); /// Activate the backend and start processing audio void jalv_backend_activate(Jalv* jalv); /// Deactivate the backend and stop processing audio void jalv_backend_deactivate(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); /// Recompute latencies based on plugin port latencies if necessary void jalv_backend_recompute_latencies(Jalv* jalv); JALV_END_DECLS #endif // JALV_BACKEND_H