- Fixed a buffer size bug when ~/.ardour2 doesn't exist (can't load configuration...
[ardour.git] / libs / ardour / session_timefx.cc
index 7eec1e578ba2b2c6e50d8e4c105c7343b088615a..45733c75aedfd1007ca150bd4210206f24fe6545 100644 (file)
@@ -96,7 +96,6 @@ Session::tempoize_region (TimeStretchRequest& tsr)
                for (uint32_t i = 0; i < sources.size(); ++i) {
                        gain_t gain_buffer[bufsize];
                        Sample buffer[bufsize];
-                       char   workbuf[bufsize*4];
                        jack_nframes_t pos = 0;
                        jack_nframes_t this_read = 0;
 
@@ -110,7 +109,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
                                   not the ones currently in use, in case it's already been 
                                   subject to timefx.  */
 
-                               if ((this_read = tsr.region->master_read_at (buffer, buffer, gain_buffer, workbuf, pos + tsr.region->position(), this_time)) != this_time) {
+                               if ((this_read = tsr.region->master_read_at (buffer, buffer, gain_buffer, pos + tsr.region->position(), this_time)) != this_time) {
                                        error << string_compose (_("tempoize: error reading data from %1"), sources[i]->name()) << endmsg;
                                        goto out;
                                }
@@ -123,7 +122,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
                                st.putSamples (buffer, this_read);
                        
                                while ((this_read = st.receiveSamples (buffer, bufsize)) > 0 && tsr.running) {
-                                       if (sources[i]->write (buffer, this_read, workbuf) != this_read) {
+                                       if (sources[i]->write (buffer, this_read) != this_read) {
                                                error << string_compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
                                                goto out;
                                        }
@@ -135,7 +134,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
                        }
                
                        while (tsr.running && (this_read = st.receiveSamples (buffer, bufsize)) > 0) {
-                               if (sources[i]->write (buffer, this_read, workbuf) != this_read) {
+                               if (sources[i]->write (buffer, this_read) != this_read) {
                                        error << string_compose (_("error writing tempo-adjusted data to %1"), sources[i]->name()) << endmsg;
                                        goto out;
                                }