}
}
- num_to_process = GST_DPMAN_PREPROCESS(ladspa->dpman, ladspa->buffersize, ladspa->timestamp);
+ GST_DPMAN_PREPROCESS(ladspa->dpman, ladspa->buffersize, ladspa->timestamp);
num_processed = 0;
/* split up processing of the buffer into chunks so that dparams can
* be updated when required.
* In many cases the buffer will be processed in one chunk anyway.
*/
- while(GST_DPMAN_PROCESS_CHUNK(ladspa->dpman, num_to_process, num_processed)) {
+ while(GST_DPMAN_PROCESS(ladspa->dpman, num_processed)) {
+ num_to_process = GST_DPMAN_FRAMES_TO_PROCESS(ladspa->dpman);
for (i=0 ; i<numsinkpads ; i++){
desc->connect_port (ladspa->handle, oclass->sinkpad_portnums[i], data_in[i]);
}
data_out[i] += num_to_process;
}
- num_processed = num_to_process;
- num_to_process = 0;
+ num_processed += num_to_process;
}
for (i=0 ; i<numsrcpads ; i++) {
}
}
- num_to_process = GST_DPMAN_PREPROCESS(ladspa->dpman, num_samples, GST_BUFFER_TIMESTAMP(buf));
+ GST_DPMAN_PREPROCESS(ladspa->dpman, num_samples, GST_BUFFER_TIMESTAMP(buf));
num_processed = 0;
/* split up processing of the buffer into chunks so that dparams can
* be updated when required.
* In many cases the buffer will be processed in one chunk anyway.
*/
- while(GST_DPMAN_PROCESS_CHUNK(ladspa->dpman, num_to_process, num_processed)) {
+ while(GST_DPMAN_PROCESS(ladspa->dpman, num_processed)) {
+ num_to_process = GST_DPMAN_FRAMES_TO_PROCESS(ladspa->dpman);
+
desc->connect_port(ladspa->handle,oclass->sinkpad_portnums[0],data_in);
for (i=0 ; i<numsrcpads ; i++){
desc->connect_port(ladspa->handle,oclass->srcpad_portnums[i],data_out[i]);
data_out[i] += num_to_process;
}
num_processed += num_to_process;
- num_to_process = 0;
}
if (numsrcpads > 0){
data = (LADSPA_Data *) GST_BUFFER_DATA(buf);
desc = ladspa->descriptor;
- num_to_process = GST_DPMAN_PREPROCESS(ladspa->dpman, ladspa->buffersize, ladspa->timestamp);
+ GST_DPMAN_PREPROCESS(ladspa->dpman, ladspa->buffersize, ladspa->timestamp);
num_processed = 0;
/* update timestamp */
* be updated when required.
* In many cases the buffer will be processed in one chunk anyway.
*/
- while(GST_DPMAN_PROCESS_CHUNK(ladspa->dpman, num_to_process, num_processed)) {
+ while(GST_DPMAN_PROCESS(ladspa->dpman, num_processed)) {
+ num_to_process = GST_DPMAN_FRAMES_TO_PROCESS(ladspa->dpman);
+
desc->connect_port(ladspa->handle,oclass->srcpad_portnums[0],data);
desc->run(ladspa->handle, num_to_process);
data += num_to_process;
num_processed = num_to_process;
- num_to_process = 0;
}
return buf;