r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / virtualanode.h
blobe3459d7ade5d16092ef1e372877f34b5366e7233
1 #ifndef VIRTUALANODE_H
2 #define VIRTUALANODE_H
5 #include "filethread.inc" // RING_BUFFERS
6 #include "maxchannels.h"
7 #include "plugin.inc"
8 #include "units.h"
9 #include "virtualnode.h"
11 class VirtualANode : public VirtualNode
13 public:
14 VirtualANode(RenderEngine *renderengine,
15 VirtualConsole *vconsole,
16 Module *real_module,
17 Plugin *real_plugin,
18 Track *track,
19 VirtualNode *parent_module,
20 double *buffer_in[],
21 double *buffer_out[],
22 int input_is_master,
23 int output_is_master,
24 int in,
25 int out);
27 ~VirtualANode();
29 void new_output_buffer();
30 void new_input_buffer();
31 VirtualNode* create_module(Plugin *real_plugin,
32 Module *real_module,
33 Track *track);
34 VirtualNode* create_plugin(Plugin *real_plugin);
36 // need *arender for peak updating
37 int render(double **audio_out,
38 int64_t audio_out_position,
39 int double_buffer,
40 int64_t fragment_position,
41 int64_t fragment_len,
42 int64_t real_position,
43 int64_t source_length,
44 int reverse,
45 ARender *arender);
47 // Pointers to data, whether drive read buffers or temp buffers
48 double *buffer_in[RING_BUFFERS];
49 double *buffer_out[RING_BUFFERS];
51 private:
52 // need *arender for peak updating
53 int render_as_module(double **audio_out,
54 int64_t audio_out_position,
55 int ring_buffer,
56 int64_t fragment_position,
57 int64_t fragment_len,
58 int64_t real_position,
59 ARender *arender);
60 void render_as_plugin(int64_t real_position,
61 int64_t fragment_position,
62 int64_t fragment_len,
63 int ring_buffer);
65 int render_fade(double *input, // start of input fragment
66 double *output, // start of output fragment
67 int64_t buffer_len, // fragment length in input scale
68 int64_t input_position, // starting sample of input buffer in project
69 Autos *autos); // DB not used in pan
70 int render_pan(double *input, // start of input fragment
71 double *output, // start of output fragment
72 int64_t fragment_len, // fragment length in input scale
73 int64_t input_position, // starting sample of input buffer in project
74 Autos *autos,
75 int channel);
77 double* get_module_input(int double_buffer, int64_t fragment_position);
78 double* get_module_output(int double_buffer, int64_t fragment_position);
80 DB db;
82 Auto *pan_before[MAXCHANNELS], *pan_after[MAXCHANNELS];
86 #endif