traverso-commit
[Top][All Lists]
Advanced

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

[Traverso-commit] traverso/src core/DiskIO.cpp core/Marker.cpp co...


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src core/DiskIO.cpp core/Marker.cpp co...
Date: Tue, 29 Jan 2008 18:21:54 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       08/01/29 18:21:54

Modified files:
        src/core       : DiskIO.cpp Marker.cpp Peak.cpp Peak.h 
                         ReadSource.cpp 
        src/sheetcanvas: Cursors.cpp 

Log message:
        * let memcheck shut it's mouth a bit more :)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/DiskIO.cpp?cvsroot=traverso&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Marker.cpp?cvsroot=traverso&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Peak.cpp?cvsroot=traverso&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Peak.h?cvsroot=traverso&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ReadSource.cpp?cvsroot=traverso&r1=1.94&r2=1.95
http://cvs.savannah.gnu.org/viewcvs/traverso/src/sheetcanvas/Cursors.cpp?cvsroot=traverso&r1=1.1&r2=1.2

Patches:
Index: core/DiskIO.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/DiskIO.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- core/DiskIO.cpp     24 Jan 2008 19:19:11 -0000      1.59
+++ core/DiskIO.cpp     29 Jan 2008 18:21:53 -0000      1.60
@@ -147,7 +147,7 @@
        lastCpuReadTime = get_microseconds();
        m_stopWork = m_seeking = m_sampleRateChanged = 0;
        m_resampleQuality = config().get_property("Conversion", 
"RTResamplingConverterType", DEFAULT_RESAMPLE_QUALITY).toInt();
-       m_readBufferFillStatus = 0;
+       m_readBufferFillStatus = m_writeBufferFillStatus = 0;
        m_hardDiskOverLoadCounter = 0;
        
        // TODO This is a LARGE buffer, any ideas how to make it smaller ??

Index: core/Marker.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Marker.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- core/Marker.cpp     21 Jan 2008 16:22:14 -0000      1.19
+++ core/Marker.cpp     29 Jan 2008 18:21:53 -0000      1.20
@@ -26,7 +26,7 @@
 #include "Utils.h"
 
 Marker::Marker(TimeLine* tl, const TimeRef when, Type type)
-       : ContextItem()
+       : ContextItem(tl)
        , Snappable()
        , m_timeline(tl)
        , m_when(when)
@@ -48,7 +48,7 @@
 }
 
 Marker::Marker(TimeLine * tl, const QDomNode node)
-       : ContextItem()
+       : ContextItem(tl)
        , Snappable()
        , m_timeline(tl)
 {

Index: core/Peak.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Peak.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- core/Peak.cpp       28 Jan 2008 17:33:41 -0000      1.81
+++ core/Peak.cpp       29 Jan 2008 18:21:53 -0000      1.82
@@ -310,7 +310,7 @@
        } else {
                
                int highbit;
-               unsigned long nearestpow2 = 
nearest_power_of_two(qRound(zoomLevel), highbit);
+               unsigned long nearestpow2 = nearest_power_of_two(zoomLevel, 
highbit);
                
                if (nearestpow2 == 0) {
                        nearestpow2 = 1;
@@ -872,6 +872,7 @@
 {
        m_d = data;
        m_nframes = m_d->file.size();
+       m_readPos = 0;
 }
 
 
@@ -914,12 +915,13 @@
 
 nframes_t PeakDataReader::read(DecodeBuffer* buffer, nframes_t count)
 {
+       PENTER;
        if ( ! (count && (m_readPos < m_nframes)) ) {
                return 0;
        }
                
        // Make sure the read buffer is big enough for this read
-       buffer->check_buffers_capacity(count*3, 2);
+       buffer->check_buffers_capacity(count*3, 1);
        
        Q_ASSERT(m_d->file.isOpen());
        

Index: core/Peak.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Peak.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- core/Peak.h 28 Jan 2008 17:33:41 -0000      1.31
+++ core/Peak.h 29 Jan 2008 18:21:54 -0000      1.32
@@ -168,6 +168,12 @@
        struct ChannelData {
                ChannelData() {
                        memory = 0;
+                       peakdataDecodeBuffer = 0;
+               }
+               ~ChannelData() {
+                       if (peakdataDecodeBuffer) {
+                               delete peakdataDecodeBuffer;
+                       }
                }
                QString         fileName;
                QString         normFileName;

Index: core/ReadSource.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ReadSource.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -b -r1.94 -r1.95
--- core/ReadSource.cpp 24 Jan 2008 19:28:16 -0000      1.94
+++ core/ReadSource.cpp 29 Jan 2008 18:21:54 -0000      1.95
@@ -224,6 +224,7 @@
        m_needSync = 1;
        m_syncInProgress = 0;
        m_bufferUnderRunDetected = m_wasActivated = 0;
+       m_active = 0;
        
        // There should be another config option for ConverterType to use for 
export (higher quality)
        //converter_type = config().get_property("Conversion", 
"ExportResamplingConverterType", 0).toInt();

Index: sheetcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/sheetcanvas/Cursors.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- sheetcanvas/Cursors.cpp     21 Jan 2008 16:17:28 -0000      1.1
+++ sheetcanvas/Cursors.cpp     29 Jan 2008 18:21:54 -0000      1.2
@@ -71,6 +71,7 @@
 {
        m_mode = (PlayHeadMode) config().get_property("PlayHead", "Scrollmode", 
ANIMATED_FLIP_PAGE).toInt();
        m_follow = config().get_property("PlayHead", "Follow", true).toBool();
+       m_followDisabled = false;
 }
 
 void PlayHead::paint( QPainter * painter, const QStyleOptionGraphicsItem * 
option, QWidget * widget )




reply via email to

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