From: werner s. <wsc...@us...> - 2005-01-22 18:33:33
|
Update of /cvsroot/lmuse/muse/muse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2119 Modified Files: audio.cpp audio.h midi.cpp synth.cpp Log Message: misc fixes Index: synth.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/synth.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** synth.cpp 22 Jan 2005 14:35:17 -0000 1.64 --- synth.cpp 22 Jan 2005 18:33:24 -0000 1.65 *************** *** 499,507 **** int endPos = pos + n; int off = pos; ! int frameOffset = 0; // BUG: audio->getFrameOffset(); for (int port = 0; port < ports; ++port) memset(buffer[port], 0, n * sizeof(float)); - int outports = channels(); if (ports < outports) { --- 499,506 ---- int endPos = pos + n; int off = pos; ! int frameOffset = audio->getFrameOffset(); for (int port = 0; port < ports; ++port) memset(buffer[port], 0, n * sizeof(float)); int outports = channels(); if (ports < outports) { *************** *** 548,551 **** --- 547,551 ---- _mess->process(buffer, curPos - off, endPos - curPos); } + _mess->process(buffer, 0, n); return i; } Index: audio.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/audio.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** audio.h 14 Jan 2005 13:53:40 -0000 1.44 --- audio.h 22 Jan 2005 18:33:24 -0000 1.45 *************** *** 142,146 **** double syncTime; // wall clock at last sync point unsigned syncFrame; // corresponding frame no. to syncTime ! int frameOffset; // offset to free running hw frame counter State state; --- 142,146 ---- double syncTime; // wall clock at last sync point unsigned syncFrame; // corresponding frame no. to syncTime ! unsigned frameOffset; // offset to free running hw frame counter State state; Index: audio.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/audio.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** audio.cpp 13 Jan 2005 21:15:36 -0000 1.82 --- audio.cpp 22 Jan 2005 18:33:23 -0000 1.83 *************** *** 332,338 **** --- 332,341 ---- // // resync with audio interface + // syncFrame - free running JACK frame counter + // syncTime - corresponding wall clock time // syncFrame = audioDevice->framePos(); syncTime = curTime(); + frameOffset = syncFrame - samplePos; *************** *** 721,726 **** int Audio::timestamp() const { ! int t = curFrame() - frameOffset; ! return t; } --- 724,728 ---- int Audio::timestamp() const { ! return curFrame(); } Index: midi.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/midi.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** midi.cpp 14 Jan 2005 21:28:55 -0000 1.65 --- midi.cpp 22 Jan 2005 18:33:24 -0000 1.66 *************** *** 789,794 **** event.setPort(outPort); if (track->recordFlag() && recording) { ! unsigned time = AL::tempomap.frame2tick(event.time()); event.setTime(time); // set tick time rl->add(event); --- 789,795 ---- event.setPort(outPort); + int eventTime = event.time(); if (track->recordFlag() && recording) { ! unsigned time = AL::tempomap.frame2tick(eventTime); event.setTime(time); // set tick time rl->add(event); *************** *** 797,801 **** if (track->monitor() && !dev->isSynti()) { midiPlayTransformation(event, track); ! unsigned time = event.time() + segmentSize*(segmentCount-1); event.setTime(time); midiPorts[event.port()].device()->playEvents()->add(event); --- 798,802 ---- if (track->monitor() && !dev->isSynti()) { midiPlayTransformation(event, track); ! unsigned time = eventTime + segmentSize*(segmentCount-1); event.setTime(time); midiPorts[event.port()].device()->playEvents()->add(event); |