diff options
Diffstat (limited to 'src/sound')
33 files changed, 320 insertions, 315 deletions
diff --git a/src/sound/AlsaDriver.cpp b/src/sound/AlsaDriver.cpp index 16a152b..176b90b 100644 --- a/src/sound/AlsaDriver.cpp +++ b/src/sound/AlsaDriver.cpp @@ -223,7 +223,7 @@ AlsaDriver::getSystemInfo() } void -AlsaDriver::showQueueStatus(int queue) +AlsaDriver::showQueuetqStatus(int queue) { int err, idx, min, max; snd_seq_queue_status_t *status; @@ -347,13 +347,13 @@ AlsaDriver::getAutoTimer(bool &wantTimerChecks) { Audit audit; - // Look for the apparent best-choice timer. + // Look for the aptqparent best-choice timer. if (m_timers.empty()) return ""; // The system RTC timer ought to be good, but it doesn't look like - // a very safe choice -- we've seen some system lockups apparently + // a very safe choice -- we've seen some system lockups aptqparently // connected with use of this timer on 2.6 kernels. So we avoid // using that as an auto option. @@ -705,7 +705,7 @@ AlsaDriver::generateInstruments() DeviceId ssiDeviceId = getSpareDeviceId(); - if (m_driverStatus & AUDIO_OK) { + if (m_drivertqStatus & AUDIO_OK) { for (int i = 0; i < count; ++i) { sprintf(number, " #%d", i + 1); std::string name = "Synth plugin" + std::string(number); @@ -743,7 +743,7 @@ AlsaDriver::generateInstruments() DeviceId audioDeviceId = getSpareDeviceId(); - if (m_driverStatus & AUDIO_OK) + if (m_drivertqStatus & AUDIO_OK) { for (int channel = 0; channel < audioCount; ++channel) { sprintf(number, " #%d", channel + 1); @@ -973,11 +973,11 @@ AlsaDriver::createMidiDevice(AlsaPortDescription *port, if (TQString(deviceName).startsWith("Anonymous MIDI device ")) { portName = TQString("out %1") - .arg(m_outputPorts.size() + 1); + .tqarg(m_outputPorts.size() + 1); } else { portName = TQString("out %1 - %2") - .arg(m_outputPorts.size() + 1) - .arg(deviceName); + .tqarg(m_outputPorts.size() + 1) + .tqarg(deviceName); } int outputPort = checkAlsaError(snd_seq_create_simple_port @@ -1154,7 +1154,7 @@ AlsaDriver::renameDevice(DeviceId id, TQString name) snd_seq_get_port_info(m_midiHandle, i->second, pinfo); TQString oldName = snd_seq_port_info_get_name(pinfo); - int sep = oldName.find(" - "); + int sep = oldName.tqfind(" - "); TQString newName; @@ -1168,13 +1168,13 @@ AlsaDriver::renameDevice(DeviceId id, TQString name) newName = oldName.left(sep + 3) + name; } - snd_seq_port_info_set_name(pinfo, newName.data()); + snd_seq_port_info_set_name(pinfo, newName.ascii()); checkAlsaError(snd_seq_set_port_info(m_midiHandle, i->second, pinfo), "renameDevice"); for (unsigned int i = 0; i < m_devices.size(); ++i) { if (m_devices[i]->getId() == id) { - m_devices[i]->setName(newName.data()); + m_devices[i]->setName(newName.ascii()); break; } } @@ -1225,7 +1225,7 @@ AlsaDriver::getConnections(Device::DeviceType type, return count; } -QString +TQString AlsaDriver::getConnection(Device::DeviceType type, MidiDevice::DeviceDirection direction, unsigned int connectionNo) @@ -1253,7 +1253,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection) { ClientPortPair pair( -1, -1); if (connection && connection != "") { - pair = getPortByName(connection.data()); + pair = getPortByName(connection.ascii()); } setConnectionToDevice(device, connection, pair); } @@ -1263,7 +1263,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, const ClientPortPair &pair) { TQString prevConnection = device.getConnection().c_str(); - device.setConnection(connection.data()); + device.setConnection(connection.ascii()); if (device.getDirection() == MidiDevice::Play) { @@ -1272,7 +1272,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, if (j != m_outputPorts.end()) { if (prevConnection != "") { - ClientPortPair prevPair = getPortByName(prevConnection.data()); + ClientPortPair prevPair = getPortByName(prevConnection.ascii()); if (prevPair.first >= 0 && prevPair.second >= 0) { std::cerr << "Disconnecting my port " << j->second << " from " << prevPair.first << ":" << prevPair.second << " on reconnection" << std::endl; @@ -1286,7 +1286,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, for (MappedDeviceList::iterator k = m_devices.begin(); k != m_devices.end(); ++k) { if ((*k)->getId() != device.getId()) { - if ((*k)->getConnection() == prevConnection.data()) { + if ((*k)->getConnection() == prevConnection.ascii()) { foundElsewhere = true; break; } @@ -1323,7 +1323,7 @@ void AlsaDriver::setConnection(DeviceId id, TQString connection) { Audit audit; - ClientPortPair port(getPortByName(connection.data())); + ClientPortPair port(getPortByName(connection.ascii())); if (port.first != -1 && port.second != -1) { @@ -1349,7 +1349,7 @@ void AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) { Audit audit; - ClientPortPair port(getPortByName(idealConnection.data())); + ClientPortPair port(getPortByName(idealConnection.ascii())); audit << "AlsaDriver::setPlausibleConnection: connection like " << idealConnection << " requested for device " << id << std::endl; @@ -1383,20 +1383,20 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) // of the requested string. int client = -1; - int colon = idealConnection.find(":"); + int colon = idealConnection.tqfind(":"); if (colon >= 0) client = idealConnection.left(colon).toInt(); int portNo = -1; if (client > 0) { TQString remainder = idealConnection.mid(colon + 1); - int space = remainder.find(" "); + int space = remainder.tqfind(" "); if (space >= 0) portNo = remainder.left(space).toInt(); } - int firstSpace = idealConnection.find(" "); - int endOfText = idealConnection.find(TQRegExp("[^\\w ]"), firstSpace); + int firstSpace = idealConnection.tqfind(" "); + int endOfText = idealConnection.tqfind(TQRegExp("[^\\w ]"), firstSpace); TQString text; if (endOfText < 2) { @@ -1448,7 +1448,7 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) } if (testName && text != "" && - !TQString(port->m_name.c_str()).contains(text)) + !TQString(port->m_name.c_str()).tqcontains(text)) continue; if (testUsed) { @@ -1507,7 +1507,7 @@ AlsaDriver::checkTimerSync(size_t frames) #ifdef HAVE_LIBJACK if (!m_jackDriver || !m_queueRunning || frames == 0 || - (getMTCStatus() == TRANSPORT_SLAVE)) { + (getMTCtqStatus() == TRANSPORT_SLAVE)) { m_firstTimerCheck = true; return ; } @@ -1587,7 +1587,7 @@ AlsaDriver::getTimers() return m_timers.size() + 1; // one extra for auto } -QString +TQString AlsaDriver::getTimer(unsigned int n) { if (n == 0) @@ -1596,7 +1596,7 @@ AlsaDriver::getTimer(unsigned int n) return m_timers[n -1].name.c_str(); } -QString +TQString AlsaDriver::getCurrentTimer() { return m_currentTimer.c_str(); @@ -1612,7 +1612,7 @@ AlsaDriver::setCurrentTimer(TQString timer) std::cerr << "AlsaDriver::setCurrentTimer(" << timer << ")" << std::endl; - std::string name(timer.data()); + std::string name(timer.ascii()); if (name == AUTO_TIMER_NAME) { name = getAutoTimer(m_doTimerChecks); @@ -1817,7 +1817,7 @@ AlsaDriver::initialiseMidi() // Modify status with MIDI success // - m_driverStatus |= MIDI_OK; + m_drivertqStatus |= MIDI_OK; generateTimerList(); setCurrentTimer(AUTO_TIMER_NAME); @@ -1851,7 +1851,7 @@ AlsaDriver::initialiseAudio() m_jackDriver = new JackDriver(this); if (m_jackDriver->isOK()) { - m_driverStatus |= AUDIO_OK; + m_drivertqStatus |= AUDIO_OK; } else { delete m_jackDriver; m_jackDriver = 0; @@ -1876,19 +1876,19 @@ AlsaDriver::initialisePlayback(const RealTime &position) m_mtcSigmaE = 0; m_mtcSigmaC = 0; - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { sendMMC(127, MIDI_MMC_PLAY, true, ""); m_eat_mtc = 0; } - if (getMTCStatus() == TRANSPORT_MASTER) { + if (getMTCtqStatus() == TRANSPORT_MASTER) { insertMTCFullFrame(position); } // If MIDI Sync is enabled then adjust for the MIDI Clock to // synchronise the sequencer with the clock. // - if (getMIDISyncStatus() == TRANSPORT_MASTER) { + if (getMIDISynctqStatus() == TRANSPORT_MASTER) { // Send the Song Position Pointer for MIDI CLOCK positioning // // Get time from current alsa time to start of alsa timing - @@ -1935,11 +1935,11 @@ AlsaDriver::stopPlayback() std::cerr << "\n\nAlsaDriver - stopPlayback" << std::endl; #endif - if (getMIDISyncStatus() == TRANSPORT_MASTER) { + if (getMIDISynctqStatus() == TRANSPORT_MASTER) { sendSystemDirect(SND_SEQ_EVENT_STOP, NULL); } - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { sendMMC(127, MIDI_MMC_STOP, true, ""); //<VN> need to throw away the next MTC event m_eat_mtc = 3; @@ -1992,7 +1992,7 @@ AlsaDriver::punchOut() #ifdef HAVE_LIBJACK // Close any recording file - if (m_recordStatus == RECORD_ON) { + if (m_recordtqStatus == RECORD_ON) { for (InstrumentSet::const_iterator i = m_recordingInstruments.begin(); i != m_recordingInstruments.end(); ++i) { @@ -2037,8 +2037,8 @@ AlsaDriver::punchOut() // Change recorded state if any set // - if (m_recordStatus == RECORD_ON) - m_recordStatus = RECORD_OFF; + if (m_recordtqStatus == RECORD_ON) + m_recordtqStatus = RECORD_OFF; m_recordingInstruments.clear(); } @@ -2050,12 +2050,12 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position) std::cerr << "\n\nAlsaDriver - resetPlayback(" << oldPosition << "," << position << ")" << std::endl; #endif - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { 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_EQUIPMENT -#ifdef STUPID_BROKEN_EQUIPMENT +#define STUPID_BROKEN_ETQUIPMENT +#ifdef STUPID_BROKEN_ETQUIPMENT // 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); @@ -2135,7 +2135,7 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position) snd_seq_remove_events_set_condition(info, SND_SEQ_REMOVE_OUTPUT); snd_seq_remove_events(m_midiHandle, info); - if (getMTCStatus() == TRANSPORT_MASTER) { + if (getMTCtqStatus() == TRANSPORT_MASTER) { m_mtcFirstTime = -1; m_mtcSigmaE = 0; m_mtcSigmaC = 0; @@ -2718,8 +2718,8 @@ AlsaDriver::getMappedComposition() case SND_SEQ_EVENT_QFRAME: if (fromController) continue; - if (getMTCStatus() == TRANSPORT_SLAVE) { - handleMTCQFrame(event->data.control.value, eventTime); + if (getMTCtqStatus() == TRANSPORT_SLAVE) { + handleMTCTQFrame(event->data.control.value, eventTime); } break; @@ -2733,7 +2733,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_START: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportJump(ExternalTransport::TransportStopAtTime, @@ -2749,7 +2749,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_CONTINUE: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportChange(ExternalTransport::TransportPlay); @@ -2763,7 +2763,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_STOP: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportChange(ExternalTransport::TransportStop); @@ -2819,7 +2819,7 @@ AlsaDriver::getMappedComposition() } } - if (getMTCStatus() == TRANSPORT_SLAVE && isPlaying()) { + if (getMTCtqStatus() == TRANSPORT_SLAVE && isPlaying()) { #ifdef MTC_DEBUG std::cerr << "seq time is " << getSequencerTime() << ", last MTC receive " << m_mtcLastReceive << ", first time " << m_mtcFirstTime << std::endl; @@ -2844,9 +2844,9 @@ AlsaDriver::getMappedComposition() static int lock_count = 0; void -AlsaDriver::handleMTCQFrame(unsigned int data_byte, RealTime the_time) +AlsaDriver::handleMTCTQFrame(unsigned int data_byte, RealTime the_time) { - if (getMTCStatus() != TRANSPORT_SLAVE) + if (getMTCtqStatus() != TRANSPORT_SLAVE) return ; switch (data_byte & 0xF0) { @@ -3059,7 +3059,7 @@ AlsaDriver::insertMTCFullFrame(RealTime time) } void -AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) +AlsaDriver::insertMTCTQFrames(RealTime sliceStart, RealTime sliceEnd) { if (sliceStart == RealTime::zeroTime && sliceEnd == RealTime::zeroTime) { // not a real slice @@ -3073,7 +3073,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) #ifdef MTC_DEBUG - std::cout << "AlsaDriver::insertMTCQFrames(" << sliceStart << "," + std::cout << "AlsaDriver::insertMTCTQFrames(" << sliceStart << "," << sliceEnd << "): first time " << m_mtcFirstTime << std::endl; #endif @@ -3147,7 +3147,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) snd_seq_ev_schedule_real(&event, m_queue, 0, &atime); checkAlsaError(snd_seq_event_output(m_midiHandle, &event), - "insertMTCQFrames sending qframe event"); + "insertMTCTQFrames sending qframe event"); if (++type == 8) { m_mtcFrames += 2; @@ -3172,7 +3172,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) bool AlsaDriver::testForMTCSysex(const snd_seq_event_t *event) { - if (getMTCStatus() != TRANSPORT_SLAVE) + if (getMTCtqStatus() != TRANSPORT_SLAVE) return false; // At this point, and possibly for the foreseeable future, the only @@ -3344,7 +3344,7 @@ AlsaDriver::tweakSkewForMTC(int factor) bool AlsaDriver::testForMMCSysex(const snd_seq_event_t *event) { - if (getMMCStatus() != TRANSPORT_SLAVE) + if (getMMCtqStatus() != TRANSPORT_SLAVE) return false; if (event->data.ext.len != 6) @@ -3764,8 +3764,8 @@ AlsaDriver::processMidiOut(const MappedComposition &mC, processNotesOff(sliceEnd - m_playStartPosition + m_alsaPlayStartTime, now); - if (getMTCStatus() == TRANSPORT_MASTER) { - insertMTCQFrames(sliceStart, sliceEnd); + if (getMTCtqStatus() == TRANSPORT_MASTER) { + insertMTCTQFrames(sliceStart, sliceEnd); } if (m_queueRunning) { @@ -4009,7 +4009,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, // we're really rolling. m_playing = true; - if (getMTCStatus() == TRANSPORT_SLAVE) { + if (getMTCtqStatus() == TRANSPORT_SLAVE) { tweakSkewForMTC(0); } } @@ -4155,7 +4155,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_OFF); + setMIDISynctqStatus(TRANSPORT_OFF); break; case 1: @@ -4167,7 +4167,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_MASTER); + setMIDISynctqStatus(TRANSPORT_MASTER); break; case 2: @@ -4179,7 +4179,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_SLAVE); + setMIDISynctqStatus(TRANSPORT_SLAVE); break; } } @@ -4274,7 +4274,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_MASTER); + setMMCtqStatus(TRANSPORT_MASTER); break; case 2: @@ -4285,7 +4285,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_SLAVE); + setMMCtqStatus(TRANSPORT_SLAVE); break; case 0: @@ -4297,7 +4297,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_OFF); + setMMCtqStatus(TRANSPORT_OFF); break; } } @@ -4312,7 +4312,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_MASTER); + setMTCtqStatus(TRANSPORT_MASTER); tweakSkewForMTC(0); m_mtcFirstTime = -1; break; @@ -4325,7 +4325,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_SLAVE); + setMTCtqStatus(TRANSPORT_SLAVE); m_mtcFirstTime = -1; break; @@ -4338,7 +4338,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_OFF); + setMTCtqStatus(TRANSPORT_OFF); m_mtcFirstTime = -1; break; } @@ -4477,15 +4477,15 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, } bool -AlsaDriver::record(RecordStatus recordStatus, +AlsaDriver::record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments, const std::vector<TQString> *audioFileNames) { m_recordingInstruments.clear(); - if (recordStatus == RECORD_ON) { + if (recordtqStatus == RECORD_ON) { // start recording - m_recordStatus = RECORD_ON; + m_recordtqStatus = RECORD_ON; m_alsaRecordStartTime = RealTime::zeroTime; unsigned int audioCount = 0; @@ -4516,13 +4516,13 @@ AlsaDriver::record(RecordStatus recordStatus, #ifdef HAVE_LIBJACK if (m_jackDriver && - m_jackDriver->openRecordFile(id, fileName.data())) { + m_jackDriver->openRecordFile(id, fileName.ascii())) { good = true; } #endif if (!good) { - m_recordStatus = RECORD_OFF; + m_recordtqStatus = RECORD_OFF; std::cerr << "AlsaDriver::record: No JACK driver, or JACK driver failed to prepare for recording audio" << std::endl; return false; } @@ -4532,8 +4532,8 @@ AlsaDriver::record(RecordStatus recordStatus, } } } else - if (recordStatus == RECORD_OFF) { - m_recordStatus = RECORD_OFF; + if (recordtqStatus == RECORD_OFF) { + m_recordtqStatus = RECORD_OFF; } #ifdef DEBUG_ALSA else { @@ -5254,7 +5254,7 @@ AlsaDriver::scavengePlugins() } -QString +TQString AlsaDriver::getStatusLog() { return TQString::fromUtf8(Audit::getAudit().c_str()); diff --git a/src/sound/AlsaDriver.h b/src/sound/AlsaDriver.h index 973fc72..a7c83ee 100644 --- a/src/sound/AlsaDriver.h +++ b/src/sound/AlsaDriver.h @@ -68,7 +68,7 @@ public: virtual MappedComposition *getMappedComposition(); - virtual bool record(RecordStatus recordStatus, + virtual bool record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<TQString> *audioFileNames = 0); @@ -105,7 +105,7 @@ public: // Some stuff to help us debug this // void getSystemInfo(); - void showQueueStatus(int queue); + void showQueuetqStatus(int queue); // Process pending // @@ -290,7 +290,7 @@ public: // Create and enqueue a batch of MTC quarter-frame events // - void insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd); + void insertMTCTQFrames(RealTime sliceStart, RealTime sliceEnd); // Create and enqueue an MTC full-frame system exclusive event // @@ -298,7 +298,7 @@ public: // Parse and accept an incoming MTC quarter-frame event // - void handleMTCQFrame(unsigned int data_byte, RealTime the_time); + void handleMTCTQFrame(unsigned int data_byte, RealTime the_time); // Check whether the given event is an MTC sysex we need to act on // (and if so act on it) diff --git a/src/sound/AudioFile.cpp b/src/sound/AudioFile.cpp index 9af3ce6..d8bed6c 100644 --- a/src/sound/AudioFile.cpp +++ b/src/sound/AudioFile.cpp @@ -61,7 +61,7 @@ AudioFile::~AudioFile() delete m_fileInfo; } -QDateTime +TQDateTime AudioFile::getModificationDateTime() { if (m_fileInfo) diff --git a/src/sound/AudioFileManager.cpp b/src/sound/AudioFileManager.cpp index 46525c4..cc919f0 100644 --- a/src/sound/AudioFileManager.cpp +++ b/src/sound/AudioFileManager.cpp @@ -537,8 +537,8 @@ AudioFileManager::createRecordingAudioFile() while (fileName == "") { fileName = TQString("rg-%1-%2.wav") - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; @@ -550,7 +550,7 @@ AudioFileManager::createRecordingAudioFile() WAVAudioFile *aF = 0; try { - aF = new WAVAudioFile(newId, fileName.data(), m_audioPath + fileName.data()); + aF = new WAVAudioFile(newId, fileName.ascii(), (m_audioPath.c_str() + fileName).ascii()); m_audioFiles.push_back(aF); m_recordedAudioFiles.insert(aF); } catch (SoundFile::BadSoundFileException e) { @@ -622,10 +622,10 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, while (fileName == "") { fileName = TQString("%1-%2-%3-%4.wav") - .arg(prefix) - .arg(sourceBase) - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(prefix) + .tqarg(sourceBase.c_str()) + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; @@ -638,8 +638,8 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, try { aF = new WAVAudioFile(newId, - fileName.data(), - m_audioPath + fileName.data()); + fileName.ascii(), + (m_audioPath.c_str() + fileName).ascii()); m_audioFiles.push_back(aF); m_derivedAudioFiles.insert(aF); } catch (SoundFile::BadSoundFileException e) { @@ -653,22 +653,22 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, AudioFileId AudioFileManager::importURL(const KURL &url, int sampleRate) { - if (url.isLocalFile()) return importFile(url.path(), sampleRate); + if (url.isLocalFile()) return importFile(url.path().ascii(), sampleRate); std::cerr << "AudioFileManager::importURL("<< url.prettyURL() << ", " << sampleRate << ")" << std::endl; - emit setOperationName(i18n("Downloading file %1").arg(url.prettyURL())); + emit setOperationName(i18n("Downloading file %1").tqarg(url.prettyURL())); TQString localPath = ""; if (!KIO::NetAccess::download(url, localPath)) { - KMessageBox::error(0, i18n("Cannot download file %1").arg(url.prettyURL())); - throw SoundFile::BadSoundFileException(url.prettyURL()); + KMessageBox::error(0, i18n("Cannot download file %1").tqarg(url.prettyURL())); + throw SoundFile::BadSoundFileException(url.prettyURL().ascii()); } AudioFileId id = 0; try { - id = importFile(localPath.data(), sampleRate); + id = importFile(localPath.ascii(), sampleRate); } catch (BadAudioPathException ape) { KIO::NetAccess::removeTempFile(localPath); throw ape; @@ -688,7 +688,7 @@ AudioFileManager::fileNeedsConversion(const std::string &fileName, *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << TQString("%1").arg(sampleRate); + *proc << TQString("%1").tqarg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -715,7 +715,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << TQString("%1").arg(sampleRate); + *proc << TQString("%1").tqarg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -753,9 +753,9 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) while (targetName == "") { targetName = TQString("conv-%2-%3-%4.wav") - .arg(sourceBase) - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(sourceBase) + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + targetName).exists()) { targetName = ""; @@ -768,7 +768,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *m_importProcess << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *m_importProcess << "-r"; - *m_importProcess << TQString("%1").arg(sampleRate); + *m_importProcess << TQString("%1").tqarg(sampleRate); } *m_importProcess << "-c"; *m_importProcess << fileName.c_str(); @@ -777,7 +777,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) m_importProcess->start(KProcess::NotifyOnExit, KProcess::NoCommunication); while (m_importProcess->isRunning()) { - kapp->processEvents(100); + kapp->tqprocessEvents(100); } if (!m_importProcess->normalExit()) { @@ -791,7 +791,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) if (es) { std::cerr << "audio file importer failed" << std::endl; - throw SoundFile::BadSoundFileException(fileName, i18n("Failed to convert or resample audio file on import")); + throw SoundFile::BadSoundFileException(fileName, i18n("Failed to convert or resample audio file on import").ascii()); } else { std::cerr << "audio file importer succeeded" << std::endl; } @@ -800,8 +800,8 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) WAVAudioFile *aF = 0; aF = new WAVAudioFile(newId, - targetName.data(), - m_audioPath + targetName.data()); + targetName.ascii(), + (m_audioPath.c_str() + targetName).ascii()); m_audioFiles.push_back(aF); m_derivedAudioFiles.insert(aF); // Don't catch SoundFile::BadSoundFileException diff --git a/src/sound/AudioFileManager.h b/src/sound/AudioFileManager.h index 67ae6c6..8bc4535 100644 --- a/src/sound/AudioFileManager.h +++ b/src/sound/AudioFileManager.h @@ -61,6 +61,7 @@ typedef std::vector<AudioFile*>::const_iterator AudioFileManagerIterator; class AudioFileManager : public TQObject, public XmlExportable { Q_OBJECT + TQ_OBJECT public: AudioFileManager(); virtual ~AudioFileManager(); diff --git a/src/sound/AudioFileTimeStretcher.h b/src/sound/AudioFileTimeStretcher.h index f2de00c..0654b59 100644 --- a/src/sound/AudioFileTimeStretcher.h +++ b/src/sound/AudioFileTimeStretcher.h @@ -33,9 +33,10 @@ namespace Rosegarden { class AudioFileManager; -class AudioFileTimeStretcher : public QObject +class AudioFileTimeStretcher : public TQObject { Q_OBJECT + TQ_OBJECT public: AudioFileTimeStretcher(AudioFileManager *mgr); 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 diff --git a/src/sound/AudioPlayQueue.h b/src/sound/AudioPlayQueue.h index 2a7067c..0ef0efb 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_QUEUE_H_ -#define _AUDIO_PLAY_QUEUE_H_ +#ifndef _AUDIO_PLAY_TQUEUE_H_ +#define _AUDIO_PLAY_TQUEUE_H_ #include "RealTime.h" #include "Instrument.h" diff --git a/src/sound/AudioProcess.cpp b/src/sound/AudioProcess.cpp index 1fb5a61..c209703 100644 --- a/src/sound/AudioProcess.cpp +++ b/src/sound/AudioProcess.cpp @@ -1084,7 +1084,7 @@ AudioInstrumentMixer::setPluginBypass(InstrumentId id, int position, bool bypass instance->setBypassed(bypass); } -QStringList +TQStringList AudioInstrumentMixer::getPluginPrograms(InstrumentId id, int position) { // Not RT safe @@ -1096,7 +1096,7 @@ AudioInstrumentMixer::getPluginPrograms(InstrumentId id, int position) return programs; } -QString +TQString AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position) { // Not RT safe @@ -1108,7 +1108,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position) return program; } -QString +TQString AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, int bank, int program) { @@ -1143,7 +1143,7 @@ AudioInstrumentMixer::setPluginProgram(InstrumentId id, int position, TQString p instance->selectProgram(program); } -QString +TQString AudioInstrumentMixer::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { // Not RT safe @@ -2337,7 +2337,7 @@ AudioFileWriter::closeRecordFile(InstrumentId id, AudioFileId &returnedId) return false; returnedId = m_files[id].first->getId(); - m_files[id].second->setStatus(RecordableAudioFile::DEFUNCT); + m_files[id].second->settqStatus(RecordableAudioFile::DEFUNCT); #ifdef DEBUG_WRITER @@ -2364,7 +2364,7 @@ AudioFileWriter::haveRecordFileOpen(InstrumentId id) } return (m_files[id].first && - (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT)); + (m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)); } bool @@ -2377,7 +2377,7 @@ AudioFileWriter::haveRecordFilesOpen() for (InstrumentId id = instrumentBase; id < instrumentBase + instrumentCount; ++id) { if (m_files[id].first && - (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT)) { + (m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)) { #ifdef DEBUG_WRITER std::cerr << "AudioFileWriter::haveRecordFilesOpen: found open record file for instrument " << id << std::endl; #endif @@ -2410,7 +2410,7 @@ AudioFileWriter::kick(bool wantLock) RecordableAudioFile *raf = m_files[id].second; - if (raf->getStatus() == RecordableAudioFile::DEFUNCT) { + if (raf->gettqStatus() == RecordableAudioFile::DEFUNCT) { #ifdef DEBUG_WRITER std::cerr << "AudioFileWriter::kick: found defunct file on instrument " << id << std::endl; diff --git a/src/sound/AudioTimeStretcher.cpp b/src/sound/AudioTimeStretcher.cpp index 392693e..fcb87e6 100644 --- a/src/sound/AudioTimeStretcher.cpp +++ b/src/sound/AudioTimeStretcher.cpp @@ -4,7 +4,7 @@ Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. - This file copyright 2006 Chris Cannam and QMUL. + This file copyright 2006 Chris Cannam and TQMUL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/sound/AudioTimeStretcher.h b/src/sound/AudioTimeStretcher.h index c5d0170..96fc54c 100644 --- a/src/sound/AudioTimeStretcher.h +++ b/src/sound/AudioTimeStretcher.h @@ -28,7 +28,7 @@ Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. - This file copyright 2006 Chris Cannam and QMUL. + This file copyright 2006 Chris Cannam and TQMUL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -159,7 +159,7 @@ protected: /** * Resynthesise from m_freq[channel] adding in to "out", * adjusting phases on the basis of a prior step size of lastStep. - * Also add the window shape in to the modulation array (if + * Also add the window tqshape in to the modulation array (if * present) -- for use in ensuring the output has the correct * magnitude afterwards. */ diff --git a/src/sound/DSSIPluginFactory.cpp b/src/sound/DSSIPluginFactory.cpp index 42df247..60f7720 100644 --- a/src/sound/DSSIPluginFactory.cpp +++ b/src/sound/DSSIPluginFactory.cpp @@ -67,14 +67,14 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(TQString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").tqarg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); list.push_back((ddesc->run_synth || ddesc->run_multiple_synths) ? "true" : "false"); list.push_back(ddesc->run_multiple_synths ? "true" : "false"); list.push_back(m_taxonomy[descriptor->UniqueID]); - list.push_back(TQString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").tqarg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -90,13 +90,13 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(TQString("%1").arg(p)); + list.push_back(TQString("%1").tqarg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(TQString("%1").arg(type)); - list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").tqarg(type)); + list.push_back(TQString("%1").tqarg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortDefault(descriptor, p))); } } @@ -296,7 +296,7 @@ DSSIPluginFactory::getLRDFPath(TQString &baseUri) void DSSIPluginFactory::discoverPlugins(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); + void *libraryHandle = dlopen(soName.ascii(), RTLD_LAZY); if (!libraryHandle) { std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't dlopen " diff --git a/src/sound/DSSIPluginInstance.cpp b/src/sound/DSSIPluginInstance.cpp index 30b9256..9f71629 100644 --- a/src/sound/DSSIPluginInstance.cpp +++ b/src/sound/DSSIPluginInstance.cpp @@ -451,7 +451,7 @@ DSSIPluginInstance::checkProgramCache() ProgramDescriptor d; d.bank = programDescriptor->Bank; d.program = programDescriptor->Program; - d.name = TQString("%1. %2").arg(index).arg(programDescriptor->Name); + d.name = TQString("%1. %2").tqarg(index).tqarg(programDescriptor->Name); m_cachedPrograms.push_back(d); } @@ -462,7 +462,7 @@ DSSIPluginInstance::checkProgramCache() m_programCacheValid = true; } -QStringList +TQStringList DSSIPluginInstance::getPrograms() { #ifdef DEBUG_DSSI @@ -484,7 +484,7 @@ DSSIPluginInstance::getPrograms() return programs; } -QString +TQString DSSIPluginInstance::getProgram(int bank, int program) { #ifdef DEBUG_DSSI @@ -531,7 +531,7 @@ DSSIPluginInstance::getProgram(TQString name) return 0; } -QString +TQString DSSIPluginInstance::getCurrentProgram() { return m_program; @@ -765,7 +765,7 @@ DSSIPluginInstance::getPortValue(unsigned int portNumber) return 0.0; } -QString +TQString DSSIPluginInstance::configure(TQString key, TQString value) { @@ -787,7 +787,7 @@ DSSIPluginInstance::configure(TQString key, std::cerr << "DSSIPluginInstance::configure(" << key << "," << value << ")" << std::endl; #endif - char *message = m_descriptor->configure(m_instanceHandle, key.data(), value.data()); + char *message = m_descriptor->configure(m_instanceHandle, key.ascii(), value.ascii()); m_programCacheValid = false; diff --git a/src/sound/DummyDriver.h b/src/sound/DummyDriver.h index d60c7c0..5cb5cad 100644 --- a/src/sound/DummyDriver.h +++ b/src/sound/DummyDriver.h @@ -60,7 +60,7 @@ public: // Activate a recording state // - virtual bool record(RecordStatus /*recordStatus*/, + virtual bool record(RecordtqStatus /*recordtqStatus*/, const std::vector<InstrumentId> */*armedInstruments = 0*/, const std::vector<TQString> */*audioFileNames = 0*/) { return false; } diff --git a/src/sound/JackDriver.cpp b/src/sound/JackDriver.cpp index b9a7205..ecd6739 100644 --- a/src/sound/JackDriver.cpp +++ b/src/sound/JackDriver.cpp @@ -1383,7 +1383,7 @@ JackDriver::jackProcessRecord(InstrumentId id, float gain = AudioLevel::dB_to_multiplier(level); - if (m_alsaDriver->getRecordStatus() == RECORD_ON && + if (m_alsaDriver->getRecordtqStatus() == RECORD_ON && clocksRunning && m_fileWriter->haveRecordFileOpen(id)) { @@ -2368,7 +2368,7 @@ JackDriver::setPluginInstanceBypass(InstrumentId id, int position, bool value) m_instrumentMixer->setPluginBypass(id, position, value); } -QStringList +TQStringList JackDriver::getPluginInstancePrograms(InstrumentId id, int position) { if (m_instrumentMixer) @@ -2376,7 +2376,7 @@ JackDriver::getPluginInstancePrograms(InstrumentId id, int position) return TQStringList(); } -QString +TQString JackDriver::getPluginInstanceProgram(InstrumentId id, int position) { if (m_instrumentMixer) @@ -2384,7 +2384,7 @@ JackDriver::getPluginInstanceProgram(InstrumentId id, int position) return TQString(); } -QString +TQString JackDriver::getPluginInstanceProgram(InstrumentId id, int position, int bank, int program) { @@ -2408,7 +2408,7 @@ JackDriver::setPluginInstanceProgram(InstrumentId id, int position, TQString pro m_instrumentMixer->setPluginProgram(id, position, program); } -QString +TQString JackDriver::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { if (m_instrumentMixer) diff --git a/src/sound/LADSPAPluginFactory.cpp b/src/sound/LADSPAPluginFactory.cpp index 5ec25ef..9daa431 100644 --- a/src/sound/LADSPAPluginFactory.cpp +++ b/src/sound/LADSPAPluginFactory.cpp @@ -81,7 +81,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(TQString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").tqarg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); @@ -104,7 +104,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) } - list.push_back(TQString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").tqarg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -120,13 +120,13 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(TQString("%1").arg(p)); + list.push_back(TQString("%1").tqarg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(TQString("%1").arg(type)); - list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").tqarg(type)); + list.push_back(TQString("%1").tqarg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortDefault(descriptor, p))); } } @@ -507,7 +507,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier) void LADSPAPluginFactory::loadLibrary(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_NOW); + void *libraryHandle = dlopen(soName.ascii(), RTLD_NOW); if (libraryHandle) m_libraryHandles[soName] = libraryHandle; } @@ -644,7 +644,7 @@ LADSPAPluginFactory::discoverPlugins() for (size_t i = 0; i < lrdfPaths.size(); ++i) { TQDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); for (unsigned int j = 0; j < dir.count(); ++j) { - if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) { + if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).ascii())) { // std::cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << std::endl; haveSomething = true; } @@ -664,7 +664,7 @@ LADSPAPluginFactory::discoverPlugins() TQDir pluginDir(*i, "*.so"); for (unsigned int j = 0; j < pluginDir.count(); ++j) { - discoverPlugins(TQString("%1/%2").arg(*i).arg(pluginDir[j])); + discoverPlugins(TQString("%1/%2").tqarg(*i).tqarg(pluginDir[j])); } } @@ -680,7 +680,7 @@ LADSPAPluginFactory::discoverPlugins() void LADSPAPluginFactory::discoverPlugins(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); + void *libraryHandle = dlopen(soName.ascii(), RTLD_LAZY); if (!libraryHandle) { std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't dlopen " @@ -770,9 +770,9 @@ LADSPAPluginFactory::generateFallbackCategories() std::vector<TQString> path; for (size_t i = 0; i < pluginPath.size(); ++i) { - if (pluginPath[i].contains("/lib/")) { + if (pluginPath[i].tqcontains("/lib/")) { TQString p(pluginPath[i]); - p.replace("/lib/", "/share/"); + p.tqreplace("/lib/", "/share/"); path.push_back(p); // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl; } @@ -813,7 +813,7 @@ void LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base) { #ifdef HAVE_LIBLRDF - lrdf_uris *uris = lrdf_get_instances(uri.data()); + lrdf_uris *uris = lrdf_get_instances(uri.ascii()); if (uris != NULL) { for (int i = 0; i < uris->count; ++i) { @@ -822,7 +822,7 @@ LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base) lrdf_free_uris(uris); } - uris = lrdf_get_subclasses(uri.data()); + uris = lrdf_get_subclasses(uri.ascii()); if (uris != NULL) { for (int i = 0; i < uris->count; ++i) { diff --git a/src/sound/MappedCommon.h b/src/sound/MappedCommon.h index 0a793bc..28fd8c4 100644 --- a/src/sound/MappedCommon.h +++ b/src/sound/MappedCommon.h @@ -39,7 +39,7 @@ typedef TQString MappedObjectProperty; typedef float MappedObjectValue; // typedef TQValueVector<MappedObjectProperty> MappedObjectPropertyList; -// replaced with a std::vector<> for Qt2 compatibility +// replaced with a std::vector<> for TQt2 compatibility typedef std::vector<MappedObjectId> MappedObjectIdList; typedef std::vector<MappedObjectProperty> MappedObjectPropertyList; diff --git a/src/sound/MappedDevice.cpp b/src/sound/MappedDevice.cpp index e5a9dd8..bc7fd39 100644 --- a/src/sound/MappedDevice.cpp +++ b/src/sound/MappedDevice.cpp @@ -137,8 +137,8 @@ operator>>(TQDataStream &dS, MappedDevice *mD) dS >> recording; mD->setId(id); mD->setType(Device::DeviceType(dType)); - mD->setName(std::string(name.data())); - mD->setConnection(connection.data()); + mD->setName(std::string(name.ascii())); + mD->setConnection(connection.ascii()); mD->setDirection(MidiDevice::DeviceDirection(direction)); mD->setRecording((bool)recording); @@ -182,8 +182,8 @@ operator>>(TQDataStream &dS, MappedDevice &mD) dS >> recording; mD.setId(id); mD.setType(Device::DeviceType(dType)); - mD.setName(std::string(name.data())); - mD.setConnection(connection.data()); + mD.setName(std::string(name.ascii())); + mD.setConnection(connection.ascii()); mD.setDirection(MidiDevice::DeviceDirection(direction)); mD.setRecording((bool)recording); diff --git a/src/sound/MappedEvent.cpp b/src/sound/MappedEvent.cpp index 4bae51e..2eb6382 100644 --- a/src/sound/MappedEvent.cpp +++ b/src/sound/MappedEvent.cpp @@ -390,7 +390,7 @@ protected: }; DataBlockFile::DataBlockFile(DataBlockRepository::blockid id) - : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").arg(id)), + : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").tqarg(id)), m_file(m_fileName), m_cleared(false) { diff --git a/src/sound/MappedInstrument.cpp b/src/sound/MappedInstrument.cpp index a3c366f..626fd35 100644 --- a/src/sound/MappedInstrument.cpp +++ b/src/sound/MappedInstrument.cpp @@ -90,7 +90,7 @@ operator>>(TQDataStream &dS, MappedInstrument *mI) mI->setType(Instrument::InstrumentType(type)); mI->setChannel(MidiByte(channel)); mI->setId(InstrumentId(id)); - mI->setName(std::string(name.data())); + mI->setName(std::string(name.ascii())); mI->setDevice(DeviceId(device)); mI->setAudioChannels(audioChannels); @@ -113,7 +113,7 @@ operator>>(TQDataStream &dS, MappedInstrument &mI) mI.setType(Instrument::InstrumentType(type)); mI.setChannel(MidiByte(channel)); mI.setId(InstrumentId(id)); - mI.setName(std::string(name.data())); + mI.setName(std::string(name.ascii())); mI.setDevice(DeviceId(device)); mI.setAudioChannels(audioChannels); diff --git a/src/sound/MappedStudio.cpp b/src/sound/MappedStudio.cpp index b72550b..3d9dbb8 100644 --- a/src/sound/MappedStudio.cpp +++ b/src/sound/MappedStudio.cpp @@ -59,17 +59,17 @@ static inline void releaseLock(const char *file, int line) #define GET_LOCK getLock(__FILE__,__LINE__) #define RELEASE_LOCK releaseLock(__FILE__,__LINE__) -// These stream functions are stolen and adapted from Qt3 tqvaluevector.h +// These stream functions are stolen and adapted from TQt3 tqvaluevector.h // // ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. // TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectId t; s >> t; v[i] = t; @@ -79,7 +79,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectIdList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -89,10 +89,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectProperty t; s >> t; v[i] = t; @@ -102,7 +102,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectPropertyList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -112,10 +112,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectValue t; s >> t; v[i] = t; @@ -125,7 +125,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectValueList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectValueList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -185,21 +185,21 @@ const MappedObjectProperty MappedPluginPort::Value = "value"; void MappedObject::addChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) if ((*it) == object) return ; - m_children.push_back(object); + m_tqchildren.push_back(object); } void MappedObject::removeChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it) == object) { - m_children.erase(it); + m_tqchildren.erase(it); return ; } } @@ -211,9 +211,9 @@ MappedObjectPropertyList MappedObject::getChildren() { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) - list.push_back(TQString("%1").arg((*it)->getId())); + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) + list.push_back(TQString("%1").tqarg((*it)->getId())); return list; } @@ -225,10 +225,10 @@ MappedObjectPropertyList MappedObject::getChildren(MappedObjectType type) { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it)->getType() == type) - list.push_back(TQString("%1").arg((*it)->getId())); + list.push_back(TQString("%1").tqarg((*it)->getId())); } return list; @@ -244,16 +244,16 @@ MappedObject::destroyChildren() // see note in destroy() below - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) (*it)->destroy(); // remove from studio and destroy } // Destroy this object and remove it from the studio and -// do the same for all its children. +// do the same for all its tqchildren. // void MappedObject::destroy() @@ -265,17 +265,17 @@ MappedObject::destroy() MappedStudio *studio = dynamic_cast<MappedStudio*>(studioObject); // The destroy method on each child calls studio->clearObject, - // which calls back on the parent (in this case us) to remove the + // which calls back on the tqparent (in this case us) to remove the // child. (That's necessary for the case of destroying a plugin, // where we need to remove it from its plugin manager -- etc.) So - // we don't want to be iterating over m_children here, as it will + // we don't want to be iterating over m_tqchildren here, as it will // change from under us. - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) { + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) { (*it)->destroy(); } @@ -387,7 +387,7 @@ MappedStudio::createObject(MappedObjectType type, } else if (type == MappedObject::PluginPort) { mO = new MappedPluginPort(this, id); - // reset the port's parent after creation outside this method + // reset the port's tqparent after creation outside this method } // Insert @@ -597,11 +597,11 @@ MappedStudio::clearObject(MappedObjectId id) MappedObjectCategory::iterator j = i->second.find(id); if (j != i->second.end()) { - // if the object has a parent other than the studio, - // persuade that parent to abandon it - MappedObject *parent = j->second->getParent(); - if (parent && !dynamic_cast<MappedStudio *>(parent)) { - parent->removeChild(j->second); + // if the object has a tqparent other than the studio, + // persuade that tqparent to abandon it + MappedObject *tqparent = j->second->getParent(); + if (tqparent && !dynamic_cast<MappedStudio *>(tqparent)) { + tqparent->removeChild(j->second); } i->second.erase(j); @@ -776,11 +776,11 @@ MappedStudio::getAudioInput(int inputNumber) // -------------- MappedConnectableObject ----------------- // // -MappedConnectableObject::MappedConnectableObject(MappedObject *parent, +MappedConnectableObject::MappedConnectableObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id): - MappedObject(parent, + MappedObject(tqparent, name, type, id) @@ -842,10 +842,10 @@ MappedConnectableObject::getConnections(ConnectionDirection dir) // ------------ MappedAudioFader ---------------- // -MappedAudioFader::MappedAudioFader(MappedObject *parent, +MappedAudioFader::MappedAudioFader(MappedObject *tqparent, MappedObjectId id, MappedObjectValue channels): - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioFader", AudioFader, id), @@ -875,30 +875,30 @@ MappedAudioFader::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == MappedObject::Instrument) { - list.push_back(MappedObjectProperty("%1").arg(m_instrumentId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_instrumentId)); } else if (property == MappedAudioFader::FaderLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedAudioFader::FaderRecordLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_recordLevel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_recordLevel)); } else if (property == MappedAudioFader::Channels) { - list.push_back(MappedObjectProperty("%1").arg(m_channels)); + list.push_back(MappedObjectProperty("%1").tqarg(m_channels)); } else if (property == MappedAudioFader::InputChannel) { - list.push_back(MappedObjectProperty("%1").arg(m_inputChannel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputChannel)); } else if (property == MappedAudioFader::Pan) { - list.push_back(MappedObjectProperty("%1").arg(m_pan)); + list.push_back(MappedObjectProperty("%1").tqarg(m_pan)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -987,9 +987,9 @@ MappedAudioFader::setProperty(const MappedObjectProperty &property, // ---------------- MappedAudioBuss ------------------- // // -MappedAudioBuss::MappedAudioBuss(MappedObject *parent, +MappedAudioBuss::MappedAudioBuss(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioBuss", AudioBuss, id), @@ -1013,22 +1013,22 @@ MappedAudioBuss::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == BussId) { - list.push_back(MappedObjectProperty("%1").arg(m_bussId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_bussId)); } else if (property == Level) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -1133,9 +1133,9 @@ MappedAudioBuss::getInstruments() // ---------------- MappedAudioInput ------------------- // // -MappedAudioInput::MappedAudioInput(MappedObject *parent, +MappedAudioInput::MappedAudioInput(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioInput", AudioInput, id) @@ -1152,7 +1152,7 @@ MappedAudioInput::getPropertyList(const MappedObjectProperty &property) if (property == "") { list.push_back(MappedAudioInput::InputNumber); } else if (property == InputNumber) { - list.push_back(MappedObjectProperty("%1").arg(m_inputNumber)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputNumber)); } return list; @@ -1191,8 +1191,8 @@ MappedAudioInput::setProperty(const MappedObjectProperty &property, } -MappedPluginSlot::MappedPluginSlot(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginSlot", PluginSlot, id) +MappedPluginSlot::MappedPluginSlot(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginSlot", PluginSlot, id) { #ifdef DEBUG_MAPPEDSTUDIO std::cerr << "MappedPluginSlot::MappedPluginSlot: id = " << id << std::endl; @@ -1322,7 +1322,7 @@ MappedPluginSlot::getProperty(const MappedObjectProperty &property, return true; } -QString +TQString MappedPluginSlot::getProgram(int bank, int program) { MappedStudio *studio = @@ -1548,8 +1548,8 @@ MappedPluginSlot::getPort(unsigned long portNumber) } -MappedPluginPort::MappedPluginPort(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginPort", PluginPort, id) +MappedPluginPort::MappedPluginPort(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginPort", PluginPort, id) {} MappedPluginPort::~MappedPluginPort() diff --git a/src/sound/MappedStudio.h b/src/sound/MappedStudio.h index 89acc9b..e7fa4f9 100644 --- a/src/sound/MappedStudio.h +++ b/src/sound/MappedStudio.h @@ -71,14 +71,14 @@ public: } MappedObjectType; - MappedObject(MappedObject *parent, + MappedObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id): m_type(type), m_id(id), m_name(name), - m_parent(parent) {;} + m_tqparent(tqparent) {;} virtual ~MappedObject() {;} @@ -116,9 +116,9 @@ public: // Ownership // - MappedObject* getParent() { return m_parent; } - const MappedObject* getParent() const { return m_parent; } - void setParent(MappedObject *parent) { m_parent = parent; } + MappedObject* getParent() { return m_tqparent; } + const MappedObject* getParent() const { return m_tqparent; } + void setParent(MappedObject *tqparent) { m_tqparent = tqparent; } // Get a list of child ids - get a list of a certain type // @@ -135,7 +135,7 @@ public: void destroy(); void destroyChildren(); - std::vector<MappedObject*> getChildObjects() { return m_children; } + std::vector<MappedObject*> getChildObjects() { return m_tqchildren; } protected: @@ -143,8 +143,8 @@ protected: MappedObjectId m_id; std::string m_name; - MappedObject *m_parent; - std::vector<MappedObject*> m_children; + MappedObject *m_tqparent; + std::vector<MappedObject*> m_tqchildren; }; @@ -261,7 +261,7 @@ private: MappedObjectId m_runningObjectId; // All of our mapped (virtual) studio resides in this container as - // well as having all their parent/child relationships. Because + // well as having all their tqparent/child relationships. Because // some things are just blobs with no connections we need to // maintain both - don't forget about this. // @@ -298,7 +298,7 @@ public: Out } ConnectionDirection; - MappedConnectableObject(MappedObject *parent, + MappedConnectableObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id); @@ -335,7 +335,7 @@ public: static const MappedObjectProperty Pan; static const MappedObjectProperty InputChannel; - MappedAudioFader(MappedObject *parent, + MappedAudioFader(MappedObject *tqparent, MappedObjectId id, MappedObjectValue channels = 2); // stereo default ~MappedAudioFader(); @@ -385,7 +385,7 @@ public: static const MappedObjectProperty Pan; static const MappedObjectProperty Level; - MappedAudioBuss(MappedObject *parent, + MappedAudioBuss(MappedObject *tqparent, MappedObjectId id); ~MappedAudioBuss(); @@ -418,7 +418,7 @@ public: static const MappedObjectProperty InputNumber; - MappedAudioInput(MappedObject *parent, + MappedAudioInput(MappedObject *tqparent, MappedObjectId id); ~MappedAudioInput(); @@ -455,7 +455,7 @@ public: static const MappedObjectProperty Bypassed; static const MappedObjectProperty Configuration; // list property - MappedPluginSlot(MappedObject *parent, MappedObjectId id); + MappedPluginSlot(MappedObject *tqparent, MappedObjectId id); ~MappedPluginSlot(); virtual MappedObjectPropertyList getPropertyList( @@ -513,7 +513,7 @@ public: static const MappedObjectProperty DisplayHint; static const MappedObjectProperty Value; - MappedPluginPort(MappedObject *parent, MappedObjectId id); + MappedPluginPort(MappedObject *tqparent, MappedObjectId id); ~MappedPluginPort(); virtual MappedObjectPropertyList getPropertyList( diff --git a/src/sound/Midi.h b/src/sound/Midi.h index 65bfe93..c6d877b 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_QUARTER_FRAME = 0xF1; +const MidiByte MIDI_TC_TQUARTER_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 76d5c85..4e97455 100644 --- a/src/sound/MidiFile.cpp +++ b/src/sound/MidiFile.cpp @@ -171,7 +171,7 @@ MidiFile::getMidiByte(ifstream* midiFile) emit setProgress((int)(double(midiFile->tellg()) / double(m_fileSize) * 20.0)); - kapp->processEvents(50); + kapp->tqprocessEvents(50); } return (MidiByte)byte; @@ -249,7 +249,7 @@ MidiFile::getMidiBytes(ifstream* midiFile, unsigned long numberOfBytes) if (bytesGot % 2000 == 0) { emit setProgress((int)(double(midiFile->tellg()) / double(m_fileSize) * 20.0)); - kapp->processEvents(50); + kapp->tqprocessEvents(50); } return stringRet; @@ -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_SEQUENTIAL_TRACK_FILE ) { + if ( m_format == MIDI_SETQUENTIAL_TRACK_FILE ) { #ifdef MIDI_DEBUG std::cerr << "MidiFile::parseHeader()" << "- can't load sequential track file" @@ -503,7 +503,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) unsigned long accumulatedTime = 0; // The trackNum passed in to this method is the default track for - // all events provided they're all on the same channel. If we find + // all events provided they're all on the same channel. If we tqfind // events on more than one channel, we increment trackNum and record // the mapping from channel to trackNum in this channelTrackMap. // We then return the new trackNum by reference so the calling @@ -524,7 +524,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) TrackId metaTrack = lastTrackNum; // Remember the last non-meta status byte (-1 if we haven't seen one) - int runningStatus = -1; + int runningtqStatus = -1; bool firstTrack = true; @@ -550,11 +550,11 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) midiByte = getMidiByte(midiFile); if (!(midiByte & MIDI_STATUS_BYTE_MASK)) { - if (runningStatus < 0) { + if (runningtqStatus < 0) { throw (Exception("Running status used for first event in track")); } - eventCode = (MidiByte)runningStatus; + eventCode = (MidiByte)runningtqStatus; data1 = midiByte; #ifdef MIDI_DEBUG @@ -603,7 +603,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) } else // the rest { - runningStatus = eventCode; + runningtqStatus = eventCode; MidiEvent *midiEvent; @@ -842,7 +842,7 @@ MidiFile::convertToRosegarden(Composition &composition, ConversionType type) // split over these tracks emit setProgress(20 + (int)((80.0 * double(i) / double(m_numberOfTracks)))); - kapp->processEvents(50); + kapp->tqprocessEvents(50); // Convert the deltaTime to an absolute time since // the start of the segment. The addTime method @@ -2120,7 +2120,7 @@ MidiFile::writeTrack(std::ofstream* midiFile, TrackId trackNumber) if (progressCount % 500 == 0) { emit setProgress(progressCount * 100 / progressTotal); - kapp->processEvents(500); + kapp->tqprocessEvents(500); } } diff --git a/src/sound/MidiFile.h b/src/sound/MidiFile.h index 7efeb28..7cbbb6f 100644 --- a/src/sound/MidiFile.h +++ b/src/sound/MidiFile.h @@ -38,7 +38,7 @@ // from MIDI Files. Despite the fact you can reuse this // object it's probably safer just to create it for a // single way conversion and then throw it away (MIDI -// to Composition conversion invalidates the internal +// to Composition conversion tqinvalidates the internal // MIDI model). // // Derived from SoundFile but still had some features @@ -66,13 +66,14 @@ class Studio; class MidiFile : public TQObject, public SoundFile { Q_OBJECT + TQ_OBJECT public: typedef enum { MIDI_SINGLE_TRACK_FILE = 0x00, MIDI_SIMULTANEOUS_TRACK_FILE = 0x01, - MIDI_SEQUENTIAL_TRACK_FILE = 0x02, + MIDI_SETQUENTIAL_TRACK_FILE = 0x02, MIDI_CONVERTED_TO_APPLICATION = 0xFE, MIDI_FILE_NOT_LOADED = 0xFF } MIDIFileFormatType; diff --git a/src/sound/PeakFile.cpp b/src/sound/PeakFile.cpp index 3c306db..aebd7c7 100644 --- a/src/sound/PeakFile.cpp +++ b/src/sound/PeakFile.cpp @@ -146,7 +146,7 @@ PeakFile::parseHeader() m_numberOfPeaks = getIntegerFromLittleEndian(header.substr(28, 4)); m_positionPeakOfPeaks = getIntegerFromLittleEndian(header.substr(32, 4)); - // Read in date string and convert it up to QDateTime + // Read in date string and convert it up to TQDateTime // TQString dateString = TQString(header.substr(40, 28).c_str()); @@ -286,7 +286,7 @@ PeakFile::close() // Set modification time to now // - m_modificationTime = m_modificationTime.currentDateTime(); + m_modificationTime = m_modificationTime.tqcurrentDateTime(); TQString fDate; fDate.sprintf("%04d:%02d:%02d:%02d:%02d:%02d:%03d", @@ -298,7 +298,7 @@ PeakFile::close() m_modificationTime.time().second(), m_modificationTime.time().msec()); - std::string dateString(fDate.data()); + std::string dateString(fDate.ascii()); // Pad with spaces to make up to 28 bytes long and output // diff --git a/src/sound/PeakFile.h b/src/sound/PeakFile.h index ce1aeac..5b4fc1e 100644 --- a/src/sound/PeakFile.h +++ b/src/sound/PeakFile.h @@ -54,6 +54,7 @@ typedef std::pair<RealTime, RealTime> SplitPointPair; class PeakFile : public TQObject, public SoundFile { Q_OBJECT + TQ_OBJECT public: PeakFile(AudioFile *audioFile); diff --git a/src/sound/PeakFileManager.h b/src/sound/PeakFileManager.h index 40e6d95..26ced4d 100644 --- a/src/sound/PeakFileManager.h +++ b/src/sound/PeakFileManager.h @@ -46,9 +46,10 @@ namespace Rosegarden class AudioFile; class RealTime; -class PeakFileManager : public QObject +class PeakFileManager : public TQObject { Q_OBJECT + TQ_OBJECT public: // updatePercentage tells this object how often to throw a // percentage complete message - active between 0-100 only diff --git a/src/sound/PluginIdentifier.cpp b/src/sound/PluginIdentifier.cpp index bd2f96c..a22598c 100644 --- a/src/sound/PluginIdentifier.cpp +++ b/src/sound/PluginIdentifier.cpp @@ -25,7 +25,7 @@ namespace Rosegarden { -QString +TQString PluginIdentifier::createIdentifier(TQString type, TQString soName, TQString label) @@ -65,7 +65,7 @@ PluginIdentifier::areIdentifiersSimilar(TQString id1, TQString id2) // The prefix of this key is also used as a literal in base/AudioPluginInstance.C. // If you change one, change the other. // Better still, don't change one. -QString +TQString PluginIdentifier::RESERVED_PROJECT_DIRECTORY_KEY = "__ROSEGARDEN__:__RESERVED__:ProjectDirectoryKey"; } diff --git a/src/sound/RIFFAudioFile.cpp b/src/sound/RIFFAudioFile.cpp index c34435f..823ee4f 100644 --- a/src/sound/RIFFAudioFile.cpp +++ b/src/sound/RIFFAudioFile.cpp @@ -154,7 +154,7 @@ RIFFAudioFile::scanTo(std::ifstream *file, const RealTime &time) if (file == 0) return false; - // whatever we do here we invalidate the read buffer + // whatever we do here we tqinvalidate the read buffer // m_loseBuffer = true; diff --git a/src/sound/RecordableAudioFile.h b/src/sound/RecordableAudioFile.h index 06df6f0..886b07c 100644 --- a/src/sound/RecordableAudioFile.h +++ b/src/sound/RecordableAudioFile.h @@ -44,21 +44,21 @@ public: IDLE, RECORDING, DEFUNCT - } RecordStatus; + } RecordtqStatus; RecordableAudioFile(AudioFile *audioFile, // should be already open for writing size_t bufferSize); ~RecordableAudioFile(); - void setStatus(const RecordStatus &status) { m_status = status; } - RecordStatus getStatus() const { return m_status; } + void settqStatus(const RecordtqStatus &status) { m_status = status; } + RecordtqStatus gettqStatus() const { return m_status; } size_t buffer(const sample_t *data, int channel, size_t frames); void write(); protected: AudioFile *m_audioFile; - RecordStatus m_status; + RecordtqStatus m_status; std::vector<RingBuffer<sample_t> *> m_ringBuffers; // one per channel }; diff --git a/src/sound/SoundDriver.cpp b/src/sound/SoundDriver.cpp index aab641c..f09de3b 100644 --- a/src/sound/SoundDriver.cpp +++ b/src/sound/SoundDriver.cpp @@ -40,12 +40,12 @@ namespace Rosegarden SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name): m_name(name), - m_driverStatus(NO_DRIVER), + m_drivertqStatus(NO_DRIVER), m_playStartPosition(0, 0), m_startPlayback(false), m_playing(false), m_midiRecordDevice(0), - m_recordStatus(RECORD_OFF), + m_recordtqStatus(RECORD_OFF), m_midiRunningId(MidiInstrumentBase), m_audioRunningId(AudioInstrumentBase), // m_audioQueueScavenger(4, 50), @@ -55,8 +55,8 @@ SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name): m_studio(studio), m_sequencerDataBlock(0), m_externalTransport(0), - m_mmcStatus(TRANSPORT_OFF), - m_mtcStatus(TRANSPORT_OFF), + m_mmctqStatus(TRANSPORT_OFF), + m_mtctqStatus(TRANSPORT_OFF), m_mmcId(0), // default MMC id of 0 m_midiClockEnabled(false), m_midiClockInterval(0, 0), diff --git a/src/sound/SoundDriver.h b/src/sound/SoundDriver.h index 74bd966..ee6f9da 100644 --- a/src/sound/SoundDriver.h +++ b/src/sound/SoundDriver.h @@ -54,10 +54,10 @@ typedef enum { RECORD_OFF, RECORD_ON, -} RecordStatus; +} RecordtqStatus; -// Status of a SoundDriver - whether we're got an audio and +// tqStatus of a SoundDriver - whether we're got an audio and // MIDI subsystem or not. This is reported right up to the // gui. // @@ -67,7 +67,7 @@ typedef enum AUDIO_OK = 0x01, // AUDIO's OK MIDI_OK = 0x02, // MIDI's OK VERSION_OK = 0x04 // GUI and sequencer versions match -} SoundDriverStatus; +} SoundDrivertqStatus; // Used for MMC and MTC, not for JACK transport @@ -77,7 +77,7 @@ typedef enum TRANSPORT_OFF, TRANSPORT_MASTER, TRANSPORT_SLAVE -} TransportSyncStatus; +} TransportSynctqStatus; // The NoteOffQueue holds a time ordered set of @@ -179,7 +179,7 @@ public: // Activate a recording state. armedInstruments and audioFileNames // can be NULL if no audio tracks recording. // - virtual bool record(RecordStatus recordStatus, + virtual bool record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<TQString> *audioFileNames = 0) = 0; @@ -269,7 +269,7 @@ public: // Return the current status of the driver // - unsigned int getStatus() const { return m_driverStatus; } + unsigned int gettqStatus() const { return m_drivertqStatus; } // Are we playing? // @@ -281,7 +281,7 @@ public: virtual bool areClocksRunning() const = 0; RealTime getStartPosition() const { return m_playStartPosition; } - RecordStatus getRecordStatus() const { return m_recordStatus; } + RecordtqStatus getRecordtqStatus() const { return m_recordtqStatus; } // Return a MappedDevice full of the Instrument mappings // that the driver has discovered. The gui can then use @@ -385,18 +385,18 @@ public: // MIDI Realtime Sync setting // - TransportSyncStatus getMIDISyncStatus() const { return m_midiSyncStatus; } - void setMIDISyncStatus(TransportSyncStatus status) { m_midiSyncStatus = status; } + TransportSynctqStatus getMIDISynctqStatus() const { return m_midiSynctqStatus; } + void setMIDISynctqStatus(TransportSynctqStatus status) { m_midiSynctqStatus = status; } // MMC master/slave setting // - TransportSyncStatus getMMCStatus() const { return m_mmcStatus; } - void setMMCStatus(TransportSyncStatus status) { m_mmcStatus = status; } + TransportSynctqStatus getMMCtqStatus() const { return m_mmctqStatus; } + void setMMCtqStatus(TransportSynctqStatus status) { m_mmctqStatus = status; } // MTC master/slave setting // - TransportSyncStatus getMTCStatus() const { return m_mtcStatus; } - void setMTCStatus(TransportSyncStatus status) { m_mtcStatus = status; } + TransportSynctqStatus getMTCtqStatus() const { return m_mtctqStatus; } + void setMTCtqStatus(TransportSynctqStatus status) { m_mtctqStatus = status; } // MMC Id // @@ -446,7 +446,7 @@ protected: AudioFile* getAudioFile(unsigned int id); std::string m_name; - unsigned int m_driverStatus; + unsigned int m_drivertqStatus; RealTime m_playStartPosition; bool m_startPlayback; bool m_playing; @@ -470,7 +470,7 @@ protected: MappedComposition m_recordComposition; MappedComposition m_returnComposition; - RecordStatus m_recordStatus; + RecordtqStatus m_recordtqStatus; InstrumentId m_midiRunningId; @@ -506,9 +506,9 @@ protected: // MMC and MTC status and ID // - TransportSyncStatus m_midiSyncStatus; - TransportSyncStatus m_mmcStatus; - TransportSyncStatus m_mtcStatus; + TransportSynctqStatus m_midiSynctqStatus; + TransportSynctqStatus m_mmctqStatus; + TransportSynctqStatus m_mtctqStatus; MidiByte m_mmcId; // device id // MIDI clock interval |