summaryrefslogtreecommitdiff
path: root/muse2/muse/driver
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-07 23:40:10 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-07 23:40:10 +0000
commitc856c3c44f488b137dd3b76f81b2d4b9c5444b73 (patch)
tree88a64ae28e48d4f71396d329b0d1c797b31accc3 /muse2/muse/driver
parent1e2c10156202d4b50df409a1930adc3f151e44dc (diff)
Converted all latin1() instances. Ported Qt3 methods to Qt4.
Diffstat (limited to 'muse2/muse/driver')
-rw-r--r--muse2/muse/driver/alsamidi.cpp26
-rw-r--r--muse2/muse/driver/jack.cpp30
-rw-r--r--muse2/muse/driver/jackmidi.cpp124
3 files changed, 90 insertions, 90 deletions
diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp
index 3b15fc6f..4426279b 100644
--- a/muse2/muse/driver/alsamidi.cpp
+++ b/muse2/muse/driver/alsamidi.cpp
@@ -199,10 +199,10 @@ void MidiAlsaDevice::writeRouting(int level, Xml& xml) const
xml.tag(level++, "Route");
//xml.strTag(level, "srcNode", r->name());
- xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().latin1());
+ xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData());
//xml.strTag(level, "dstNode", name());
- xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, name().latin1());
+ xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, name().toLatin1().constData());
xml.etag(level--, "Route");
}
@@ -230,31 +230,31 @@ void MidiAlsaDevice::writeRouting(int level, Xml& xml) const
/*
//xml.strTag(level, "srcNode", name());
if(r->channel != -1)
- //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, r->channel, name().latin1());
- //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, r->channel, name().latin1());
- xml.tag(level, "source devtype=\"%d\" channel=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, r->channel, name().latin1());
+ //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, r->channel, name().toLatin1().constData());
+ //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, r->channel, name().toLatin1().constData());
+ xml.tag(level, "source devtype=\"%d\" channel=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, r->channel, name().toLatin1().constData());
else
- //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, name().latin1());
- //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().latin1());
+ //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::ALSA_MIDI_ROUTE, name().toLatin1().constData());
+ //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().toLatin1().constData());
*/
- //xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, name().latin1());
- xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, Xml::xmlString(name()).latin1());
+ //xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, name().toLatin1().constData());
+ xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::ALSA_MIDI, Xml::xmlString(name()).toLatin1().constData());
/*
//xml.strTag(level, "dstNode", r->name());
if(r->channel != -1)
{
if(r->type == Route::MIDI_DEVICE_ROUTE)
- xml.tag(level, "dest devtype=\"%d\" channel=\"%d\" name=\"%s\"/", r->device->deviceType(), r->channel, r->name().latin1());
+ xml.tag(level, "dest devtype=\"%d\" channel=\"%d\" name=\"%s\"/", r->device->deviceType(), r->channel, r->name().toLatin1().constData());
else
- xml.tag(level, "dest type=\"%d\" channel=\"%d\" name=\"%s\"/", r->type, r->channel, r->name().latin1());
+ xml.tag(level, "dest type=\"%d\" channel=\"%d\" name=\"%s\"/", r->type, r->channel, r->name().toLatin1().constData());
}
else
{
if(r->type == Route::MIDI_DEVICE_ROUTE)
- xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", r->device->deviceType(), r->name().latin1());
+ xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", r->device->deviceType(), r->name().toLatin1().constData());
else
- xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().latin1());
+ xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData());
}
*/
diff --git a/muse2/muse/driver/jack.cpp b/muse2/muse/driver/jack.cpp
index 6c237622..909e6064 100644
--- a/muse2/muse/driver/jack.cpp
+++ b/muse2/muse/driver/jack.cpp
@@ -789,7 +789,7 @@ void JackAudioDevice::connectJackMidiPorts()
QString name(namep);
if(JACK_DEBUG)
- printf("JackAudioDevice::graphChanged %s\n", name.latin1());
+ printf("JackAudioDevice::graphChanged %s\n", name.toLatin1());
for(iMidiDevice imd = midiDevices.begin(); imd != midiDevices.end(); ++imd)
{
@@ -805,14 +805,14 @@ void JackAudioDevice::connectJackMidiPorts()
if(!mjd->clientJackPort() || (mjd->clientJackPort() != port))
continue;
- jack_port_t* devport = jack_port_by_name(_client, mjd->name().latin1());
+ jack_port_t* devport = jack_port_by_name(_client, mjd->name().toLatin1());
if(!devport)
continue;
int ofl = mjd->openFlags();
if(JACK_DEBUG)
- printf("JackAudioDevice::graphChanged found MidiJackDevice:%s\n", mjd->name().latin1());
+ printf("JackAudioDevice::graphChanged found MidiJackDevice:%s\n", mjd->name().toLatin1());
// Note docs say it can't be both input and output. src, dest
// If Jack port can receive data from us and we actually want to...
@@ -919,7 +919,7 @@ void JackAudioDevice::graphChanged()
if (irl->channel != channel)
continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
//printf("portname=%s\n", portName);
bool found = false;
const char** pn = ports;
@@ -956,7 +956,7 @@ void JackAudioDevice::graphChanged()
if (irl->channel != channel)
continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
if (strcmp(*pn, portName) == 0) {
found = true;
break;
@@ -1004,7 +1004,7 @@ void JackAudioDevice::graphChanged()
if (irl->channel != channel)
continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
bool found = false;
const char** pn = ports;
while (pn && *pn) {
@@ -1040,7 +1040,7 @@ void JackAudioDevice::graphChanged()
if (irl->channel != channel)
continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
if (strcmp(*pn, portName) == 0) {
found = true;
break;
@@ -1114,7 +1114,7 @@ void JackAudioDevice::graphChanged()
// continue;
QString name = irl->name();
//name += QString(JACK_MIDI_OUT_PORT_SUFFIX); // p3.3.55
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
bool found = false;
const char** pn = ports;
while (pn && *pn) {
@@ -1154,7 +1154,7 @@ void JackAudioDevice::graphChanged()
//if (irl->channel != channel)
// continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
if (strcmp(*pn, portName) == 0) {
found = true;
break;
@@ -1210,7 +1210,7 @@ void JackAudioDevice::graphChanged()
//if (irl->channel != channel)
// continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
bool found = false;
const char** pn = ports;
while (pn && *pn) {
@@ -1250,7 +1250,7 @@ void JackAudioDevice::graphChanged()
//if (irl->channel != channel)
// continue;
QString name = irl->name();
- const char* portName = name.latin1();
+ const char* portName = name.toLatin1();
if (strcmp(*pn, portName) == 0) {
found = true;
break;
@@ -1743,7 +1743,7 @@ QString JackAudioDevice::portName(void* port)
return "";
QString s(jack_port_name((jack_port_t*)port));
- //printf("Jack::portName %p %s\n", port, s.latin1());
+ //printf("Jack::portName %p %s\n", port, s.toLatin1());
return s;
}
@@ -2130,14 +2130,14 @@ void JackAudioDevice::scanMidiPorts()
// Only Jack midi devices.
if(dynamic_cast<MidiJackDevice*>(*imd) == 0)
continue;
- if(names.find(std::string((*imd)->name().latin1())) == names.end())
+ if(names.find(std::string((*imd)->name().toLatin1())) == names.end())
to_del.push_back(*imd);
}
for(std::list<MidiDevice*>::iterator imd = to_del.begin(); imd != to_del.end(); ++imd)
{
if(debugMsg)
- printf(" removing port device:%s\n", (*imd)->name().latin1());
+ printf(" removing port device:%s\n", (*imd)->name().toLatin1());
midiDevices.remove(*imd);
// This will close (and unregister) the client port.
delete (*imd);
@@ -2198,7 +2198,7 @@ void JackAudioDevice::scanMidiPorts()
//portList.append(jp);
if(debugMsg)
- printf(" adding port device:%s\n", qname.latin1());
+ printf(" adding port device:%s\n", qname.toLatin1());
MidiJackDevice* dev = new MidiJackDevice(0, qname);
dev->setrwFlags(flags);
diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp
index d10712eb..da0f6235 100644
--- a/muse2/muse/driver/jackmidi.cpp
+++ b/muse2/muse/driver/jackmidi.cpp
@@ -203,15 +203,15 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
/// _openFlags &= _rwFlags; // restrict to available bits
/// #ifdef JACK_MIDI_DEBUG
-/// printf("MidiJackDevice::open %s\n", name.latin1());
+/// printf("MidiJackDevice::open %s\n", name.toLatin1().constData());
/// #endif
- //jack_port_t* jp = jack_port_by_name(_client, name().latin1());
-/// jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().latin1());
+ //jack_port_t* jp = jack_port_by_name(_client, name().toLatin1().constData());
+/// jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().toLatin1().constData());
/// if(!jp)
/// {
-/// printf("MidiJackDevice::open: Jack midi port %s not found!\n", name().latin1());
+/// printf("MidiJackDevice::open: Jack midi port %s not found!\n", name().toLatin1().constData());
/// _writeEnable = false;
/// _readEnable = false;
/// return QString("Jack midi port not found");
@@ -222,9 +222,9 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
//if(!name.isEmpty())
//{
// Does not work.
- // if(audioDevice->findPort(name.latin1()))
+ // if(audioDevice->findPort(name.toLatin1().constData()))
// {
- // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed! Given port name %s already exists!\n", name.latin1());
+ // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed! Given port name %s already exists!\n", name.toLatin1().constData());
// return 0;
// }
//}
@@ -275,8 +275,8 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
//client_jackport = (jack_port_t*)audioDevice->registerOutPort(buf, true);
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO) // p3.3.52
{
- //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.latin1(), true);
- out_client_jackport = (jack_port_t*)audioDevice->registerOutPort((name + QString("_out")).latin1(), true); // p3.3.55
+ //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.toLatin1().constData(), true);
+ out_client_jackport = (jack_port_t*)audioDevice->registerOutPort((name + QString("_out")).toLatin1().constData(), true); // p3.3.55
//if(client_jackport)
if(out_client_jackport) // p3.3.55
break;
@@ -300,13 +300,13 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
{
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO) // p3.3.52
{
- //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.latin1(), true);
- out_client_jackport = (jack_port_t*)audioDevice->registerOutPort((name + QString(JACK_MIDI_OUT_PORT_SUFFIX)).latin1(), true); // p3.3.55
+ //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.toLatin1().constData(), true);
+ out_client_jackport = (jack_port_t*)audioDevice->registerOutPort((name + QString(JACK_MIDI_OUT_PORT_SUFFIX)).toLatin1().constData(), true); // p3.3.55
//if(!client_jackport)
if(!out_client_jackport) // p3.3.55
{
- //fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed creating output port name %s\n", name.latin1());
- fprintf(stderr, "MusE: createJackMidiDevice failed creating output port name %s\n", (name + QString(JACK_MIDI_OUT_PORT_SUFFIX)).latin1()); // p3.3.55
+ //fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed creating output port name %s\n", name.toLatin1().constData());
+ fprintf(stderr, "MusE: createJackMidiDevice failed creating output port name %s\n", (name + QString(JACK_MIDI_OUT_PORT_SUFFIX)).toLatin1().constData()); // p3.3.55
//return 0;
rwflags &= ~1; // p3.3.55 Remove the output r/w flag, but continue on...
@@ -318,7 +318,7 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
/*
else
{
- client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.latin1(), true);
+ client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.toLatin1().constData(), true);
if(!client_jackport)
{
for(int i = 0; ; ++i)
@@ -342,10 +342,10 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
}
*/
- //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.latin1(), true);
+ //client_jackport = (jack_port_t*)audioDevice->registerOutPort(name.toLatin1().constData(), true);
//if(client_jackport == NULL)
//{
- // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed to register jack midi client output port %s\n", name.latin1());
+ // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed to register jack midi client output port %s\n", name.toLatin1().constData());
// return 0;
//}
//else
@@ -375,8 +375,8 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
//client_jackport = (jack_port_t*)audioDevice->registerInPort(buf, true);
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO) // p3.3.52
{
- //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.latin1(), true);
- in_client_jackport = (jack_port_t*)audioDevice->registerInPort(name.latin1(), true); // p3.3.55
+ //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.toLatin1().constData(), true);
+ in_client_jackport = (jack_port_t*)audioDevice->registerInPort(name.toLatin1().constData(), true); // p3.3.55
//if(client_jackport)
if(in_client_jackport) // p3.3.55
break;
@@ -400,13 +400,13 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
{
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO) // p3.3.52
{
- //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.latin1(), true);
- in_client_jackport = (jack_port_t*)audioDevice->registerInPort((name + QString(JACK_MIDI_IN_PORT_SUFFIX)).latin1(), true); // p3.3.55
+ //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.toLatin1().constData(), true);
+ in_client_jackport = (jack_port_t*)audioDevice->registerInPort((name + QString(JACK_MIDI_IN_PORT_SUFFIX)).toLatin1().constData(), true); // p3.3.55
//if(!client_jackport)
if(!in_client_jackport) // p3.3.55
{
- //fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed creating input port name %s\n", name.latin1());
- fprintf(stderr, "MusE: createJackMidiDevice failed creating input port name %s\n", (name + QString(JACK_MIDI_IN_PORT_SUFFIX)).latin1());
+ //fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed creating input port name %s\n", name.toLatin1().constData());
+ fprintf(stderr, "MusE: createJackMidiDevice failed creating input port name %s\n", (name + QString(JACK_MIDI_IN_PORT_SUFFIX)).toLatin1().constData());
//return 0;
rwflags &= ~2; // p3.3.55 Remove the input r/w flag, but continue on...
@@ -415,11 +415,11 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
}
*/
- //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.latin1(), true);
+ //client_jackport = (jack_port_t*)audioDevice->registerInPort(name.toLatin1().constData(), true);
//if(client_jackport == NULL)
//{
- // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed to register jack midi client input port %s\n", name.latin1());
+ // fprintf(stderr, "MidiJackDevice::createJackMidiDevice failed to register jack midi client input port %s\n", name.toLatin1().constData());
//_readEnable = false;
//return QString("Could not register jack-midi-in client port");
// return 0;
@@ -448,17 +448,17 @@ MidiDevice* MidiJackDevice::createJackMidiDevice(QString name, int rwflags) // p
void MidiJackDevice::setName(const QString& s)
{
#ifdef JACK_MIDI_DEBUG
- printf("MidiJackDevice::setName %s new name:%s\n", name().latin1(), s.latin1());
+ printf("MidiJackDevice::setName %s new name:%s\n", name().toLatin1().constData(), s.toLatin1().constData());
#endif
_name = s;
//if(clientPort()) // p3.3.52 Added check.
- // audioDevice->setPortName(clientPort(), s.latin1());
+ // audioDevice->setPortName(clientPort(), s.toLatin1().constData());
// p3.3.55
if(inClientPort())
- audioDevice->setPortName(inClientPort(), (s + QString(JACK_MIDI_IN_PORT_SUFFIX)).latin1());
+ audioDevice->setPortName(inClientPort(), (s + QString(JACK_MIDI_IN_PORT_SUFFIX)).toLatin1().constData());
if(outClientPort())
- audioDevice->setPortName(outClientPort(), (s + QString(JACK_MIDI_OUT_PORT_SUFFIX)).latin1());
+ audioDevice->setPortName(outClientPort(), (s + QString(JACK_MIDI_OUT_PORT_SUFFIX)).toLatin1().constData());
}
//---------------------------------------------------------
@@ -470,16 +470,16 @@ QString MidiJackDevice::open()
_openFlags &= _rwFlags; // restrict to available bits
#ifdef JACK_MIDI_DEBUG
- printf("MidiJackDevice::open %s\n", name().latin1());
+ printf("MidiJackDevice::open %s\n", name().toLatin1().constData());
#endif
/*
- //jack_port_t* jp = jack_port_by_name(_client, name().latin1());
- jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().latin1());
+ //jack_port_t* jp = jack_port_by_name(_client, name().toLatin1().constData());
+ jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().toLatin1().constData());
if(!jp)
{
- printf("MidiJackDevice::open: Jack midi port %s not found!\n", name().latin1());
+ printf("MidiJackDevice::open: Jack midi port %s not found!\n", name().toLatin1().constData());
_writeEnable = false;
_readEnable = false;
return QString("Jack midi port not found");
@@ -539,10 +539,10 @@ QString MidiJackDevice::open()
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO)
{
s = name() + QString(JACK_MIDI_OUT_PORT_SUFFIX);
- _out_client_jackport = (jack_port_t*)audioDevice->registerOutPort(s.latin1(), true);
+ _out_client_jackport = (jack_port_t*)audioDevice->registerOutPort(s.toLatin1().constData(), true);
if(!_out_client_jackport)
{
- fprintf(stderr, "MusE: MidiJackDevice::open failed creating output port name %s\n", s.latin1());
+ fprintf(stderr, "MusE: MidiJackDevice::open failed creating output port name %s\n", s.toLatin1().constData());
_openFlags &= ~1; // Remove the flag, but continue on...
}
}
@@ -585,10 +585,10 @@ QString MidiJackDevice::open()
if(audioDevice->deviceType() == AudioDevice::JACK_AUDIO)
{
s = name() + QString(JACK_MIDI_IN_PORT_SUFFIX);
- _in_client_jackport = (jack_port_t*)audioDevice->registerInPort(s.latin1(), true);
+ _in_client_jackport = (jack_port_t*)audioDevice->registerInPort(s.toLatin1().constData(), true);
if(!_in_client_jackport)
{
- fprintf(stderr, "MusE: MidiJackDevice::open failed creating input port name %s\n", s.latin1());
+ fprintf(stderr, "MusE: MidiJackDevice::open failed creating input port name %s\n", s.toLatin1().constData());
_openFlags &= ~2; // Remove the flag, but continue on...
}
}
@@ -620,7 +620,7 @@ QString MidiJackDevice::open()
void MidiJackDevice::close()
{
#ifdef JACK_MIDI_DEBUG
- printf("MidiJackDevice::close %s\n", name().latin1());
+ printf("MidiJackDevice::close %s\n", name().toLatin1().constData());
#endif
// p3.3.55 TODO: I don't really want to unregister the
@@ -650,12 +650,12 @@ void MidiJackDevice::close()
_readEnable = false;
/*
- //jack_port_t* jp = jack_port_by_name(_client, name().latin1());
- jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().latin1());
+ //jack_port_t* jp = jack_port_by_name(_client, name().toLatin1().constData());
+ jack_port_t* jp = (jack_port_t*)audioDevice->findPort(name().toLatin1().constData());
if(!jp)
{
- printf("MidiJackDevice::close: Jack midi port %s not found!\n", name().latin1());
+ printf("MidiJackDevice::close: Jack midi port %s not found!\n", name().toLatin1().constData());
_writeEnable = false;
_readEnable = false;
return;
@@ -665,7 +665,7 @@ void MidiJackDevice::close()
// If Jack port can receive data from us and we actually want to...
//if((pf & JackPortIsInput) && (_openFlags & 1))
- if(jack_port_connected_to(midi_port_out[0], name().latin1()))
+ if(jack_port_connected_to(midi_port_out[0], name().toLatin1().constData()))
{
// src, dest
/// audioDevice->disconnect(midi_port_out[0], jp);
@@ -674,7 +674,7 @@ void MidiJackDevice::close()
else // Note docs say it can't be both input and output.
// If Jack port can send data to us and we actually want it...
//if((pf & JackPortIsOutput) && (_openFlags & 2))
- if(jack_port_connected_to(midi_port_in[0], name().latin1()))
+ if(jack_port_connected_to(midi_port_in[0], name().toLatin1().constData()))
{
/// audioDevice->disconnect(jp, midi_port_in[0]);
_readEnable = false;
@@ -706,7 +706,7 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const
xml.tag(level++, "Route");
//xml.strTag(level, "srcNode", r->name());
- //xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().latin1());
+ //xml.tag(level, "source type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData());
s = QT_TR_NOOP("source");
if(r->type != Route::TRACK_ROUTE)
s += QString(QT_TR_NOOP(" type=\"%1\"")).arg(r->type);
@@ -716,10 +716,10 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const
xml.tag(level, s);
//xml.strTag(level, "dstNode", name());
- //xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().latin1());
- //xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().latin1());
- //xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, name().latin1());
- xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, Xml::xmlString(name()).latin1());
+ //xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().toLatin1().constData());
+ //xml.tag(level, "dest type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().toLatin1().constData());
+ //xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, name().toLatin1().constData());
+ xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, Xml::xmlString(name()).toLatin1().constData());
xml.etag(level--, "Route");
}
@@ -740,31 +740,31 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const
/*
//xml.strTag(level, "srcNode", name());
if(r->channel != -1)
- //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, r->channel, name().latin1());
- //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, r->channel, name().latin1());
- xml.tag(level, "source devtype=\"%d\" channel=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, r->channel, name().latin1());
+ //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, r->channel, name().toLatin1().constData());
+ //xml.tag(level, "source type=\"%d\" channel=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, r->channel, name().toLatin1().constData());
+ xml.tag(level, "source devtype=\"%d\" channel=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, r->channel, name().toLatin1().constData());
else
- //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().latin1());
- //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().latin1());
+ //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().toLatin1().constData());
+ //xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::MIDI_DEVICE_ROUTE, name().toLatin1().constData());
*/
- //xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, name().latin1());
- xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, Xml::xmlString(name()).latin1());
+ //xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, name().toLatin1().constData());
+ xml.tag(level, "source devtype=\"%d\" name=\"%s\"/", MidiDevice::JACK_MIDI, Xml::xmlString(name()).toLatin1().constData());
/*
//xml.strTag(level, "dstNode", r->name());
if(r->channel != -1)
{
if(r->type == Route::MIDI_DEVICE_ROUTE)
- xml.tag(level, "dest devtype=\"%d\" channel=\"%d\" name=\"%s\"/", r->device->deviceType(), r->channel, r->name().latin1());
+ xml.tag(level, "dest devtype=\"%d\" channel=\"%d\" name=\"%s\"/", r->device->deviceType(), r->channel, r->name().toLatin1().constData());
else
- xml.tag(level, "dest type=\"%d\" channel=\"%d\" name=\"%s\"/", r->type, r->channel, r->name().latin1());
+ xml.tag(level, "dest type=\"%d\" channel=\"%d\" name=\"%s\"/", r->type, r->channel, r->name().toLatin1().constData());
}
else
{
if(r->type == Route::MIDI_DEVICE_ROUTE)
- xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", r->device->deviceType(), r->name().latin1());
+ xml.tag(level, "dest devtype=\"%d\" name=\"%s\"/", r->device->deviceType(), r->name().toLatin1().constData());
else
- xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().latin1());
+ xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData());
}
*/
@@ -798,12 +798,12 @@ void MidiJackDevice::writeRouting(int level, Xml& xml) const
//xml.strTag(level, "srcNode", name());
//if(r->channel != -1)
- // xml.tag(level, "srcNode type=\"%d\" channel=\"%d\" name=\"%s\"", Route::JACK_MIDI_ROUTE, r->channel, name().latin1());
+ // xml.tag(level, "srcNode type=\"%d\" channel=\"%d\" name=\"%s\"", Route::JACK_MIDI_ROUTE, r->channel, name().toLatin1().constData());
//else
- xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().latin1());
+ xml.tag(level, "source type=\"%d\" name=\"%s\"/", Route::JACK_MIDI_ROUTE, name().toLatin1().constData());
//xml.strTag(level, "dstNode", r->name());
- xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().latin1());
+ xml.tag(level, "dest type=\"%d\" name=\"%s\"/", r->type, r->name().toLatin1().constData());
xml.etag(level--, "Route");
}
@@ -1097,7 +1097,7 @@ void MidiJackDevice::eventReceived(jack_midi_event_t* ev)
}
if (midiInputTrace) {
- printf("MidiInput<%s>: ", name().latin1());
+ printf("MidiInput<%s>: ", name().toLatin1().constData());
event.dump();
}
@@ -1178,7 +1178,7 @@ bool MidiJackDevice::queueEvent(const MidiPlayEvent& e)
// return false;
//if (midiOutputTrace) {
- // printf("MidiOut<%s>: jackMidi: ", portName(port).toLatin1().data());
+ // printf("MidiOut<%s>: jackMidi: ", portName(port).toLatin1().constData());
// e.dump();
// }