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 core/AudioClip....


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src core/AudioClip.cpp core/AudioClip....
Date: Wed, 17 Oct 2007 11:48:52 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       07/10/17 11:48:52

Modified files:
        src/core       : AudioClip.cpp AudioClip.h 
        src/traverso/dialogs/project: ProjectManagerDialog.cpp 
        src/traverso/songcanvas: AudioClipView.cpp 

Log message:
        * inline get_lock() function
        * revert AudioClipView last commit, it broke painting. Added another 
fix which seems to work (though its a weird fix, need to find the 'proper' fix)
        * fix compile warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.cpp?cvsroot=traverso&r1=1.144&r2=1.145
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/AudioClip.h?cvsroot=traverso&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/project/ProjectManagerDialog.cpp?cvsroot=traverso&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/AudioClipView.cpp?cvsroot=traverso&r1=1.106&r2=1.107

Patches:
Index: core/AudioClip.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- core/AudioClip.cpp  16 Oct 2007 21:53:04 -0000      1.144
+++ core/AudioClip.cpp  17 Oct 2007 11:48:51 -0000      1.145
@@ -790,11 +790,6 @@
        return m_isMuted;
 }
 
-bool AudioClip::is_locked( ) const
-{
-       return m_isLocked;
-}
-
 QString AudioClip::get_name( ) const
 {
        return m_name;

Index: core/AudioClip.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/AudioClip.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- core/AudioClip.h    3 Oct 2007 20:17:04 -0000       1.65
+++ core/AudioClip.h    17 Oct 2007 11:48:51 -0000      1.66
@@ -108,7 +108,7 @@
        bool is_muted() const;
        bool is_take() const;
        bool is_selected() const;
-       bool is_locked() const;
+       bool is_locked() const {return m_isLocked;}
        bool has_song() const;
        bool is_readsource_invalid() const {return !m_isReadSourceValid;}
        int recording_state() const;

Index: traverso/dialogs/project/ProjectManagerDialog.cpp
===================================================================
RCS file: 
/sources/traverso/traverso/src/traverso/dialogs/project/ProjectManagerDialog.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- traverso/dialogs/project/ProjectManagerDialog.cpp   10 Sep 2007 18:44:15 
-0000      1.20
+++ traverso/dialogs/project/ProjectManagerDialog.cpp   17 Oct 2007 11:48:52 
-0000      1.21
@@ -349,7 +349,6 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
-
 ...
 
 #define tc_title        textcodes[0x00]
@@ -365,6 +364,7 @@
 
 #define tc_closed_info  textcodes[0x0d]
 #define tc_isrc         textcodes[0x0e]
+*/
 
 /*
  *      binaere Felder sind

Index: traverso/songcanvas/AudioClipView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/AudioClipView.cpp,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- traverso/songcanvas/AudioClipView.cpp       16 Oct 2007 21:53:05 -0000      
1.106
+++ traverso/songcanvas/AudioClipView.cpp       17 Oct 2007 11:48:52 -0000      
1.107
@@ -117,7 +117,6 @@
        PENTER2;
        Q_UNUSED(widget);
        
-
 //     printf("AudioClipView:: %s PAINT :: exposed rect is: x=%f, y=%f, w=%f, 
h=%f\n", QS_C(m_clip->get_name()), option->exposedRect.x(), 
option->exposedRect.y(), option->exposedRect.width(), 
option->exposedRect.height());
        
        int xstart = (int) option->exposedRect.x();
@@ -234,7 +233,7 @@
        bool microView = m_song->get_hzoom() > (Peak::MAX_ZOOM_USING_SOURCEFILE 
- 1) ? 0 : 1;
        // boundary checking, important for microview only, macroview needs the 
additional
        // pixels to paint the waveform correctly
-       if ( /*microView && */((xstart + pixelcount) > m_boundingRect.width()) 
) {
+       if ( /*microView &&*/ ((xstart + pixelcount) > m_boundingRect.width()) 
) {
                pixelcount = (int) m_boundingRect.width() - xstart;
        }
        
@@ -258,6 +257,10 @@
                adjustforevenpixel -= 1;
        }
        
+       // Painting seems to start 1 pixel too much to the left
+       // this 'fixes it, but I'd rather like a real fix :D
+       adjustforevenpixel++;
+       
        int channels = m_clip->get_channels();
        int peakdatacount = microView ? pixelcount : pixelcount * 2;
 
@@ -369,7 +372,6 @@
        
        
        for (int chan=0; chan < channels; chan++) {
-               
                p->save();
                
                // calculate the height of the area available for peak drawing 
@@ -481,13 +483,12 @@
                                int range = pixelcount;
                                for (int x = 0; x < range; x+=2) {
                                        m_polygontop.append( QPointF(x, 
scaleFactor * pixeldata[chan][bufferpos++]) );
-                                       m_polygonbottom.append( 
QPointF(range-x, -scaleFactor * pixeldata[chan][range - bufferpos++]) );
+                                       m_polygonbottom.append( QPointF(x, 
-scaleFactor * pixeldata[chan][bufferpos++]) );
                                }
                                
                                path.addPolygon(m_polygontop);
-                               path.lineTo(m_polygonbottom.first());
+                               path.lineTo(m_polygonbottom.last());
                                path.addPolygon(m_polygonbottom);
-                               path.lineTo(m_polygontop.first());
                                
                                if (m_mergedView) {
                                        ytrans = (height / 2) * channels;
@@ -515,10 +516,8 @@
                                
                        }
                        
-                       
                        p->setMatrix(matrix().translate(xstart + 
adjustforevenpixel, ytrans), true);
                        p->drawPath(path);
-
                }
                
                p->restore();




reply via email to

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