2 #include "edlsession.h"
3 #include "pluginaclient.h"
4 #include "pluginserver.h"
9 PluginAClient::PluginAClient(PluginServer *server)
10 : PluginClient(server)
15 project_sample_rate = server->edl->session->sample_rate;
17 project_sample_rate = 1;
20 PluginAClient::~PluginAClient()
24 int PluginAClient::is_audio()
30 int PluginAClient::get_render_ptrs()
32 int i, j, double_buffer, fragment_position;
34 for(i = 0; i < total_in_buffers; i++)
36 double_buffer = double_buffer_in_render.values[i];
37 fragment_position = offset_in_render.values[i];
38 input_ptr_render[i] = &input_ptr_master.values[i][double_buffer][fragment_position];
39 //printf("PluginAClient::get_render_ptrs %x\n", input_ptr_master.values[i][double_buffer]);
42 for(i = 0; i < total_out_buffers; i++)
44 double_buffer = double_buffer_out_render.values[i];
45 fragment_position = offset_out_render.values[i];
46 output_ptr_render[i] = &output_ptr_master.values[i][double_buffer][fragment_position];
48 //printf("PluginAClient::get_render_ptrs %x %x\n", input_ptr_render[0], output_ptr_render[0]);
52 int PluginAClient::init_realtime_parameters()
54 project_sample_rate = server->edl->session->sample_rate;
58 void PluginAClient::plugin_process_realtime(double **input,
60 int64_t current_position,
61 int64_t fragment_size,
64 //printf("PluginAClient::plugin_process_realtime 1\n");
65 this->source_position = current_position;
66 this->total_len = total_len;
69 process_realtime(fragment_size, input, output);
71 process_realtime(fragment_size, input[0], output[0]);
76 int PluginAClient::plugin_process_loop(double **buffers, int64_t &write_length)
81 return process_loop(buffers, write_length);
83 return process_loop(buffers[0], write_length);
86 int PluginAClient::read_samples(double *buffer, int channel, int64_t start_position, int64_t total_samples)
88 //printf("PluginAClient::read_samples 1\n");
89 return server->read_samples(buffer, channel, start_position, total_samples);
92 int PluginAClient::read_samples(double *buffer, int64_t start_position, int64_t total_samples)
94 //printf("PluginAClient::read_samples 1\n");
95 return server->read_samples(buffer, start_position, total_samples);
99 void PluginAClient::send_render_gui(void *data, int size)
101 //printf("PluginVClient::send_render_gui 1\n");
102 server->send_render_gui(data, size);
105 void PluginAClient::plugin_render_gui(void *data, int size)
107 render_gui(data, size);