]> git.sesse.net Git - kdenlive/commitdiff
range fix for bytes
authorMarco Gittler <marco@gitma.de>
Tue, 28 Sep 2010 11:09:06 +0000 (11:09 +0000)
committerMarco Gittler <marco@gitma.de>
Tue, 28 Sep 2010 11:09:06 +0000 (11:09 +0000)
should be converted to QList<int>

svn path=/trunk/kdenlive/; revision=4949

src/audiosignal.cpp

index 4a147efbbfd3555f65b165fe8bc0e9cb50c91bb8..36de4b825a7547ab3a262ed7a4bccc436c17e531 100644 (file)
@@ -65,7 +65,7 @@ void AudioSignal::paintEvent(QPaintEvent* /*e*/)
     //p.fillRect(0,height()/2,(unsigned char)channels[1]*width()/255,height()/2,QBrush(Qt::SolidPattern));
     int numchan = channels.size();
     for (int i = 0; i < numchan; i++) {
-        int maxx = (unsigned char)channels[i] * width() / 255;
+        int maxx = (unsigned char)channels[i] * width() / 127;
         int xdelta = width() / 20;
         int y1 = height() * i / numchan;
         int _h = height() / numchan - 1;
@@ -75,7 +75,7 @@ void AudioSignal::paintEvent(QPaintEvent* /*e*/)
                 maxx -= xdelta;
             }
         }
-        p.fillRect(peeks.at(i)*width()/255-2,y1,3,_h,QBrush(Qt::black,Qt::SolidPattern));
+        p.fillRect(peeks.at(i)*width()/127-2,y1,3,_h,QBrush(Qt::black,Qt::SolidPattern));
     }
     p.end();
 }