In case of running out of prefetch pipes, truncate the sample to the preloaded part.
[calfbox.git] / instr.h
blob7f06ed3e02b60be078c7dea43fa87bf4c05845d2
1 /*
2 Calf Box, an open source musical instrument.
3 Copyright (C) 2010 Krzysztof Foltman
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef CBOX_INSTR_H
20 #define CBOX_INSTR_H
22 #include "recsrc.h"
24 CBOX_EXTERN_CLASS(cbox_instrument)
26 struct cbox_module;
27 struct cbox_rt;
28 struct cbox_scene;
29 struct cbox_instruments;
31 struct cbox_instrument_output
33 struct cbox_module *insert;
34 int output_bus;
35 float gain;
36 struct cbox_recording_source rec_dry, rec_wet;
39 struct cbox_instrument
41 CBOX_OBJECT_HEADER()
42 struct cbox_command_target cmd_target;
43 struct cbox_module *module;
44 struct cbox_instrument_output *outputs;
45 struct cbox_scene *scene;
46 int refcount;
47 gchar **aux_output_names;
48 struct cbox_aux_bus **aux_outputs;
49 int aux_output_count;
52 extern void cbox_instrument_unref_aux_buses(struct cbox_instrument *instrument);
53 extern void cbox_instrument_disconnect_aux_bus(struct cbox_instrument *instrument, struct cbox_aux_bus *bus);
54 extern void cbox_instrument_destroy_if_unused(struct cbox_instrument *instrument);
55 extern gboolean cbox_instrument_process_cmd(struct cbox_command_target *ct, struct cbox_command_target *fb, struct cbox_osc_command *cmd, GError **error);
57 extern void cbox_instrument_output_init(struct cbox_instrument_output *output, struct cbox_scene *scene, uint32_t max_numsamples);
58 extern void cbox_instrument_output_uninit(struct cbox_instrument_output *output);
60 #endif