diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
commit | 458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch) | |
tree | 624583f2873febe23770bee3fa94b5c24bd59f4f /src/sound/AudioPlayQueue.cpp | |
parent | 747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff) | |
download | rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip |
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sound/AudioPlayQueue.cpp')
-rw-r--r-- | src/sound/AudioPlayQueue.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/sound/AudioPlayQueue.cpp b/src/sound/AudioPlayQueue.cpp index 2bd07c3..6858328 100644 --- a/src/sound/AudioPlayQueue.cpp +++ b/src/sound/AudioPlayQueue.cpp @@ -25,8 +25,8 @@ #include "PlayableAudioFile.h" #include "Profiler.h" -//#define DEBUG_AUDIO_PLAY_QUEUE 1 -//#define FINE_DEBUG_AUDIO_PLAY_QUEUE 1 +//#define DEBUG_AUDIO_PLAY_TQUEUE 1 +//#define FINE_DEBUG_AUDIO_PLAY_TQUEUE 1 namespace Rosegarden { @@ -94,7 +94,7 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) m_instrumentIndex.push_back(ReverseFileMap()); } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addScheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", slots: " << std::endl; #endif @@ -107,13 +107,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) m_maxBuffers = m_counts[i]; } } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << i << " "; #endif } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << std::endl << "(max buffers now " << m_maxBuffers << ")" << std::endl; #endif @@ -122,13 +122,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) void AudioPlayQueue::addUnscheduled(PlayableAudioFile *file) { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", instrument " << file->getInstrument() << std::endl; #endif m_unscheduled.push_back(file); -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled: now " << m_unscheduled.size() << " unscheduled files" << std::endl; #endif @@ -138,7 +138,7 @@ AudioPlayQueue::addUnscheduled(PlayableAudioFile *file) void AudioPlayQueue::erase(PlayableAudioFile *file) { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::erase(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << std::endl; #endif @@ -195,7 +195,7 @@ AudioPlayQueue::erase(PlayableAudioFile *file) void AudioPlayQueue::clear() { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::clear()" << std::endl; #endif @@ -255,7 +255,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart, f->getStartTime() + f->getDuration() <= sliceStart) continue; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in slot " << i << std::endl; #endif @@ -273,7 +273,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart, } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (playing.size() > 0) { std::cerr << "AudioPlayQueue::getPlayingFiles(" << sliceStart << "," << sliceDuration << "): total " @@ -289,7 +289,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, PlayableAudioFile **playing, size_t &size) const { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE bool printed = false; Profiler profiler("AudioPlayQueue::getPlayingFilesForInstrument", true); #endif @@ -321,7 +321,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, if (f->getInstrument() != instrumentId) continue; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (!printed) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart @@ -334,7 +334,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, if (f->getStartTime() > sliceEnd || f->getEndTime() <= sliceStart) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... rejected " << f << " in slot " << i << std::endl; if (f->getStartTime() > sliceEnd) { std::cerr << "(" << f->getStartTime() << " > " << sliceEnd @@ -348,7 +348,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, continue; } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in slot " << i << " (" << f->getStartTime() << " -> " << f->getEndTime() << ")" << std::endl; @@ -363,7 +363,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, break; // already have it if (written >= size) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "No room to write it!" << std::endl; #endif @@ -382,7 +382,7 @@ unscheduled: PlayableAudioFile *f = *fli; if (f->getInstrument() != instrumentId) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "rejecting unscheduled " << f << " as wrong instrument (" << f->getInstrument() << " != " << instrumentId << ")" << std::endl; #endif @@ -390,7 +390,7 @@ unscheduled: continue; } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (!printed) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart << ", " << sliceDuration << ", " << instrumentId << ")" @@ -402,7 +402,7 @@ unscheduled: if (f->getStartTime() <= sliceEnd && f->getStartTime() + f->getDuration() > sliceStart) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in unscheduled list (" << f->getStartTime() << " -> " << f->getEndTime() << ")" << std::endl; @@ -412,7 +412,7 @@ unscheduled: break; playing[written++] = f; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE } else { @@ -429,7 +429,7 @@ unscheduled: } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (written > 0) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument: total " << written << " files" << std::endl; @@ -442,7 +442,7 @@ unscheduled: bool AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::haveFilesForInstrument(" << instrumentId << ")..."; #endif @@ -450,7 +450,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const if (index < m_instrumentIndex.size() && !m_instrumentIndex[index].empty()) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " yes (scheduled)" << std::endl; #endif @@ -461,7 +461,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const fli != m_unscheduled.end(); ++fli) { PlayableAudioFile *file = *fli; if (file->getInstrument() == instrumentId) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " yes (unscheduled)" << std::endl; #endif @@ -469,7 +469,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " no" << std::endl; #endif @@ -479,7 +479,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const const AudioPlayQueue::FileSet & AudioPlayQueue::getAllScheduledFiles() const { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::getAllScheduledFiles: have " << m_files.size() << " files" << std::endl; #endif @@ -489,7 +489,7 @@ AudioPlayQueue::getAllScheduledFiles() const const AudioPlayQueue::FileList & AudioPlayQueue::getAllUnscheduledFiles() const { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::getAllUnscheduledFiles: have " << m_unscheduled.size() << " files" << std::endl; #endif |