diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-29 23:25:45 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-29 23:25:45 -0600 |
commit | 4da01909a890b0053eb0dd068a6e483e75a94204 (patch) | |
tree | 1cfe51ef5b14bd9ef61f4d64c185a9b4b990eadf /src/sound/PeakFile.cpp | |
parent | efe74e7dc33cd566621f814946f589ec37a2d242 (diff) | |
download | rosegarden-4da01909a890b0053eb0dd068a6e483e75a94204.tar.gz rosegarden-4da01909a890b0053eb0dd068a6e483e75a94204.zip |
Rename a few build variables for overall consistency
Diffstat (limited to 'src/sound/PeakFile.cpp')
-rw-r--r-- | src/sound/PeakFile.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/sound/PeakFile.cpp b/src/sound/PeakFile.cpp index bf155b8..1edbdbc 100644 --- a/src/sound/PeakFile.cpp +++ b/src/sound/PeakFile.cpp @@ -35,12 +35,12 @@ using std::cout; using std::cerr; using std::endl; -//#define DEBUG_PEAKFILE 1 -//#define DEBUG_PEAKFILE_BRIEF 1 -//#define DEBUG_PEAKFILE_CACHE 1 +//#define DEBUG_PEATDEFILE 1 +//#define DEBUG_PEATDEFILE_BRIEF 1 +//#define DEBUG_PEATDEFILE_CACHE 1 -#ifdef DEBUG_PEAKFILE -#define DEBUG_PEAKFILE_BRIEF 1 +#ifdef DEBUG_PEATDEFILE +#define DEBUG_PEATDEFILE_BRIEF 1 #endif namespace Rosegarden @@ -94,7 +94,7 @@ PeakFile::open() parseHeader(); } catch (BadSoundFileException s) { -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE cerr << "PeakFile::open - EXCEPTION \"" << s.getMessage() << "\"" << endl; #endif @@ -216,7 +216,7 @@ PeakFile::write(unsigned short updatePercentage) if (!m_audioFile->open()) return false; } catch (BadSoundFileException e) { -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cerr << "PeakFile::write - \"" << e.getMessage() << "\"" << std::endl; #endif @@ -484,7 +484,7 @@ PeakFile::writePeaks(unsigned short /*updatePercentage*/, return ; m_keepProcessing = true; -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE cout << "PeakFile::writePeaks - calculating peaks" << endl; #endif @@ -624,7 +624,7 @@ PeakFile::writePeaks(unsigned short /*updatePercentage*/, m_numberOfPeaks++; } -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE cout << "PeakFile::writePeaks - " << "completed peaks" << endl; #endif @@ -642,7 +642,7 @@ PeakFile::getPreview(const RealTime &startTime, int width, bool showMinima) { -#ifdef DEBUG_PEAKFILE_BRIEF +#ifdef DEBUG_PEATDEFILE_BRIEF std::cout << "PeakFile::getPreview - " << "startTime = " << startTime << ", endTime = " << endTime @@ -658,7 +658,7 @@ PeakFile::getPreview(const RealTime &startTime, // Regenerate cache on these conditions // if (!m_peakCache.length()) { -#ifdef DEBUG_PEAKFILE_CACHE +#ifdef DEBUG_PEATDEFILE_CACHE std::cerr << "PeakFile::getPreview - no peak cache" << std::endl; #endif @@ -675,13 +675,13 @@ PeakFile::getPreview(const RealTime &startTime, << std::endl; } -#ifdef DEBUG_PEAKFILE_CACHE +#ifdef DEBUG_PEATDEFILE_CACHE std::cout << "PeakFile::getPreview - generated peak cache - " << "size = " << m_peakCache.length() << std::endl; #endif } else { -#ifdef DEBUG_PEAKFILE_CACHE +#ifdef DEBUG_PEATDEFILE_CACHE std::cout << "PeakFile::getPreview - file size = " << getSize() << ", not generating cache" << std::endl; #endif @@ -694,13 +694,13 @@ PeakFile::getPreview(const RealTime &startTime, // if (startTime == m_lastPreviewStartTime && endTime == m_lastPreviewEndTime && width == m_lastPreviewWidth && showMinima == m_lastPreviewShowMinima) { -#ifdef DEBUG_PEAKFILE_CACHE +#ifdef DEBUG_PEATDEFILE_CACHE std::cout << "PeakFile::getPreview - hit last preview cache" << std::endl; #endif return m_lastPreviewCache; } else { -#ifdef DEBUG_PEAKFILE_CACHE +#ifdef DEBUG_PEATDEFILE_CACHE std::cout << "PeakFile::getPreview - last preview " << m_lastPreviewStartTime << " -> " << m_lastPreviewEndTime << ", w " << m_lastPreviewWidth << "; this " << startTime << " -> " << endTime << ", w " << width << std::endl; #endif @@ -724,7 +724,7 @@ PeakFile::getPreview(const RealTime &startTime, std::string peakData; int peakNumber; -#ifdef DEBUG_PEAKFILE_BRIEF +#ifdef DEBUG_PEATDEFILE_BRIEF std::cout << "PeakFile::getPreview - getting preview for \"" << m_audioFile->getFilename() << "\"" << endl; @@ -743,7 +743,7 @@ PeakFile::getPreview(const RealTime &startTime, break; default: -#ifdef DEBUG_PEAKFILE_BRIEF +#ifdef DEBUG_PEATDEFILE_BRIEF std::cout << "PeakFile::getPreview - " << "unsupported peak length format (" << m_format << ")" @@ -766,14 +766,14 @@ PeakFile::getPreview(const RealTime &startTime, if (!m_peakCache.length()) { if (scanToPeak(peakNumber) == false) { -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview: scanToPeak(" << peakNumber << ") failed" << std::endl; #endif m_lastPreviewCache.push_back(0.0f); } } -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview: step is " << step << ", format * pointsPerValue * chans is " << (m_format * m_pointsPerValue * m_channels) << std::endl; std::cout << "i = " << i << ", peakNumber = " << peakNumber << ", nextPeakNumber = " << nextPeakNumber << std::endl; #endif @@ -797,14 +797,14 @@ PeakFile::getPreview(const RealTime &startTime, // Problem with the get - probably an EOF // return the results so far. // -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview - \"" << e.getMessage() << "\"\n" << endl; #endif goto done; } -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview - " << "read from file" << std::endl; #endif @@ -820,7 +820,7 @@ PeakFile::getPreview(const RealTime &startTime, // if (charNum + charLength <= m_peakCache.length()) { peakData = m_peakCache.substr(charNum, charLength); -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview - " << "hit peakCache" << std::endl; @@ -835,7 +835,7 @@ PeakFile::getPreview(const RealTime &startTime, // We didn't get the whole peak block - return what // we've got so far // -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "PeakFile::getPreview - " << "failed to get complete peak block" << endl; @@ -852,7 +852,7 @@ PeakFile::getPreview(const RealTime &startTime, inValue -= (1 << (m_format * 8)); } -#ifdef DEBUG_PEAKFILE +#ifdef DEBUG_PEATDEFILE std::cout << "found potential hivalue " << inValue << std::endl; #endif @@ -883,7 +883,7 @@ PeakFile::getPreview(const RealTime &startTime, float value = hiValues[ch] / divisor; -#ifdef DEBUG_PEAKFILE_BRIEF +#ifdef DEBUG_PEATDEFILE_BRIEF std::cout << "VALUE = " << hiValues[ch] / divisor << std::endl; #endif @@ -912,7 +912,7 @@ done: m_lastPreviewWidth = width; m_lastPreviewShowMinima = showMinima; -#ifdef DEBUG_PEAKFILE_BRIEF +#ifdef DEBUG_PEATDEFILE_BRIEF std::cout << "Returning " << m_lastPreviewCache.size() << " items" << std::endl; #endif |