diff options
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/AlsaDriver.cpp | 4 | ||||
-rw-r--r-- | src/sound/AudioPlayQueue.cpp | 54 | ||||
-rw-r--r-- | src/sound/AudioPlayQueue.h | 4 | ||||
-rw-r--r-- | src/sound/Midi.h | 2 | ||||
-rw-r--r-- | src/sound/MidiFile.cpp | 2 | ||||
-rw-r--r-- | src/sound/MidiFile.h | 2 |
6 files changed, 34 insertions, 34 deletions
diff --git a/src/sound/AlsaDriver.cpp b/src/sound/AlsaDriver.cpp index 58d8093..ddd5fd5 100644 --- a/src/sound/AlsaDriver.cpp +++ b/src/sound/AlsaDriver.cpp @@ -2054,8 +2054,8 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position) unsigned char t_sec = (unsigned char) position.sec % 60; unsigned char t_min = (unsigned char) (position.sec / 60) % 60; unsigned char t_hrs = (unsigned char) (position.sec / 3600); -#define STUPID_BROKEN_ETQUIPMENT -#ifdef STUPID_BROKEN_ETQUIPMENT +#define STUPID_BROKEN_EQUIPMENT +#ifdef STUPID_BROKEN_EQUIPMENT // Some recorders assume you are talking in 30fps... unsigned char t_frm = (unsigned char) (position.nsec / 33333333U); unsigned char t_sbf = (unsigned char) ((position.nsec / 333333U) % 100U); diff --git a/src/sound/AudioPlayQueue.cpp b/src/sound/AudioPlayQueue.cpp index 6858328..2bd07c3 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_TQUEUE 1 -//#define FINE_DEBUG_AUDIO_PLAY_TQUEUE 1 +//#define DEBUG_AUDIO_PLAY_QUEUE 1 +//#define FINE_DEBUG_AUDIO_PLAY_QUEUE 1 namespace Rosegarden { @@ -94,7 +94,7 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) m_instrumentIndex.push_back(ReverseFileMap()); } -#ifdef DEBUG_AUDIO_PLAY_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE std::cerr << i << " "; #endif } -#ifdef DEBUG_AUDIO_PLAY_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE std::cerr << "... found " << f << " in slot " << i << std::endl; #endif @@ -273,7 +273,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart, } } -#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE } else { @@ -429,7 +429,7 @@ unscheduled: } } -#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE std::cerr << " yes (unscheduled)" << std::endl; #endif @@ -469,7 +469,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const } } -#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE 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_TQUEUE +#ifdef DEBUG_AUDIO_PLAY_QUEUE std::cerr << "AudioPlayQueue[" << this << "]::getAllUnscheduledFiles: have " << m_unscheduled.size() << " files" << std::endl; #endif diff --git a/src/sound/AudioPlayQueue.h b/src/sound/AudioPlayQueue.h index 0ef0efb..2a7067c 100644 --- a/src/sound/AudioPlayQueue.h +++ b/src/sound/AudioPlayQueue.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef _AUDIO_PLAY_TQUEUE_H_ -#define _AUDIO_PLAY_TQUEUE_H_ +#ifndef _AUDIO_PLAY_QUEUE_H_ +#define _AUDIO_PLAY_QUEUE_H_ #include "RealTime.h" #include "Instrument.h" diff --git a/src/sound/Midi.h b/src/sound/Midi.h index c6d877b..65bfe93 100644 --- a/src/sound/Midi.h +++ b/src/sound/Midi.h @@ -61,7 +61,7 @@ const MidiByte MIDI_SELECT_CHNL_MODE = 0xB0; // system messages const MidiByte MIDI_SYSTEM_EXCLUSIVE = 0xF0; -const MidiByte MIDI_TC_TQUARTER_FRAME = 0xF1; +const MidiByte MIDI_TC_QUARTER_FRAME = 0xF1; const MidiByte MIDI_SONG_POSITION_PTR = 0xF2; const MidiByte MIDI_SONG_SELECT = 0xF3; const MidiByte MIDI_TUNE_REQUEST = 0xF6; diff --git a/src/sound/MidiFile.cpp b/src/sound/MidiFile.cpp index a2a4475..76d5c85 100644 --- a/src/sound/MidiFile.cpp +++ b/src/sound/MidiFile.cpp @@ -464,7 +464,7 @@ MidiFile::parseHeader(const string &midiHeader) m_numberOfTracks = midiBytesToInt(midiHeader.substr(10, 2)); m_timingDivision = midiBytesToInt(midiHeader.substr(12, 2)); - if ( m_format == MIDI_SETQUENTIAL_TRACK_FILE ) { + if ( m_format == MIDI_SEQUENTIAL_TRACK_FILE ) { #ifdef MIDI_DEBUG std::cerr << "MidiFile::parseHeader()" << "- can't load sequential track file" diff --git a/src/sound/MidiFile.h b/src/sound/MidiFile.h index 4134dd3..fdc242e 100644 --- a/src/sound/MidiFile.h +++ b/src/sound/MidiFile.h @@ -73,7 +73,7 @@ public: { MIDI_SINGLE_TRACK_FILE = 0x00, MIDI_SIMULTANEOUS_TRACK_FILE = 0x01, - MIDI_SETQUENTIAL_TRACK_FILE = 0x02, + MIDI_SEQUENTIAL_TRACK_FILE = 0x02, MIDI_CONVERTED_TO_APPLICATION = 0xFE, MIDI_FILE_NOT_LOADED = 0xFF } MIDIFileFormatType; |