comparison layer/WaveformLayer.cpp @ 860:4a5d144bd5d0 tonioni

Merge from default branch
author Chris Cannam
date Tue, 09 Sep 2014 16:36:21 +0100
parents d282967236d5
children 4a578a360011
comparison
equal deleted inserted replaced
842:8432d2551fb2 860:4a5d144bd5d0
44 m_channel(-1), 44 m_channel(-1),
45 m_scale(LinearScale), 45 m_scale(LinearScale),
46 m_middleLineHeight(0.5), 46 m_middleLineHeight(0.5),
47 m_aggressive(false), 47 m_aggressive(false),
48 m_cache(0), 48 m_cache(0),
49 m_cacheValid(false) 49 m_cacheValid(false),
50 m_cacheZoomLevel(0)
50 { 51 {
51 52
52 } 53 }
53 54
54 WaveformLayer::~WaveformLayer() 55 WaveformLayer::~WaveformLayer()
455 m_model->getSummary(channel, rangeStart, rangeEnd - rangeStart); 456 m_model->getSummary(channel, rangeStart, rangeEnd - rangeStart);
456 457
457 int minChannel = 0, maxChannel = 0; 458 int minChannel = 0, maxChannel = 0;
458 bool mergingChannels = false, mixingChannels = false; 459 bool mergingChannels = false, mixingChannels = false;
459 460
460 getChannelArrangement(minChannel, maxChannel, 461 (void)getChannelArrangement(minChannel, maxChannel,
461 mergingChannels, mixingChannels); 462 mergingChannels, mixingChannels);
462 463
463 if (mergingChannels || mixingChannels) { 464 if (mergingChannels || mixingChannels) {
464 RangeSummarisableTimeValueModel::Range otherRange = 465 RangeSummarisableTimeValueModel::Range otherRange =
465 m_model->getSummary(1, rangeStart, rangeEnd - rangeStart); 466 m_model->getSummary(1, rangeStart, rangeEnd - rangeStart);
466 range.setMax(std::max(range.max(), otherRange.max())); 467 range.setMax(std::max(range.max(), otherRange.max()));
1040 int channels = 0, minChannel = 0, maxChannel = 0; 1041 int channels = 0, minChannel = 0, maxChannel = 0;
1041 bool mergingChannels = false, mixingChannels = false; 1042 bool mergingChannels = false, mixingChannels = false;
1042 1043
1043 channels = getChannelArrangement(minChannel, maxChannel, 1044 channels = getChannelArrangement(minChannel, maxChannel,
1044 mergingChannels, mixingChannels); 1045 mergingChannels, mixingChannels);
1045 1046 if (channels == 0) return 0;
1046 if (maxChannel < minChannel || channel < minChannel) return 0; 1047 if (maxChannel < minChannel || channel < minChannel) return 0;
1047 1048
1048 int h = v->height(); 1049 int h = v->height();
1049 int m = (h / channels) / 2; 1050 int m = (h / channels) / 2;
1050 1051
1083 int channels = 0, minChannel = 0, maxChannel = 0; 1084 int channels = 0, minChannel = 0, maxChannel = 0;
1084 bool mergingChannels = false, mixingChannels = false; 1085 bool mergingChannels = false, mixingChannels = false;
1085 1086
1086 channels = getChannelArrangement(minChannel, maxChannel, 1087 channels = getChannelArrangement(minChannel, maxChannel,
1087 mergingChannels, mixingChannels); 1088 mergingChannels, mixingChannels);
1088 1089 if (channels == 0) return 0;
1089 if (maxChannel < minChannel) return 0; 1090 if (maxChannel < minChannel) return 0;
1090 1091
1091 int h = v->height(); 1092 int h = v->height();
1092 int m = (h / channels) / 2; 1093 int m = (h / channels) / 2;
1093 1094