Merge branch 'ct' of git.pipapo.org:cinelerra-ct into ct
[cinelerra_cv/ct.git] / cinelerra / virtualanode.h
blobedbd5707bec1241435ffaf487314173531ebe084
1 #ifndef VIRTUALANODE_H
2 #define VIRTUALANODE_H
5 #include "arender.inc"
6 #include "filethread.inc" // RING_BUFFERS
7 #include "maxchannels.h"
8 #include "plugin.inc"
9 #include "units.h"
10 #include "virtualnode.h"
12 class VirtualANode : public VirtualNode
14 public:
15 VirtualANode(RenderEngine *renderengine,
16 VirtualConsole *vconsole,
17 Module *real_module,
18 Plugin *real_plugin,
19 Track *track,
20 VirtualNode *parent_module);
22 ~VirtualANode();
24 VirtualNode* create_module(Plugin *real_plugin,
25 Module *real_module,
26 Track *track);
27 VirtualNode* create_plugin(Plugin *real_plugin);
29 // Called by VirtualAConsole::process_buffer to process exit_nodes.
30 // read_data recurses down the tree.
31 int render(double *output_temp,
32 int64_t start_position,
33 int64_t len,
34 int64_t sample_rate);
36 // Read data from whatever comes before this node.
37 // Calls render in either the parent node or the module for the track.
38 int read_data(double *output_temp,
39 int64_t start_position,
40 int64_t len,
41 int64_t sample_rate);
43 private:
44 // need *arender for peak updating
45 int render_as_module(double **audio_out,
46 double *output_temp,
47 int64_t start_position,
48 int64_t len,
49 int64_t sample_rate);
50 void render_as_plugin(double *output_temp,
51 int64_t start_position,
52 int64_t len,
53 int64_t sample_rate);
55 int render_fade(double *buffer,
56 int64_t len,
57 int64_t input_position,
58 int64_t sample_rate,
59 Autos *autos,
60 int direction,
61 int use_nudge);
62 int render_pan(double *input, // start of input fragment
63 double *output, // start of output fragment
64 int64_t fragment_len, // fragment length in input scale
65 int64_t input_position, // starting sample of input buffer in project
66 int64_t sample_rate,
67 Autos *autos,
68 int channel,
69 int direction,
70 int use_nudge);
71 void get_pan_automation(double &slope,
72 double &intercept,
73 int64_t input_position,
74 int64_t &slope_len,
75 Autos *autos,
76 int channel,
77 int direction);
80 * double* get_module_input(int double_buffer, int64_t fragment_position);
81 * double* get_module_output(int double_buffer, int64_t fragment_position);
84 DB db;
86 Auto *pan_before[MAXCHANNELS], *pan_after[MAXCHANNELS];
90 #endif
92 // Local Variables:
93 // mode: C++
94 // c-file-style: "linux"
95 // End: