00001 #ifndef ARENDER_H
00002 #define ARENDER_H
00003
00004 #include "atrack.inc"
00005 #include "commonrender.h"
00006 #include "maxchannels.h"
00007
00008 class ARender : public CommonRender
00009 {
00010 public:
00011 ARender(RenderEngine *renderengine);
00012 ~ARender();
00013
00014 void arm_command();
00015 void init_output_buffers();
00016 VirtualConsole* new_vconsole_object();
00017 int get_total_tracks();
00018 Module* new_module(Track *track);
00019
00020
00021 int arm_playback(int64_t current_position,
00022 int64_t input_length,
00023 int64_t module_render_fragment,
00024 int64_t playback_buffer,
00025 int64_t output_length);
00026 int wait_for_startup();
00027 int64_t tounits(double position, int round);
00028 double fromunits(int64_t position);
00029
00030 void run();
00031
00032
00033 int calculate_history_size();
00034
00035 int get_history_number(int64_t *table, int64_t position);
00036
00037
00038 double *audio_out[MAXCHANNELS];
00039
00040 int get_next_peak(int current_peak);
00041
00042 int64_t meter_render_fragment;
00043
00044 double *level_history[MAXCHANNELS];
00045
00046 int64_t *level_samples;
00047
00048 int total_peaks;
00049
00050 int current_level[MAXCHANNELS];
00051
00052 int first_buffer;
00053
00054
00055
00056
00057
00058
00059
00060
00061 int get_datatype();
00062
00063
00064
00065
00066
00067
00068
00069
00070 int process_buffer(double **buffer_out, int64_t input_len, int64_t input_position, int last_buffer);
00071
00072 int process_buffer(int64_t input_len, int64_t input_position);
00073
00074 void send_last_buffer();
00075 int wait_device_completion();
00076
00077
00078 int reverse_buffer(double *buffer, int64_t len);
00079
00080 int swap_current_buffer();
00081 int64_t get_render_length(int64_t current_render_length);
00082
00083
00084
00085
00086
00087 int64_t source_length;
00088
00089
00090 private:
00091
00092 int init_meters();
00093
00094 int64_t session_position;
00095 };
00096
00097
00098
00099 #endif