00001 #ifndef VIRTUALANODE_H
00002 #define VIRTUALANODE_H
00003
00004
00005 #include "arender.inc"
00006 #include "filethread.inc"
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
00030
00031 int render(double *output_temp,
00032 int64_t start_position,
00033 int64_t len,
00034 int64_t sample_rate);
00035
00036
00037
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
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,
00063 double *output,
00064 int64_t fragment_len,
00065 int64_t input_position,
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
00081
00082
00083
00084 DB db;
00085
00086 Auto *pan_before[MAXCHANNELS], *pan_after[MAXCHANNELS];
00087 };
00088
00089
00090 #endif