4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef VIRTUALANODE_H
23 #define VIRTUALANODE_H
26 #include "arender.inc"
27 #include "filethread.inc" // RING_BUFFERS
28 #include "maxchannels.h"
30 #include "samples.inc"
32 #include "virtualnode.h"
34 class VirtualANode : public VirtualNode
37 VirtualANode(RenderEngine *renderengine,
38 VirtualConsole *vconsole,
42 VirtualNode *parent_module);
46 VirtualNode* create_module(Plugin *real_plugin,
49 VirtualNode* create_plugin(Plugin *real_plugin);
51 // Called by VirtualAConsole::process_buffer to process exit_nodes.
52 // read_data recurses down the tree.
53 int render(Samples *output_temp,
55 int64_t start_position,
58 // Read data from whatever comes before this node.
59 // Calls render in either the parent node or the module for the track.
60 int read_data(Samples *output_temp,
62 int64_t start_position,
66 // need *arender for peak updating
67 int render_as_module(Samples **audio_out,
70 int64_t start_position,
72 void render_as_plugin(Samples *output_temp,
74 int64_t start_position,
77 int render_fade(double *buffer,
79 int64_t input_position,
84 int render_pan(double *input, // start of input fragment
85 double *output, // start of output fragment
86 int64_t fragment_len, // fragment length in input scale
87 int64_t input_position, // starting sample of input buffer in project
93 void get_pan_automation(double &slope,
95 int64_t input_position,
102 * double* get_module_input(int double_buffer, int64_t fragment_position);
103 * double* get_module_output(int double_buffer, int64_t fragment_position);
108 Auto *pan_before[MAXCHANNELS], *pan_after[MAXCHANNELS];