Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

virtualanode.h

Go to the documentation of this file.
00001 #ifndef VIRTUALANODE_H
00002 #define VIRTUALANODE_H
00003 
00004 
00005 #include "arender.inc"
00006 #include "filethread.inc"  // RING_BUFFERS
00007 #include "maxchannels.h"
00008 #include "plugin.inc"
00009 #include "units.h"
00010 #include "virtualnode.h"
00011 
00012 class VirtualANode : public VirtualNode
00013 {
00014 public:
00015         VirtualANode(RenderEngine *renderengine, 
00016                 VirtualConsole *vconsole, 
00017                 Module *real_module, 
00018                 Plugin *real_plugin,
00019                 Track *track, 
00020                 VirtualNode *parent_module);
00021 
00022         ~VirtualANode();
00023 
00024         VirtualNode* create_module(Plugin *real_plugin, 
00025                                                         Module *real_module, 
00026                                                         Track *track);
00027         VirtualNode* create_plugin(Plugin *real_plugin);
00028 
00029 // Called by VirtualAConsole::process_buffer to process exit_nodes.
00030 // read_data recurses down the tree.
00031         int render(double *output_temp,
00032                 int64_t start_position,
00033                 int64_t len,
00034                 int64_t sample_rate);
00035 
00036 // Read data from whatever comes before this node.
00037 // Calls render in either the parent node or the module for the track.
00038         int read_data(double *output_temp,
00039                 int64_t start_position,
00040                 int64_t len,
00041                 int64_t sample_rate);
00042 
00043 private:
00044 // need *arender for peak updating
00045         int render_as_module(double **audio_out, 
00046                                         double *output_temp,
00047                                         int64_t start_position,
00048                                         int64_t len, 
00049                                         int64_t sample_rate);
00050         void render_as_plugin(double *output_temp,
00051                 int64_t start_position, 
00052                 int64_t len,
00053                 int64_t sample_rate);
00054 
00055         int render_fade(double *buffer,
00056                                         int64_t len,
00057                                         int64_t input_position,
00058                                         int64_t sample_rate,
00059                                         Autos *autos,
00060                                         int direction,
00061                                         int use_nudge);
00062         int render_pan(double *input,        // start of input fragment
00063                                 double *output,        // start of output fragment
00064                                 int64_t fragment_len,      // fragment length in input scale
00065                                 int64_t input_position, // starting sample of input buffer in project
00066                                 int64_t sample_rate,
00067                                 Autos *autos,
00068                                 int channel,
00069                                 int direction,
00070                                 int use_nudge);
00071         void get_pan_automation(double &slope,
00072                 double &intercept,
00073                 int64_t input_position,
00074                 int64_t &slope_len,
00075                 Autos *autos,
00076                 int channel,
00077                 int direction);
00078 
00079 /*
00080  *      double* get_module_input(int double_buffer, int64_t fragment_position);
00081  *      double* get_module_output(int double_buffer, int64_t fragment_position);
00082  */
00083 
00084         DB db;
00085 
00086         Auto *pan_before[MAXCHANNELS], *pan_after[MAXCHANNELS];
00087 };
00088 
00089 
00090 #endif

Generated on Sun Jan 8 13:39:02 2006 for Cinelerra-svn by  doxygen 1.4.4