traverso-commit
[Top][All Lists]
Advanced

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

[Traverso-commit] traverso/src/core Export.cpp Export.h Sheet.cpp...


From: Nicola Doebelin
Subject: [Traverso-commit] traverso/src/core Export.cpp Export.h Sheet.cpp...
Date: Thu, 07 May 2009 19:59:03 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Nicola Doebelin <n_doebelin>    09/05/07 19:59:03

Modified files:
        src/core       : Export.cpp Export.h Sheet.cpp Sheet.h 
                         TimeLine.cpp 

Log message:
        * code cleanups
        * fixed error in TOC files for cdrdao

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Export.cpp?cvsroot=traverso&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Export.h?cvsroot=traverso&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Sheet.cpp?cvsroot=traverso&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Sheet.h?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/TimeLine.cpp?cvsroot=traverso&r1=1.21&r2=1.22

Patches:
Index: Export.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Export.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- Export.cpp  3 May 2009 21:47:32 -0000       1.17
+++ Export.cpp  7 May 2009 19:59:03 -0000       1.18
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
-    $Id: Export.cpp,v 1.17 2009/05/03 21:47:32 n_doebelin Exp $
+    $Id: Export.cpp,v 1.18 2009/05/07 19:59:03 n_doebelin Exp $
 */
 
 #include "Export.h"
@@ -53,8 +53,8 @@
        channels = -1;
        startLocation = qint64(-1);
        endLocation = qint64(-1);
-        trackStart = qint64(-1);
-        trackEnd = qint64(-1);
+        cdTrackStart = qint64(-1);
+        cdTrackEnd = qint64(-1);
         dither_type = GDitherTri;
        
        dataF = 0;

Index: Export.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Export.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- Export.h    3 May 2009 21:47:32 -0000       1.19
+++ Export.h    7 May 2009 19:59:03 -0000       1.20
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: Export.h,v 1.19 2009/05/03 21:47:32 n_doebelin Exp $
+$Id: Export.h,v 1.20 2009/05/07 19:59:03 n_doebelin Exp $
 */
 
 #ifndef EXPORT_H
@@ -53,8 +53,8 @@
        int             channels;
        TimeRef         startLocation;
        TimeRef         endLocation;
-        TimeRef                trackStart;
-        TimeRef                trackEnd;
+        TimeRef                cdTrackStart;
+        TimeRef                cdTrackEnd;
         GDitherType     dither_type;
 
        /* used exclusively during export */

Index: Sheet.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Sheet.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- Sheet.cpp   4 May 2009 18:55:09 -0000       1.28
+++ Sheet.cpp   7 May 2009 19:59:03 -0000       1.29
@@ -481,7 +481,6 @@
 
 int Sheet::finish_audio_export()
 {
-        qDebug("export: done, tidying up and exiting");
         delete renderDecodeBuffer;
         resize_buffer(false, audiodevice().get_buffer_size());
         m_rendering = false;
@@ -499,13 +498,13 @@
 
         for (int i = 0; i < spec->markers.size()-1; ++i) {
                 spec->progress      = 0;
-                spec->trackStart    = spec->markers.at(i)->get_when();
-                spec->trackEnd      = spec->markers.at(i+1)->get_when();
-                spec->name          = 
format_track_name(spec->markers.at(i)->get_description(), i+1);
-                spec->totalTime     = spec->trackEnd - spec->trackStart;
-                spec->pos           = spec->trackStart;
+                spec->cdTrackStart    = spec->markers.at(i)->get_when();
+                spec->cdTrackEnd      = spec->markers.at(i+1)->get_when();
+                spec->name          = 
format_cdtrack_name(spec->markers.at(i)->get_description(), i+1);
+                spec->totalTime     = spec->cdTrackEnd - spec->cdTrackStart;
+                spec->pos           = spec->cdTrackStart;
                 spec->peakvalue     = peakvalue;
-                m_transportLocation = spec->trackStart;
+                m_transportLocation = spec->cdTrackStart;
 
 
                 if (spec->renderpass == 
ExportSpecification::WRITE_TO_HARDDISK) {
@@ -545,7 +544,7 @@
        int ret = -1;
         int progress = 0;
 
-        nframes_t diff = (spec->trackEnd - 
spec->pos).to_frame(audiodevice().get_sample_rate());
+        nframes_t diff = (spec->cdTrackEnd - 
spec->pos).to_frame(audiodevice().get_sample_rate());
        nframes_t nframes = spec->blocksize;
        nframes_t this_nframes = std::min(diff, nframes);
 
@@ -606,7 +605,7 @@
 
        spec->pos.add_frames(nframes, audiodevice().get_sample_rate());
 
-        progress = (int) (double( 100 * (spec->pos - 
spec->trackStart).universal_frame()) / (spec->totalTime.universal_frame()));
+        progress = (int) (double( 100 * (spec->pos - 
spec->cdTrackStart).universal_frame()) / (spec->totalTime.universal_frame()));
 
         // only update the progress info if progress is higher then the
         // old progress value, to avoid a flood of progress changed signals!
@@ -631,7 +630,7 @@
 // formatting the track names in a separate function to guarantee that
 // the file names of exported tracks and the entry in the TOC file always
 // match
-QString Sheet::format_track_name(QString n, int i)
+QString Sheet::format_cdtrack_name(QString n, int i)
 {
         QString name;
         if (n.isEmpty()) {
@@ -983,13 +982,13 @@
                        //}
                }
                
-//             TimeRef length = 
cd_to_timeref(timeref_to_cd(endmarker->get_when())) - 
cd_to_timeref(timeref_to_cd(startmarker->get_when()));
+                TimeRef length = 
cd_to_timeref(timeref_to_cd(endmarker->get_when())) - 
cd_to_timeref(timeref_to_cd(startmarker->get_when()));
                
 //             QString s_start = timeref_to_cd(start);
-//             QString s_length = timeref_to_cd(length);
+                QString s_length = timeref_to_cd(length);
 
 //             output += "  FILE \"" + spec->name + "." + 
spec->extraFormat["filetype"] + "\" " + s_start + " " + s_length + "\n\n";
-                output += "  FILE \"" + 
format_track_name(startmarker->get_description(), i+1) + "." + 
spec->extraFormat["filetype"] + "\"\n\n";
+                output += "  FILE \"" + 
format_cdtrack_name(startmarker->get_description(), i+1) + "." + 
spec->extraFormat["filetype"] + "\" 0 " + s_length + "\n\n";
 //             start += length;
 
                // check if the second marker is of type "Endmarker"

Index: Sheet.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Sheet.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Sheet.h     3 May 2009 21:47:33 -0000       1.10
+++ Sheet.h     7 May 2009 19:59:03 -0000       1.11
@@ -224,7 +224,7 @@
        void start_transport_rolling(bool realtime);
        void stop_transport_rolling();
        void update_skip_positions();
-        QString format_track_name(QString, int);
+        QString format_cdtrack_name(QString, int);
         QList<Marker *> get_cdtrack_list(ExportSpecification*);
        
        void resize_buffer(bool updateArmStatus, nframes_t size);

Index: TimeLine.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/TimeLine.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- TimeLine.cpp        3 May 2009 21:47:33 -0000       1.21
+++ TimeLine.cpp        7 May 2009 19:59:03 -0000       1.22
@@ -205,11 +205,11 @@
 
         foreach(Marker* marker, m_markers) {
                 if (marker->get_type() == Marker::CDTRACK) {
-                        list.push_back(marker);
+                        list.append(marker);
                 }
 
                 if (marker->get_type() == Marker::ENDMARKER) {
-                        list.push_back(marker);
+                        list.append(marker);
                         endmarker = true;
                 }
         }




reply via email to

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