[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso/src core/AudioClip.cpp core/Curve.cpp ...
From: |
Ben Levitt |
Subject: |
[Traverso-commit] traverso/src core/AudioClip.cpp core/Curve.cpp ... |
Date: |
Sat, 11 Aug 2007 22:54:59 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Ben Levitt <benjie> 07/08/11 22:54:59
Modified files:
src/core : AudioClip.cpp Curve.cpp FadeCurve.cpp Peak.cpp
ProjectManager.cpp SnapList.cpp Song.cpp
Track.cpp Utils.cpp
src/commands : Fade.cpp MoveClip.cpp
src/plugins : Plugin.cpp PluginSlider.cpp
src/plugins/native: SpectralMeter.cpp
src/traverso : ContextDialog.h
src/traverso/dialogs: AudioClipEditDialog.cpp
InsertSilenceDialog.cpp
src/traverso/songcanvas: Cursors.cpp CurveView.cpp
MarkerView.cpp PluginChainView.cpp
src/traverso/widgets: InfoWidgets.cpp
Log message:
Fix lots of compiler warnings.
Remon, please make sure the core/Curve.cpp change is correct. (adds a
missing return, but I
was guessing at the correct return val.)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.cpp?cvsroot=traverso&r1=1.117&r2=1.118
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Curve.cpp?cvsroot=traverso&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/FadeCurve.cpp?cvsroot=traverso&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Peak.cpp?cvsroot=traverso&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectManager.cpp?cvsroot=traverso&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/SnapList.cpp?cvsroot=traverso&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Song.cpp?cvsroot=traverso&r1=1.126&r2=1.127
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Track.cpp?cvsroot=traverso&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Utils.cpp?cvsroot=traverso&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/Fade.cpp?cvsroot=traverso&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/MoveClip.cpp?cvsroot=traverso&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/Plugin.cpp?cvsroot=traverso&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/PluginSlider.cpp?cvsroot=traverso&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/traverso/src/plugins/native/SpectralMeter.cpp?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ContextDialog.h?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/AudioClipEditDialog.cpp?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/InsertSilenceDialog.cpp?cvsroot=traverso&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.cpp?cvsroot=traverso&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/CurveView.cpp?cvsroot=traverso&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/MarkerView.cpp?cvsroot=traverso&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/PluginChainView.cpp?cvsroot=traverso&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/widgets/InfoWidgets.cpp?cvsroot=traverso&r1=1.41&r2=1.42
Patches:
Index: core/AudioClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.cpp,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- core/AudioClip.cpp 3 Aug 2007 23:05:03 -0000 1.117
+++ core/AudioClip.cpp 11 Aug 2007 22:54:57 -0000 1.118
@@ -687,7 +687,7 @@
m_peaks.clear();
- for (int chan=0; chan<m_readSource->get_channel_count(); ++chan) {
+ for (uint chan=0; chan<m_readSource->get_channel_count(); ++chan) {
m_peaks.append(new Peak(rs, chan));
}
Index: core/Curve.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Curve.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- core/Curve.cpp 30 May 2007 13:57:36 -0000 1.41
+++ core/Curve.cpp 11 Aug 2007 22:54:57 -0000 1.42
@@ -203,6 +203,8 @@
for (nframes_t n = 0; n < nframes; ++n) {
buffer[n] *= mixdown[n];
}
+
+ return 1;
}
Index: core/FadeCurve.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/FadeCurve.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- core/FadeCurve.cpp 2 Aug 2007 22:01:36 -0000 1.24
+++ core/FadeCurve.cpp 11 Aug 2007 22:54:57 -0000 1.25
@@ -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: FadeCurve.cpp,v 1.24 2007/08/02 22:01:36 benjie Exp $
+$Id: FadeCurve.cpp,v 1.25 2007/08/11 22:54:57 benjie Exp $
*/
#include "FadeCurve.h"
@@ -43,6 +43,8 @@
, m_clip(clip)
, m_sType(type)
{
+ Q_UNUSED(song);
+
if (type == "FadeIn") {
m_type = FadeIn;
}
Index: core/Peak.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Peak.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- core/Peak.cpp 19 Jul 2007 04:05:58 -0000 1.38
+++ core/Peak.cpp 11 Aug 2007 22:54:57 -0000 1.39
@@ -700,7 +700,7 @@
read = fread(readbuffer, sizeof(audio_sample_t), count, m_file);
- if (read != count) {
+ if (read != (int)count) {
printf("could only read %d, %d requested\n", read, count);
}
Index: core/ProjectManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ProjectManager.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- core/ProjectManager.cpp 3 Jul 2007 14:23:16 -0000 1.41
+++ core/ProjectManager.cpp 11 Aug 2007 22:54:57 -0000 1.42
@@ -434,6 +434,8 @@
void ProjectManager::project_dir_rename_detected(const QString & dirname)
{
+ Q_UNUSED(dirname);
+
emit projectDirChangeDetected();
QString path = config().get_property("Project", "directory",
"").toString();
Index: core/SnapList.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/SnapList.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- core/SnapList.cpp 5 May 2007 17:13:13 -0000 1.15
+++ core/SnapList.cpp 11 Aug 2007 22:54:57 -0000 1.16
@@ -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: SnapList.cpp,v 1.15 2007/05/05 17:13:13 benjie Exp $
+$Id: SnapList.cpp,v 1.16 2007/08/11 22:54:57 benjie Exp $
*/
#include "SnapList.h"
@@ -138,7 +138,7 @@
int ls = -SNAP_WIDTH;
if (lastIndex > -1) {
- if ( (xposList.at(i) - lastVal) < (2 * SNAP_WIDTH *
m_scalefactor) ) {
+ if ( (nframes_t)(xposList.at(i) - lastVal) <
(nframes_t)(2 * SNAP_WIDTH * m_scalefactor) ) {
ls = - (int) ((xposList.at(i) / m_scalefactor -
lastVal / m_scalefactor) / 2);
}
}
Index: core/Song.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Song.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -b -r1.126 -r1.127
--- core/Song.cpp 3 Aug 2007 02:39:35 -0000 1.126
+++ core/Song.cpp 11 Aug 2007 22:54:57 -0000 1.127
@@ -813,7 +813,7 @@
//Â deactivate the next if-condition (only the
first one) if you want the
// stuff before the first marker to go into the
pre-gap
- if (mlist.at(0)->get_when() !=
spec->start_frame) {
+ if ((nframes_t)(mlist.at(0)->get_when()) !=
(nframes_t)(spec->start_frame)) {
mlist.append(new Marker(m_timeline,
spec->start_frame, Marker::TEMP_CDTRACK));
}
if (mlist.at(0)->get_when() != spec->end_frame)
{
Index: core/Track.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Track.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- core/Track.cpp 18 Jul 2007 13:13:07 -0000 1.63
+++ core/Track.cpp 11 Aug 2007 22:54:57 -0000 1.64
@@ -63,6 +63,7 @@
m_song(song)
{
PENTERCONS;
+ Q_UNUSED(node);
init();
}
Index: core/Utils.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Utils.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- core/Utils.cpp 8 May 2007 22:13:40 -0000 1.11
+++ core/Utils.cpp 11 Aug 2007 22:54:57 -0000 1.12
@@ -125,10 +125,10 @@
QString frame_to_ms(double nframes, int rate)
{
long unsigned int remainder;
- int hours, mins, secs;
+ int mins, secs;
mins = (int) (nframes / ( 60 * rate ));
- remainder = nframes - (mins * 60 * rate);
+ remainder = (long unsigned int) (nframes - (mins * 60 * rate));
secs = (int) (remainder / rate);
return QString().sprintf("%02d:%02d", mins, secs);
}
Index: commands/Fade.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/Fade.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- commands/Fade.cpp 30 Jun 2007 16:30:54 -0000 1.20
+++ commands/Fade.cpp 11 Aug 2007 22:54:58 -0000 1.21
@@ -126,7 +126,7 @@
m_curve->set_range( newFade );
- cpointer().get_viewport()->set_holdcursor_text(frame_to_ms_3(newFade,
pm().get_project()->get_rate()));
+
cpointer().get_viewport()->set_holdcursor_text(frame_to_ms_3((nframes_t)newFade,
pm().get_project()->get_rate()));
return 1;
}
Index: commands/MoveClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/MoveClip.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- commands/MoveClip.cpp 28 Jun 2007 03:11:28 -0000 1.48
+++ commands/MoveClip.cpp 11 Aug 2007 22:54:58 -0000 1.49
@@ -105,6 +105,8 @@
void MoveClip::audioclip_added(AudioClip * clip)
{
+ Q_UNUSED(clip);
+
QList<AudioClipView* >* clipviews =
d->view->get_trackview()->get_clipviews();
for (int i = 0; i < clipviews->size(); ++i) {
Index: plugins/Plugin.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/Plugin.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- plugins/Plugin.cpp 30 May 2007 13:57:37 -0000 1.5
+++ plugins/Plugin.cpp 11 Aug 2007 22:54:58 -0000 1.6
@@ -114,6 +114,7 @@
int PluginPort::set_state( const QDomNode & node )
{
+ Q_UNUSED(node);
return 1;
}
Index: plugins/PluginSlider.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/PluginSlider.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- plugins/PluginSlider.cpp 30 May 2007 13:14:48 -0000 1.9
+++ plugins/PluginSlider.cpp 11 Aug 2007 22:54:58 -0000 1.10
@@ -92,7 +92,7 @@
if (mouseX > width())
mouseX = width();
- m_xpos = mouseX;
+ m_xpos = (int)mouseX;
float relativePos = ((float) mouseX) / width();
Index: plugins/native/SpectralMeter.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/plugins/native/SpectralMeter.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- plugins/native/SpectralMeter.cpp 15 Jan 2007 23:54:57 -0000 1.4
+++ plugins/native/SpectralMeter.cpp 11 Aug 2007 22:54:58 -0000 1.5
@@ -16,7 +16,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: SpectralMeter.cpp,v 1.4 2007/01/15 23:54:57 r_sijrier Exp $
+$Id: SpectralMeter.cpp,v 1.5 2007/08/11 22:54:58 benjie Exp $
*/
@@ -181,7 +181,7 @@
m_databufferL->read(&left, 1);
m_databufferR->read(&right, 1);
- for (uint i = 0; i < m_frlen; ++i) {
+ for (int i = 0; i < m_frlen; ++i) {
m_databufferL->read(&left, 1);
m_databufferR->read(&right, 1);
fftsigl[i] = (double)left * win[i];
@@ -195,7 +195,7 @@
float tmp;
// send the fft spectrum to the caller
- for (uint i = 1; i < m_frlen/2 + 1; ++i) {
+ for (int i = 1; i < m_frlen/2 + 1; ++i) {
tmp = pow((float)fftspecl[i][0],2.0f) +
pow((float)fftspecl[i][1],2.0f);
specl.push_back(tmp);
tmp = pow((float)fftspecr[i][0],2.0f) +
pow((float)fftspecr[i][1],2.0f);
Index: traverso/ContextDialog.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ContextDialog.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- traverso/ContextDialog.h 16 Jan 2007 15:24:17 -0000 1.2
+++ traverso/ContextDialog.h 11 Aug 2007 22:54:58 -0000 1.3
@@ -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: ContextDialog.h,v 1.2 2007/01/16 15:24:17 r_sijrier Exp $
+$Id: ContextDialog.h,v 1.3 2007/08/11 22:54:58 benjie Exp $
*/
#ifndef CONTEXT_DIALOG_H
@@ -34,7 +34,7 @@
ContextDialog();
~ContextDialog();
- void get_pointed_context_items(QList<ContextItem* > &list) {};
+ void get_pointed_context_items(QList<ContextItem* > &list)
{Q_UNUSED(list);};
protected:
void keyPressEvent ( QKeyEvent* e);
Index: traverso/dialogs/AudioClipEditDialog.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/dialogs/AudioClipEditDialog.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- traverso/dialogs/AudioClipEditDialog.cpp 2 Aug 2007 17:57:26 -0000
1.6
+++ traverso/dialogs/AudioClipEditDialog.cpp 11 Aug 2007 22:54:58 -0000
1.7
@@ -226,7 +226,7 @@
if (ie().is_holding()) return;
if (locked) return;
- QTime fadeTime = nframes_to_qtime(m_clip->get_fade_in()->get_range(),
m_clip->get_rate());
+ QTime fadeTime =
nframes_to_qtime((nframes_t)(m_clip->get_fade_in()->get_range()),
m_clip->get_rate());
fadeInEdit->setTime(fadeTime);
}
@@ -234,7 +234,7 @@
{
if (locked) return;
- QTime fadeTime = nframes_to_qtime(m_clip->get_fade_out()->get_range(),
m_clip->get_rate());
+ QTime fadeTime =
nframes_to_qtime((nframes_t)(m_clip->get_fade_out()->get_range()),
m_clip->get_rate());
fadeOutEdit->setTime(fadeTime);
}
Index: traverso/dialogs/InsertSilenceDialog.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/dialogs/InsertSilenceDialog.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- traverso/dialogs/InsertSilenceDialog.cpp 2 May 2007 21:56:18 -0000
1.2
+++ traverso/dialogs/InsertSilenceDialog.cpp 11 Aug 2007 22:54:58 -0000
1.3
@@ -79,7 +79,7 @@
m_track = shortestTrack;
}
- nframes_t length = lengthSpinBox->value() *
pm().get_project()->get_rate();
+ nframes_t length = (nframes_t)(lengthSpinBox->value() *
pm().get_project()->get_rate());
Import* cmd = new Import(m_track, true, length);
Command::process_command(cmd);
}
Index: traverso/songcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- traverso/songcanvas/Cursors.cpp 21 Jun 2007 14:31:11 -0000 1.25
+++ traverso/songcanvas/Cursors.cpp 11 Aug 2007 22:54:58 -0000 1.26
@@ -184,9 +184,9 @@
qreal deltaX = newPos.x() - pos().x();
// calculate the animation x diff.
- int diff = float(int(0.5 + ((float)(value) / m_totalAnimFrames) *
m_animFrameRange));
- m_totalAnimValue += (diff + deltaX);
- int newXPos = m_animationScrollStartPos + m_totalAnimValue;
+ int diff = (int)(0.5 + ((float)(value) / m_totalAnimFrames) *
m_animFrameRange);
+ m_totalAnimValue += (int)(diff + deltaX);
+ int newXPos = (int)(m_animationScrollStartPos + m_totalAnimValue);
if (newPos != pos()) {
setPos(newPos);
Index: traverso/songcanvas/CurveView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/CurveView.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- traverso/songcanvas/CurveView.cpp 5 Jun 2007 22:51:29 -0000 1.55
+++ traverso/songcanvas/CurveView.cpp 11 Aug 2007 22:54:58 -0000 1.56
@@ -508,10 +508,10 @@
emit curveModified();
if (index > 0) {
- min = nodeList->at(index-1)->get_when() + 1;
+ min = (long)(nodeList->at(index-1)->get_when() + 1);
}
if (nodeList->size() > index + 1) {
- max = nodeList->at(index+1)->get_when() - 1;
+ max = (long)(nodeList->at(index+1)->get_when() - 1);
}
return new DragNode(m_blinkingNode->get_curve_node(), this,
m_sv->scalefactor, min, max, tr("Drag Node"));
}
Index: traverso/songcanvas/MarkerView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/MarkerView.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- traverso/songcanvas/MarkerView.cpp 28 Jun 2007 14:57:22 -0000 1.20
+++ traverso/songcanvas/MarkerView.cpp 11 Aug 2007 22:54:58 -0000 1.21
@@ -85,7 +85,7 @@
painter->drawText(m_width + 1, m_ascent, m_marker->get_description());
if (m_dragging) {
- m_posIndicator->set_value(frame_to_text( (x() + m_width / 2) *
m_sv->scalefactor,
+ m_posIndicator->set_value(frame_to_text((nframes_t)((x() +
m_width / 2) * m_sv->scalefactor),
m_sv->get_song()->get_rate(),
m_sv->scalefactor));
}
@@ -112,7 +112,7 @@
int MarkerView::position()
{
- return (pos().x() + m_width / 2);
+ return (int)(pos().x() + m_width / 2);
}
void MarkerView::set_position(int i)
Index: traverso/songcanvas/PluginChainView.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/songcanvas/PluginChainView.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- traverso/songcanvas/PluginChainView.cpp 30 May 2007 13:14:48 -0000
1.15
+++ traverso/songcanvas/PluginChainView.cpp 11 Aug 2007 22:54:58 -0000
1.16
@@ -144,7 +144,7 @@
void PluginChainView::calculate_bounding_rect()
{
- int y = m_parentViewItem->boundingRect().height();
+ int y = (int)(m_parentViewItem->boundingRect().height());
m_boundingRect = QRectF(0, 0, 0, y);
setPos(pos().x(), - 2);
ViewItem::calculate_bounding_rect();
Index: traverso/widgets/InfoWidgets.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/widgets/InfoWidgets.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- traverso/widgets/InfoWidgets.cpp 26 Jun 2007 18:29:55 -0000 1.41
+++ traverso/widgets/InfoWidgets.cpp 11 Aug 2007 22:54:58 -0000 1.42
@@ -444,6 +444,7 @@
void PlayHeadInfo::resizeEvent(QResizeEvent * e)
{
+ Q_UNUSED(e);
create_background();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso/src core/AudioClip.cpp core/Curve.cpp ...,
Ben Levitt <=