mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 17:11:12 +02:00
Minor bug fixes for EXPERIMENTAL_MIDI_OUT. Also added files for autoconf/automake to portmidi and libscorealign. I also modified my local build-related files in src and lib-src to handle EXPERIMENTAL_MIDI_OUT and EXPERIMENTAL_SCOREALIGN, but while I can build with these options, the build-related files are not entirely working, so I will not commit them and break the "normal" builds. I suspect these new build files in this commit are not entirely correct -- some review is in order.
This commit is contained in:
@@ -1385,22 +1385,21 @@ bool AudioIO::StartPortMidiStream()
|
||||
&::MidiTime,
|
||||
NULL,
|
||||
mMidiLatency);
|
||||
mMidiStreamActive = true;
|
||||
mPauseTime = 0;
|
||||
mMidiPaused = false;
|
||||
mMidiLoopOffset = 0;
|
||||
mMidiOutputComplete = false;
|
||||
// mCnt = 0;
|
||||
|
||||
PrepareMidiIterator();
|
||||
|
||||
// It is ok to call this now, but do not send timestamped midi
|
||||
// until after the first audio callback, which provides necessary
|
||||
// data for MidiTime().
|
||||
Pm_Synchronize(mMidiStream); // start using timestamps
|
||||
// start midi output flowing (pending first audio callback)
|
||||
mMidiThreadFillBuffersLoopRunning = true;
|
||||
if (mLastPmError == pmNoError) {
|
||||
mMidiStreamActive = true;
|
||||
mPauseTime = 0;
|
||||
mMidiPaused = false;
|
||||
mMidiLoopOffset = 0;
|
||||
mMidiOutputComplete = false;
|
||||
PrepareMidiIterator();
|
||||
|
||||
// It is ok to call this now, but do not send timestamped midi
|
||||
// until after the first audio callback, which provides necessary
|
||||
// data for MidiTime().
|
||||
Pm_Synchronize(mMidiStream); // start using timestamps
|
||||
// start midi output flowing (pending first audio callback)
|
||||
mMidiThreadFillBuffersLoopRunning = true;
|
||||
}
|
||||
return (mLastPmError == pmNoError);
|
||||
}
|
||||
#endif
|
||||
@@ -2854,7 +2853,6 @@ PmTimestamp AudioIO::MidiTime()
|
||||
|
||||
void AudioIO::AllNotesOff()
|
||||
{
|
||||
printf("AudioIO::AllNotesOff()\n");
|
||||
for (int chan = 0; chan < 16; chan++) {
|
||||
Pm_WriteShort(mMidiStream, 0, Pm_Message(0xB0 + chan, 0x7B, 0));
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ bool ImportMIDI(wxString fName, NoteTrack * dest)
|
||||
Alg_event_ptr evt;
|
||||
int note_count = 0;
|
||||
int pitch_sum = 0;
|
||||
while (evt = iterator.next()) {
|
||||
while ((evt = iterator.next())) {
|
||||
// if the event is a note
|
||||
if (evt->get_type() == 'n') {
|
||||
Alg_note_ptr note = (Alg_note_ptr) evt;
|
||||
|
Reference in New Issue
Block a user