From c3650bf9b2302e1a20853f0cadc7833370e3d0dd Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Wed, 20 Feb 2013 01:16:45 +0000 Subject: MASSIVE FIXES: MANY editor, usability, operation fixes and changes. See ChangeLog. --- muse2/muse/synth.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'muse2/muse/synth.cpp') diff --git a/muse2/muse/synth.cpp b/muse2/muse/synth.cpp index e16e87d6..e04b55c8 100644 --- a/muse2/muse/synth.cpp +++ b/muse2/muse/synth.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -203,7 +204,7 @@ static Synth* findSynth(const QString& sclass, const QString& label, Synth::Type (type == Synth::SYNTH_TYPE_END || type == (*i)->synthType()) ) return *i; } - printf("synthi type:%d class:%s label:%s not found\n", type, sclass.toLatin1().constData(), label.toLatin1().constData()); + fprintf(stderr, "synthi type:%d class:%s label:%s not found\n", type, sclass.toLatin1().constData(), label.toLatin1().constData()); return 0; } @@ -227,7 +228,7 @@ static SynthI* createSynthInstance(const QString& sclass, const QString& label, } } else - printf("createSynthInstance: synthi class:%s label:%s not found\n", sclass.toLatin1().constData(), label.toLatin1().constData()); + fprintf(stderr, "createSynthInstance: synthi class:%s label:%s not found\n", sclass.toLatin1().constData(), label.toLatin1().constData()); return si; } @@ -354,7 +355,7 @@ bool SynthI::putEvent(const MidiPlayEvent& ev) { if (MusEGlobal::midiOutputTrace) { - printf("MidiOut: Synth: <%s>: ", name().toLatin1().constData()); + fprintf(stderr, "MidiOut: Synth: <%s>: ", name().toLatin1().constData()); ev.dump(); } return _sif->putEvent(ev); @@ -561,13 +562,13 @@ void SynthI::deactivate3() //synthesizer->incInstances(-1); // Moved below by Tim. p3.3.14 if(MusEGlobal::debugMsg) - printf("SynthI::deactivate3 deleting _sif...\n"); + fprintf(stderr, "SynthI::deactivate3 deleting _sif...\n"); delete _sif; _sif = 0; if(MusEGlobal::debugMsg) - printf("SynthI::deactivate3 decrementing synth instances...\n"); + fprintf(stderr, "SynthI::deactivate3 decrementing synth instances...\n"); synthesizer->incInstances(-1); } @@ -602,7 +603,7 @@ void initMidiSynth() QDir pluginDir(s, QString("*.so")); // ddskrjo if (MusEGlobal::debugMsg) - printf("searching for software synthesizer in <%s>\n", s.toLatin1().constData()); + fprintf(stderr, "searching for software synthesizer in <%s>\n", s.toLatin1().constData()); if (pluginDir.exists()) { QFileInfoList list = pluginDir.entryInfoList(); QFileInfoList::iterator it=list.begin(); @@ -652,7 +653,7 @@ void initMidiSynth() ++it; } if (MusEGlobal::debugMsg) - printf("%zd soft synth found\n", MusEGlobal::synthis.size()); + fprintf(stderr, "%zd soft synth found\n", MusEGlobal::synthis.size()); } } @@ -1054,17 +1055,17 @@ iMPEvent MessSynthIF::getData(MidiPort* mp, MPEventList* el, iMPEvent i, unsigne int frame = evTime - abs(frameOffset); if (frame >= endPos) { - printf("frame > endPos!! frame = %d >= endPos %d, i->time() %d, frameOffset %d curPos=%d\n", frame, endPos, i->time(), frameOffset,curPos); + fprintf(stderr, "frame > endPos!! frame = %d >= endPos %d, i->time() %d, frameOffset %d curPos=%d\n", frame, endPos, i->time(), frameOffset,curPos); continue; } if (frame > curPos) { if (frame < (int) pos) - printf("should not happen: missed event %d\n", pos -frame); + fprintf(stderr, "should not happen: missed event %d\n", pos -frame); else { if (!_mess) - printf("should not happen - no _mess\n"); + fprintf(stderr, "should not happen - no _mess\n"); else { _mess->process(buffer, curPos-pos, frame - curPos); @@ -1084,7 +1085,7 @@ iMPEvent MessSynthIF::getData(MidiPort* mp, MPEventList* el, iMPEvent i, unsigne if (endPos - curPos) { if (!_mess) - printf("should not happen - no _mess\n"); + fprintf(stderr, "should not happen - no _mess\n"); else { _mess->process(buffer, curPos - off, endPos - curPos); -- cgit v1.2.3