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 | |
parent | efe74e7dc33cd566621f814946f589ec37a2d242 (diff) | |
download | rosegarden-4da01909a890b0053eb0dd068a6e483e75a94204.tar.gz rosegarden-4da01909a890b0053eb0dd068a6e483e75a94204.zip |
Rename a few build variables for overall consistency
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/PeakFile.cpp | 52 | ||||
-rw-r--r-- | src/sound/PeakFile.h | 6 | ||||
-rw-r--r-- | src/sound/PeakFileManager.cpp | 14 | ||||
-rw-r--r-- | src/sound/PeakFileManager.h | 6 |
4 files changed, 39 insertions, 39 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 diff --git a/src/sound/PeakFile.h b/src/sound/PeakFile.h index 86ecc56..00260fb 100644 --- a/src/sound/PeakFile.h +++ b/src/sound/PeakFile.h @@ -26,8 +26,8 @@ #include "SoundFile.h" #include "RealTime.h" -#ifndef _PEAKFILE_H_ -#define _PEAKFILE_H_ +#ifndef _PEATDEFILE_H_ +#define _PEATDEFILE_H_ // A PeakFile is generated to the BWF Supplement 3 Peak Envelope Chunk // format as defined here: @@ -192,6 +192,6 @@ protected: } -#endif // _PEAKFILE_H_ +#endif // _PEATDEFILE_H_ diff --git a/src/sound/PeakFileManager.cpp b/src/sound/PeakFileManager.cpp index e860e00..0469f85 100644 --- a/src/sound/PeakFileManager.cpp +++ b/src/sound/PeakFileManager.cpp @@ -132,7 +132,7 @@ PeakFileManager::hasValidPeaks(AudioFile *audioFile) PeakFile *peakFile = getPeakFile(audioFile); if (peakFile == 0) { -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER std::cerr << "PeakFileManager::hasValidPeaks - no peak file found" << std::endl; #endif @@ -150,7 +150,7 @@ PeakFileManager::hasValidPeaks(AudioFile *audioFile) } else if (audioFile->getType() == BWF) { // check internal peak chunk } else { -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER std::cout << "PeakFileManager::hasValidPeaks - unsupported file type" << std::endl; #endif @@ -170,7 +170,7 @@ void PeakFileManager::generatePeaks(AudioFile *audioFile, unsigned short updatePercentage) { -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER std::cout << "PeakFileManager::generatePeaks - generating peaks for \"" << audioFile->getFilename() << "\"" << std::endl; #endif @@ -199,7 +199,7 @@ PeakFileManager::generatePeaks(AudioFile *audioFile, } else if (audioFile->getType() == BWF) { // write the file out and incorporate the peak chunk } else { -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER std::cerr << "PeakFileManager::generatePeaks - unsupported file type" << std::endl; #endif @@ -237,7 +237,7 @@ PeakFileManager::getPreview(AudioFile *audioFile, width, showMinima); } catch (SoundFile::BadSoundFileException e) { -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER std::cout << "PeakFileManager::getPreview " << "\"" << e << "\"" << std::endl; #else @@ -250,7 +250,7 @@ PeakFileManager::getPreview(AudioFile *audioFile, } else if (audioFile->getType() == BWF) { // write the file out and incorporate the peak chunk } -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER else { std::cerr << "PeakFileManager::getPreview - unsupported file type" << std::endl; @@ -306,7 +306,7 @@ PeakFileManager::stopPreview() TQFile file(fileName); bool removed = file.remove(); -#ifdef DEBUG_PEAKFILEMANAGER +#ifdef DEBUG_PEATDEFILEMANAGER if (removed) { std::cout << "PeakFileManager::stopPreview() - removed preview" diff --git a/src/sound/PeakFileManager.h b/src/sound/PeakFileManager.h index f608bc8..b909495 100644 --- a/src/sound/PeakFileManager.h +++ b/src/sound/PeakFileManager.h @@ -27,8 +27,8 @@ // // -#ifndef _PEAKFILEMANAGER_H_ -#define _PEAKFILEMANAGER_H_ +#ifndef _PEATDEFILEMANAGER_H_ +#define _PEATDEFILEMANAGER_H_ #include <string> #include <iostream> @@ -158,6 +158,6 @@ protected: } -#endif // _PEAKFILEMANAGER_H_ +#endif // _PEATDEFILEMANAGER_H_ |