diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-07 23:40:10 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-07 23:40:10 +0000 |
commit | c856c3c44f488b137dd3b76f81b2d4b9c5444b73 (patch) | |
tree | 88a64ae28e48d4f71396d329b0d1c797b31accc3 /muse2/synti/simpledrums2 | |
parent | 1e2c10156202d4b50df409a1930adc3f151e44dc (diff) |
Converted all latin1() instances. Ported Qt3 methods to Qt4.
Diffstat (limited to 'muse2/synti/simpledrums2')
-rw-r--r-- | muse2/synti/simpledrums2/simpledrums.cpp | 32 | ||||
-rw-r--r-- | muse2/synti/simpledrums2/simpledrumsgui.cpp | 10 | ||||
-rw-r--r-- | muse2/synti/simpledrums2/ssplugin.cpp | 14 | ||||
-rw-r--r-- | muse2/synti/simpledrums2/ssplugingui.cpp | 2 |
4 files changed, 29 insertions, 29 deletions
diff --git a/muse2/synti/simpledrums2/simpledrums.cpp b/muse2/synti/simpledrums2/simpledrums.cpp index 6ae7797f..13f1d3e2 100644 --- a/muse2/synti/simpledrums2/simpledrums.cpp +++ b/muse2/synti/simpledrums2/simpledrums.cpp @@ -139,36 +139,36 @@ SimpleSynth::SimpleSynth(int sr) QString c6 = "Channel " + QString::number(ch + 1) + " fx send 2"; QString c7 = "Channel " + QString::number(ch + 1) + " fx send 3"; QString c8 = "Channel " + QString::number(ch + 1) + " fx send 4"; - controllers[i].name = c1.toLatin1().data(); + controllers[i].name = c1.toLatin1().constData(); controllers[i].num = CTRL_NRPN14_OFFSET+i; controllers[i].min = 0; controllers[i].max = 127; - controllers[i+1].name = c2.toLatin1().data(); + controllers[i+1].name = c2.toLatin1().constData(); controllers[i+1].num = CTRL_NRPN14_OFFSET+i+1; controllers[i+1].min = 0; controllers[i+1].max = 127; - controllers[i+2].name = c3.toLatin1().data(); + controllers[i+2].name = c3.toLatin1().constData(); controllers[i+2].num = CTRL_NRPN14_OFFSET+i+2; controllers[i+2].min = 0; controllers[i+2].max = 1; - controllers[i+3].name = c4.toLatin1().data(); + controllers[i+3].name = c4.toLatin1().constData(); controllers[i+3].num = CTRL_NRPN14_OFFSET+i+3; controllers[i+3].min = 0; controllers[i+3].max = 1; - controllers[i+4].name = c5.toLatin1().data(); + controllers[i+4].name = c5.toLatin1().constData(); controllers[i+4].num = CTRL_NRPN14_OFFSET+i+4; - controllers[i+5].name = c6.toLatin1().data(); + controllers[i+5].name = c6.toLatin1().constData(); controllers[i+5].num = CTRL_NRPN14_OFFSET+i+5; - controllers[i+6].name = c7.toLatin1().data(); + controllers[i+6].name = c7.toLatin1().constData(); controllers[i+6].num = CTRL_NRPN14_OFFSET+i+6; - controllers[i+7].name = c8.toLatin1().data(); + controllers[i+7].name = c8.toLatin1().constData(); controllers[i+7].num = CTRL_NRPN14_OFFSET+i+7; controllers[i+4].min = controllers[i+5].min = controllers[i+6].min = controllers[i+7].min = 0; @@ -180,12 +180,12 @@ SimpleSynth::SimpleSynth(int sr) for (int sfx=0; sfx<SS_NR_OF_SENDEFFECTS; sfx++) { QString c1 = "Sendfx " + QString::number(sfx) + " ret gain"; QString c2 = "Sendfx " + QString::number(sfx) + " on/off"; - controllers[i].name = c1.toLatin1().data(); + controllers[i].name = c1.toLatin1().constData(); controllers[i].num = CTRL_NRPN14_OFFSET+i; controllers[i].min = 0; controllers[i].max = 127; - controllers[i+1].name = c2.toLatin1().data(); + controllers[i+1].name = c2.toLatin1().constData(); controllers[i+1].num = CTRL_NRPN14_OFFSET+i+1; controllers[i+1].min = 0; controllers[i+1].max = 1; @@ -532,7 +532,7 @@ bool SimpleSynth::sysex(int /*len*/, const unsigned char* data) QString lib = (const char*) (data + 2); QString label = (const char*) (data + lib.length() + 3); if (SS_DEBUG_MIDI) { - printf("Sysex cmd load effect: %d %s %s\n", fxid, lib.toLatin1().data(), label.toLatin1().data()); + printf("Sysex cmd load effect: %d %s %s\n", fxid, lib.toLatin1().constData(), label.toLatin1().constData()); } initSendEffect(fxid, lib, label); break; @@ -964,7 +964,7 @@ void SimpleSynth::getInitData(int* n, const unsigned char** data) if (sendEffects[j].plugin) { int labelnamelen = sendEffects[j].plugin->label().size() + 1; buffer[i] = labelnamelen; - memcpy((buffer+i+1), sendEffects[j].plugin->label().toLatin1().data(), labelnamelen); + memcpy((buffer+i+1), sendEffects[j].plugin->label().toLatin1().constData(), labelnamelen); if (SS_DEBUG_INIT) { printf("buffer[%d] - labelnamelen: %d\n", i, labelnamelen); printf("buffer[%d] - buffer[%d] - filename: ", (i+1), (i+1) + labelnamelen - 1); @@ -978,7 +978,7 @@ void SimpleSynth::getInitData(int* n, const unsigned char** data) int namelen = sendEffects[j].plugin->lib().size() + 1; buffer[i] = namelen; - memcpy((buffer+i+1), sendEffects[j].plugin->lib().toLatin1().data(), namelen); + memcpy((buffer+i+1), sendEffects[j].plugin->lib().toLatin1().constData(), namelen); if (SS_DEBUG_INIT) { printf("buffer[%d] - libnamelen : %d\n", i, namelen); printf("buffer[%d] - buffer[%d] - filename: ", (i+1), (i+1) + namelen - 1); @@ -1524,7 +1524,7 @@ bool SimpleSynth::initSendEffect(int id, QString lib, QString name) sendEffects[id].outputs = plugin->outports(); if (plugin->instantiate()) { - SS_DBG2("Plugin instantiated", name.toLatin1().data()); + SS_DBG2("Plugin instantiated", name.toLatin1().constData()); SS_DBG_I("Parameters", plugin->parameter()); SS_DBG_I("No of inputs", plugin->inports()); SS_DBG_I("No of outputs",plugin->outports()); @@ -1583,7 +1583,7 @@ bool SimpleSynth::initSendEffect(int id, QString lib, QString name) if (!success) { QString errorString = "Error loading plugin \"" + plugin->label() + "\""; - guiSendError(errorString.toLatin1().data()); + guiSendError(errorString.toLatin1().constData()); } return success; SS_TRACE_OUT @@ -1609,7 +1609,7 @@ void SimpleSynth::cleanupPlugin(int id) SS_TRACE_IN LadspaPlugin* plugin = sendEffects[id].plugin; plugin->stop(); - SS_DBG2("Stopped fx", plugin->label().toLatin1().data()); + SS_DBG2("Stopped fx", plugin->label().toLatin1().constData()); sendEffects[id].nrofparameters = 0; sendEffects[id].state = SS_SENDFX_OFF; sendEffects[id].plugin = 0; diff --git a/muse2/synti/simpledrums2/simpledrumsgui.cpp b/muse2/synti/simpledrums2/simpledrumsgui.cpp index 79194eed..f90c1da8 100644 --- a/muse2/synti/simpledrums2/simpledrumsgui.cpp +++ b/muse2/synti/simpledrums2/simpledrumsgui.cpp @@ -509,7 +509,7 @@ void SimpleSynthGui::processEvent(const MidiPlayEvent& ev) QString filename = (const char*) (data+2); sampleNameLineEdit[ch]->setText(filename.section('/',-1,-1)); if (SS_DEBUG_MIDI) { - printf("SimpleSynthGui - sample %s loaded OK on channel: %d\n", filename.toLatin1().data(), ch); + printf("SimpleSynthGui - sample %s loaded OK on channel: %d\n", filename.toLatin1().constData(), ch); } if (!onOff[ch]->isChecked()) { onOff[ch]->blockSignals(true); @@ -709,7 +709,7 @@ void SimpleSynthGui::loadSampleDialogue(int channel) lastDir = fi.path(); if (SS_DEBUG) - printf("lastDir = %s\n", lastDir.toLatin1().data()); + printf("lastDir = %s\n", lastDir.toLatin1().constData()); int l = filename.length() + 4; byte d[l]; @@ -717,7 +717,7 @@ void SimpleSynthGui::loadSampleDialogue(int channel) d[0] = SS_SYSEX_LOAD_SAMPLE; d[1] = (byte) channel; d[2] = (byte) filename.length(); - memcpy(d+3, filename.toLatin1().data(), filename.length()+1); + memcpy(d+3, filename.toLatin1().constData(), filename.length()+1); sendSysex(d, l); } } @@ -755,8 +755,8 @@ void SimpleSynthGui::loadEffectInvoked(int fxid, QString lib, QString label) byte d[l]; d[0] = SS_SYSEX_LOAD_SENDEFFECT; d[1] = (byte) fxid; - memcpy (d+2, lib.toLatin1().data(), lib.length()+1); - memcpy (d+3+lib.length(), label.toLatin1().data(), label.length()+1); + memcpy (d+2, lib.toLatin1().constData(), lib.length()+1); + memcpy (d+3+lib.length(), label.toLatin1().constData(), label.length()+1); sendSysex(d, l); } diff --git a/muse2/synti/simpledrums2/ssplugin.cpp b/muse2/synti/simpledrums2/ssplugin.cpp index 7e8986e7..28639a39 100644 --- a/muse2/synti/simpledrums2/ssplugin.cpp +++ b/muse2/synti/simpledrums2/ssplugin.cpp @@ -34,7 +34,7 @@ static void loadPluginLib(QFileInfo* fi) { SS_TRACE_IN if (SS_DEBUG_LADSPA) { - printf("loadPluginLib: %s\n", fi->fileName().toLatin1().data()); + printf("loadPluginLib: %s\n", fi->fileName().toLatin1().constData()); } void* handle = dlopen(fi->filePath().toAscii().data(), RTLD_NOW); if (handle == 0) { @@ -158,7 +158,7 @@ LadspaPlugin::LadspaPlugin(const QFileInfo* f, } /*if (SS_DEBUG_LADSPA) { - printf("Label: %s\tLib: %s\tPortCount: %d\n", this->label().toLatin1().data(), this->lib().toLatin1().data(), plugin->PortCount); + printf("Label: %s\tLib: %s\tPortCount: %d\n", this->label().toLatin1().constData(), this->lib().toLatin1().constData(), plugin->PortCount); printf("LADSPA_PORT_CONTROL|LADSPA_PORT_INPUT: %d\t", pIdx.size()); printf("Input ports: %d\t", iIdx.size()); printf("Output ports: %d\n\n", oIdx.size()); @@ -181,7 +181,7 @@ LadspaPlugin::~LadspaPlugin() stop(); } if (handle) { - SS_DBG_LADSPA2("Cleaning up ", this->label().toLatin1().data()); + SS_DBG_LADSPA2("Cleaning up ", this->label().toLatin1().constData()); plugin->cleanup(handle); } @@ -205,7 +205,7 @@ bool LadspaPlugin::instantiate() handle = plugin->instantiate(plugin, SS_samplerate); success = (handle != NULL); if (success) - SS_DBG_LADSPA2("Plugin instantiated", label().toLatin1().data()); + SS_DBG_LADSPA2("Plugin instantiated", label().toLatin1().constData()); return success; } @@ -254,9 +254,9 @@ void LadspaPlugin::stop() { SS_TRACE_IN if (handle) { - SS_DBG_LADSPA2("Trying to stop plugin", label().toLatin1().data()); + SS_DBG_LADSPA2("Trying to stop plugin", label().toLatin1().constData()); if (plugin->deactivate) { - SS_DBG_LADSPA2("Deactivating ", label().toLatin1().data()); + SS_DBG_LADSPA2("Deactivating ", label().toLatin1().constData()); plugin->deactivate(handle); active = false; } @@ -354,7 +354,7 @@ Plugin* PluginList::find(const QString& file, const QString& name) return *i; } } - printf("Plugin <%s> not found\n", name.toLatin1().data()); + printf("Plugin <%s> not found\n", name.toLatin1().constData()); SS_TRACE_OUT return 0; } diff --git a/muse2/synti/simpledrums2/ssplugingui.cpp b/muse2/synti/simpledrums2/ssplugingui.cpp index da74bd56..ff17255e 100644 --- a/muse2/synti/simpledrums2/ssplugingui.cpp +++ b/muse2/synti/simpledrums2/ssplugingui.cpp @@ -266,7 +266,7 @@ void SS_PluginFront::loadButton() pluginChooser->exec(); if ((pluginChooser->result() == QDialog::Accepted) && pluginChooser->getSelectedPlugin()) { Plugin* p = pluginChooser->getSelectedPlugin(); - //printf("Selected plugin: %s\n", pluginChooser->getSelectedPlugin()->name().toLatin1().data()); + //printf("Selected plugin: %s\n", pluginChooser->getSelectedPlugin()->name().toLatin1().constData()); emit loadPlugin(fxid, p->lib(), p->label()); } SS_TRACE_OUT |