rework histogram_bezier, init wm icon set_icon(gg), update de.po+msg/txt
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vpluginarray.C
index bfb57271f95d15761d46d40b9cd35b8a0059776e..285a13cb041c82d0c28c31a649ec76f6843c96bc 100644 (file)
@@ -2,23 +2,24 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- * 
+ *
  */
 
+#include "asset.h"
 #include "bcsignals.h"
 #include "cache.h"
 #include "edl.h"
@@ -93,12 +94,13 @@ void VPluginArray::create_modules()
 }
 
 
-void VPluginArray::process_realtime(int module, 
-       int64_t input_position, 
+void VPluginArray::process_realtime(int module,
+       int64_t input_position,
        int64_t len)
 {
-       values[module]->process_buffer(realtime_buffers[module], 
-                       input_position, 
+       int ibfr = module % file->asset->layers;
+       values[module]->process_buffer(realtime_buffers[ibfr],
+                       input_position,
                        edl->session->frame_rate,
                        end - start,
                        PLAY_FORWARD);
@@ -109,15 +111,16 @@ int VPluginArray::process_loop(int module, int64_t &write_length)
        if(!realtime_buffers) realtime_buffers = file->get_video_buffer();
 
 // Convert from array of frames to array of tracks
-       VFrame **temp_buffer;
-       temp_buffer = new VFrame*[total_tracks()];
-       for(int i = 0; i < total_tracks(); i++)
-       {
-               temp_buffer[i] = realtime_buffers[i][0];
-       }
-
-       int result = values[module]->process_loop(realtime_buffers[module], write_length);
-       delete [] temp_buffer;
+//     VFrame **temp_buffer;
+//     temp_buffer = new VFrame*[total_tracks()];
+//     for(int i = 0; i < total_tracks(); i++)
+//     {
+//             temp_buffer[i] = realtime_buffers[i][0];
+//     }
+
+       int ibfr = module % file->asset->layers;
+       int result = values[module]->process_loop(realtime_buffers[ibfr], write_length);
+//     delete [] temp_buffer;
        return result;
 }