5 #include "commonrender.h"
6 #include "maxchannels.h"
8 class ARender
: public CommonRender
11 ARender(RenderEngine
*renderengine
);
15 void init_output_buffers();
16 VirtualConsole
* new_vconsole_object();
17 int get_total_tracks();
18 Module
* new_module(Track
*track
);
20 // set up and start thread
21 int arm_playback(int64_t current_position
,
23 int64_t module_render_fragment
,
24 int64_t playback_buffer
,
25 int64_t output_length
);
26 int wait_for_startup();
27 int64_t tounits(double position
, int round
);
28 double fromunits(int64_t position
);
31 // Calculate number of samples in each meter fragment and how many
32 // meter fragments to buffer.
33 int calculate_history_size();
34 // Get subscript of history entry corresponding to sample
35 int get_history_number(int64_t *table
, int64_t position
);
37 // output buffers for audio device
38 double *audio_out
[MAXCHANNELS
];
39 // information for meters
40 int get_next_peak(int current_peak
);
41 // samples to use for one meter update. Must be multiple of fragment_len
42 int64_t meter_render_fragment
;
43 // Level history of output buffers
44 double *level_history
[MAXCHANNELS
];
45 // sample position of each level
46 int64_t *level_samples
;
47 // total entries in level_history
49 // Next level to store value in
50 int current_level
[MAXCHANNELS
];
51 // Make VirtualAConsole block before the first buffer until video is ready
60 // get the data type for certain commonrender routines
63 // handle playback autos and transitions
64 // int restart_playback();
65 // int send_reconfigure_buffer();
68 // renders into buffer_out argument when no audio device
69 // handles playback autos
70 int process_buffer(double **buffer_out
, int64_t input_len
, int64_t input_position
, int last_buffer
);
71 // renders to a device when there's a device
72 int process_buffer(int64_t input_len
, int64_t input_position
);
74 void send_last_buffer();
75 int wait_device_completion();
77 // reverse the data in a buffer
78 int reverse_buffer(double *buffer
, int64_t len
);
79 // advance the buffer count
80 int swap_current_buffer();
81 int64_t get_render_length(int64_t current_render_length
);
83 // int64_t playback_buffer; // maximum length to send to audio device
84 // int64_t output_length; // maximum length to send to audio device after speed
87 int64_t source_length
; // Total number of frames to render for transitions
91 // initialize buffer_out
93 // Samples since start of playback
94 int64_t session_position
;