comparison widgets/WindowShapePreview.cpp @ 545:be5c35d3f409

* solaris build fixes
author Chris Cannam
date Thu, 10 Sep 2009 18:44:45 +0000
parents cec1f78fbfca
children 1a0dfcbffaf1
comparison
equal deleted inserted replaced
544:1dd2cddc32eb 545:be5c35d3f409
23 #include <QString> 23 #include <QString>
24 24
25 #include "data/fft/FFTapi.h" 25 #include "data/fft/FFTapi.h"
26 26
27 #include <iostream> 27 #include <iostream>
28
29 #ifndef __GNUC__
30 #include <alloca.h>
31 #endif
28 32
29 WindowShapePreview::WindowShapePreview(QWidget *parent) : 33 WindowShapePreview::WindowShapePreview(QWidget *parent) :
30 QFrame(parent), 34 QFrame(parent),
31 m_windowType(WindowType(999)) 35 m_windowType(WindowType(999))
32 { 36 {
65 timePainter.setRenderHint(QPainter::Antialiasing, true); 69 timePainter.setRenderHint(QPainter::Antialiasing, true);
66 timePainter.drawPath(path); 70 timePainter.drawPath(path);
67 71
68 path = QPainterPath(); 72 path = QPainterPath();
69 73
74 #ifdef __GNUC__
70 float acc[w]; 75 float acc[w];
76 #else
77 float *acc = (float *)alloca(w * sizeof(float));
78 #endif
79
71 for (int i = 0; i < w; ++i) acc[i] = 0.f; 80 for (int i = 0; i < w; ++i) acc[i] = 0.f;
72 for (int j = 0; j < 3; ++j) { 81 for (int j = 0; j < 3; ++j) {
73 for (int i = 0; i < step * 2; ++i) { 82 for (int i = 0; i < step * 2; ++i) {
74 acc[j * step + i] += windower.getValue(i); 83 acc[j * step + i] += windower.getValue(i);
75 } 84 }