traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src/core AudioClip.cpp Peak.cpp Song.c...


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/core AudioClip.cpp Peak.cpp Song.c...
Date: Tue, 11 Sep 2007 18:37:30 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/09/11 18:37:30

Modified files:
        src/core       : AudioClip.cpp Peak.cpp Song.cpp Song.h 

Log message:
        * made export work again (I think)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.cpp?cvsroot=traverso&r1=1.131&r2=1.132
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Peak.cpp?cvsroot=traverso&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.135&r2=1.136
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.h?cvsroot=traverso&r1=1.67&r2=1.68

Patches:
Index: AudioClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.cpp,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- AudioClip.cpp       10 Sep 2007 18:42:47 -0000      1.131
+++ AudioClip.cpp       11 Sep 2007 18:37:30 -0000      1.132
@@ -450,14 +450,15 @@
        if (m_song->realtime_path()) {
                read_frames = m_readSource->rb_read(mixdown, mix_pos, nframes);
        } else {
-               DecodeBuffer buffer;
-               read_frames = m_readSource->file_read(&buffer, mix_pos, 
nframes);
+               m_song->renderDecodeBuffer->destination = mixdown;
+               read_frames = 
m_readSource->file_read(m_song->renderDecodeBuffer, mix_pos, nframes);
        }
        
        if (read_frames <= 0) {
                return 0;
        }
 
+
        for (int chan=0; chan<bus->get_channel_count(); ++chan) {
 
                for (int i=0; i<m_fades.size(); ++i) {

Index: Peak.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Peak.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- Peak.cpp    11 Sep 2007 15:15:08 -0000      1.47
+++ Peak.cpp    11 Sep 2007 18:37:30 -0000      1.48
@@ -304,7 +304,7 @@
                                pos++;
                        }
 
-                       if (valueMax > abs(valueMin)) {
+                       if (valueMax > fabs(valueMin)) {
                                peakdata[count] = valueMax;
                        } else {
                                peakdata[count] = valueMin;

Index: Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -b -r1.135 -r1.136
--- Song.cpp    10 Sep 2007 18:42:48 -0000      1.135
+++ Song.cpp    11 Sep 2007 18:37:30 -0000      1.136
@@ -31,6 +31,7 @@
 #include <libtraverso.h>
 #include <commands.h>
 
+#include "AbstractAudioReader.h"
 #include <Client.h>
 #include "ProjectManager.h"
 #include "ContextPointer.h"
@@ -347,7 +348,7 @@
                m_rendering = true;
        }
 
-       spec->start_frame = INT_MAX;
+       spec->start_frame = UINT_MAX;
        spec->end_frame = 0;
 
        TimeRef endlocation, startlocation;
@@ -420,11 +421,13 @@
                m_exportSource = new WriteSource(spec);
        }
 
-//     m_transportFrame = spec->start_frame;
-       m_transportLocation.set_position(spec->start_frame, spec->sample_rate);
+       m_transportLocation.set_position(spec->start_frame, devicerate);
        
        resize_buffer(false, spec->blocksize);
 
+       renderDecodeBuffer = new DecodeBuffer;
+       renderDecodeBuffer->check_buffers_capacity(spec->blocksize, 
spec->channels);
+
        return 1;
 }
 
@@ -432,6 +435,7 @@
 {
        m_exportSource->finish_export();
        delete m_exportSource;
+       delete renderDecodeBuffer;
        resize_buffer(false, audiodevice().get_buffer_size());
        return 0;
 }

Index: Song.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- Song.h      10 Sep 2007 18:42:48 -0000      1.67
+++ Song.h      11 Sep 2007 18:37:30 -0000      1.68
@@ -42,6 +42,7 @@
 class Plugin;
 class TimeLine;
 class Snappable;
+class DecodeBuffer;
 
 struct ExportSpecification;
 
@@ -145,6 +146,7 @@
        audio_sample_t*         mixdown;
        audio_sample_t*         readbuffer;
        audio_sample_t*         gainbuffer;
+       DecodeBuffer*           renderDecodeBuffer;
        
 #if defined (THREAD_CHECK)
        unsigned long   threadId;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]