[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src core/Export.cpp core/Export.h core...
From: |
Ben Levitt |
Subject: |
[Traverso-commit] traverso/src core/Export.cpp core/Export.h core... |
Date: |
Fri, 25 May 2007 23:37:24 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Ben Levitt <benjie> 07/05/25 23:37:24
Modified files:
src/core : Export.cpp Export.h Song.cpp
src/traverso : ExportWidget.cpp
Log message:
Fix cd export for songs with first clip at more than 0, make non-cd
export start at first clip's start, end at last clip's end
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Export.cpp?cvsroot=traverso&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Export.h?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ExportWidget.cpp?cvsroot=traverso&r1=1.40&r2=1.41
Patches:
Index: core/Export.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Export.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- core/Export.cpp 11 May 2007 11:16:32 -0000 1.7
+++ core/Export.cpp 25 May 2007 23:37:24 -0000 1.8
@@ -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.7 2007/05/11 11:16:32 r_sijrier Exp $
+ $Id: Export.cpp,v 1.8 2007/05/25 23:37:24 benjie Exp $
*/
#include "Export.h"
@@ -70,6 +70,7 @@
renderpass = WRITE_TO_HARDDISK;
normvalue = 1.0;
peakvalue = 0.0;
+ isCdExport = false;
}
int ExportSpecification::is_valid()
Index: core/Export.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Export.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- core/Export.h 15 May 2007 14:28:12 -0000 1.10
+++ core/Export.h 25 May 2007 23:37:24 -0000 1.11
@@ -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.10 2007/05/15 14:28:12 r_sijrier Exp $
+$Id: Export.h,v 1.11 2007/05/25 23:37:24 benjie Exp $
*/
#ifndef EXPORT_H
@@ -87,6 +87,7 @@
bool resumeTransport;
nframes_t resumeTransportFrame;
bool renderfinished;
+ bool isCdExport;
};
Index: core/Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- core/Song.cpp 25 May 2007 12:21:20 -0000 1.110
+++ core/Song.cpp 25 May 2007 23:37:24 -0000 1.111
@@ -359,12 +359,23 @@
}
+ if (spec->isCdExport) {
+ QList<Marker*> markers = m_timeline->get_markers();
+ if (markers.size() >= 2) {
+ startframe = markers.at(0)->get_when();
+ PMESG2(" Start marker found at %d", startframe);
+ spec->start_frame = startframe;
+ } else {
+ PMESG2(" No start marker found");
+ }
+
if (m_timeline->get_end_position(endframe)) {
PMESG2(" End marker found at %d", endframe);
spec->end_frame = endframe;
} else {
PMESG2(" No end marker found");
}
+ }
spec->total_frames = spec->end_frame - spec->start_frame;
@@ -963,26 +974,19 @@
output += " MESSAGE \"" + startmarker->get_message() +
"\"\n }\n }\n";
//Â add some stuff only required for the first track (e.g.
pre-gap)
- if (i == 0) {
- start =
cd_to_frame(frame_to_cd(startmarker->get_when(), m_project->get_rate()),
m_project->get_rate());
-
- if (pregap) {
- if (start == 0) {
+ if (i == 0 && pregap) {
+ //if (start == 0) {
// standard pregap, because we have a
track marker at the beginning
output += " PREGAP 00:02:00\n";
- } else {
- // no track marker at the beginning,
thus use the part from 0 to the first
- //Â track marker for the pregap
- output += " START " +
frame_to_cd(start, m_project->get_rate()) + "\n";
- start = 0;
- }
+ //} else {
+ // // no track marker at the beginning, thus use
the part from 0 to the first
+ // //Â track marker for the pregap
+ // output += " START " + frame_to_cd(start,
m_project->get_rate()) + "\n";
+ // start = 0;
+ //}
}
- }
-
-
- nframes_t end = cd_to_frame(frame_to_cd(endmarker->get_when(),
m_project->get_rate()), m_project->get_rate());
- nframes_t length = end - start;
+ nframes_t length =
cd_to_frame(frame_to_cd(endmarker->get_when(), m_project->get_rate()),
m_project->get_rate()) - cd_to_frame(frame_to_cd(startmarker->get_when(),
m_project->get_rate()), m_project->get_rate());
QString s_start = frame_to_cd(start, m_project->get_rate());
QString s_length = frame_to_cd(length, m_project->get_rate());
Index: traverso/ExportWidget.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ExportWidget.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- traverso/ExportWidget.cpp 23 May 2007 22:16:21 -0000 1.40
+++ traverso/ExportWidget.cpp 25 May 2007 23:37:24 -0000 1.41
@@ -530,6 +530,7 @@
m_exportSpec->isRecording = false;
m_exportSpec->stop = false;
m_exportSpec->breakout = false;
+ m_exportSpec->isCdExport = true;
if (m_project->create_cdrdao_toc(m_exportSpec) < 0) {
info().warning(tr("Creating CDROM table of contents
failed, unable to write CD"));
@@ -809,7 +810,7 @@
m_writingState = NO_STATE;
exportWidget->setEnabled(true);
optionsGroupBox->setEnabled(true);
- burnGroupBox->setEnabled(true);
+ burnGroupBox->setDisabled(cdDiskExportOnlyCheckBox->isChecked());
closeButton->setEnabled(true);
startButton->show();
stopButton->hide();