comparison data/model/WaveFileModel.cpp @ 608:d7f3dfe6f9a4

* solaris build fixes
author Chris Cannam
date Thu, 10 Sep 2009 18:44:45 +0000
parents d3faa6447c5b
children 06f13a3b9e9e
comparison
equal deleted inserted replaced
607:a67651386253 608:d7f3dfe6f9a4
492 492
493 if (cacheType == 0) { 493 if (cacheType == 0) {
494 cacheBlock = (1 << m_zoomConstraint.getMinCachePower()); 494 cacheBlock = (1 << m_zoomConstraint.getMinCachePower());
495 div = (1 << power) / cacheBlock; 495 div = (1 << power) / cacheBlock;
496 } else { 496 } else {
497 cacheBlock = ((unsigned int)((1 << m_zoomConstraint.getMinCachePower()) * sqrt(2) + 0.01)); 497 cacheBlock = ((unsigned int)((1 << m_zoomConstraint.getMinCachePower()) * sqrt(2.) + 0.01));
498 div = ((unsigned int)((1 << power) * sqrt(2) + 0.01)) / cacheBlock; 498 div = ((unsigned int)((1 << power) * sqrt(2.) + 0.01)) / cacheBlock;
499 } 499 }
500 500
501 size_t startIndex = start / cacheBlock; 501 size_t startIndex = start / cacheBlock;
502 size_t endIndex = (start + count) / cacheBlock; 502 size_t endIndex = (start + count) / cacheBlock;
503 503
654 WaveFileModel::RangeCacheFillThread::run() 654 WaveFileModel::RangeCacheFillThread::run()
655 { 655 {
656 size_t cacheBlockSize[2]; 656 size_t cacheBlockSize[2];
657 cacheBlockSize[0] = (1 << m_model.m_zoomConstraint.getMinCachePower()); 657 cacheBlockSize[0] = (1 << m_model.m_zoomConstraint.getMinCachePower());
658 cacheBlockSize[1] = ((unsigned int)((1 << m_model.m_zoomConstraint.getMinCachePower()) * 658 cacheBlockSize[1] = ((unsigned int)((1 << m_model.m_zoomConstraint.getMinCachePower()) *
659 sqrt(2) + 0.01)); 659 sqrt(2.) + 0.01));
660 660
661 size_t frame = 0; 661 size_t frame = 0;
662 int readBlockSize = 16384; 662 int readBlockSize = 16384;
663 SampleBlock block; 663 SampleBlock block;
664 664