mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-03 17:19:43 +02:00
Remove unused and unneeded MIDI methods and variables
The fields in AudioIO are simply unneeded (commented out, declared but never implemented, or otherwise unused). mLastMidiPosition (in NoteTrack) looks like the vestiges of a far older attempt at MIDI playback; the field itself is completely unused though so it is safe to remove it.
This commit is contained in:
parent
437de15098
commit
62ebb2f95d
@ -851,10 +851,6 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
const PaStreamCallbackTimeInfo *timeInfo,
|
const PaStreamCallbackTimeInfo *timeInfo,
|
||||||
PaStreamCallbackFlags statusFlags, void *userData );
|
PaStreamCallbackFlags statusFlags, void *userData );
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
|
||||||
int compareTime( const void* a, const void* b );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// class AudioThread - declaration and glue code
|
// class AudioThread - declaration and glue code
|
||||||
@ -4892,10 +4888,3 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
return callbackReturn;
|
return callbackReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
|
||||||
int compareTime( const void* a, const void* b )
|
|
||||||
{
|
|
||||||
return( (int)((*(PmEvent*)a).timestamp - (*(PmEvent*)b).timestamp ) );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -440,11 +440,8 @@ private:
|
|||||||
void OutputEvent();
|
void OutputEvent();
|
||||||
void FillMidiBuffers();
|
void FillMidiBuffers();
|
||||||
void GetNextEvent();
|
void GetNextEvent();
|
||||||
void AudacityMidiCallback();
|
|
||||||
double AudioTime() { return mT0 + mNumFrames / mRate; }
|
double AudioTime() { return mT0 + mNumFrames / mRate; }
|
||||||
double PauseTime();
|
double PauseTime();
|
||||||
// double getCurrentTrackTime();
|
|
||||||
// long CalculateMidiTimeStamp(double time);
|
|
||||||
void AllNotesOff();
|
void AllNotesOff();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -565,7 +562,6 @@ private:
|
|||||||
bool mMidiOutputComplete;
|
bool mMidiOutputComplete;
|
||||||
/// Is the next event a note-on?
|
/// Is the next event a note-on?
|
||||||
bool mNextIsNoteOn;
|
bool mNextIsNoteOn;
|
||||||
// int mCnt;
|
|
||||||
/// mMidiStreamActive tells when mMidiStream is open for output
|
/// mMidiStreamActive tells when mMidiStream is open for output
|
||||||
bool mMidiStreamActive;
|
bool mMidiStreamActive;
|
||||||
/// when true, mSendMidiState means send only updates, not note-on's,
|
/// when true, mSendMidiState means send only updates, not note-on's,
|
||||||
|
@ -124,7 +124,6 @@ NoteTrack::NoteTrack(const std::shared_ptr<DirManager> &projDirManager)
|
|||||||
mPitchHeight = 5;
|
mPitchHeight = 5;
|
||||||
|
|
||||||
mVisibleChannels = ALL_CHANNELS;
|
mVisibleChannels = ALL_CHANNELS;
|
||||||
mLastMidiPosition = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NoteTrack::~NoteTrack()
|
NoteTrack::~NoteTrack()
|
||||||
@ -185,7 +184,6 @@ Track::Holder NoteTrack::Duplicate() const
|
|||||||
// copy some other fields here
|
// copy some other fields here
|
||||||
duplicate->SetBottomNote(mBottomNote);
|
duplicate->SetBottomNote(mBottomNote);
|
||||||
duplicate->SetPitchHeight(mPitchHeight);
|
duplicate->SetPitchHeight(mPitchHeight);
|
||||||
duplicate->mLastMidiPosition = mLastMidiPosition;
|
|
||||||
duplicate->mVisibleChannels = mVisibleChannels;
|
duplicate->mVisibleChannels = mVisibleChannels;
|
||||||
duplicate->SetOffset(GetOffset());
|
duplicate->SetOffset(GetOffset());
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
@ -461,7 +459,7 @@ Track::Holder NoteTrack::Cut(double t0, double t1)
|
|||||||
//AddToDuration( delta );
|
//AddToDuration( delta );
|
||||||
|
|
||||||
// What should be done with the rest of newTrack's members?
|
// What should be done with the rest of newTrack's members?
|
||||||
//(mBottomNote, mDirManager, mLastMidiPosition,
|
//(mBottomNote, mDirManager,
|
||||||
// mSerializationBuffer, mSerializationLength, mVisibleChannels)
|
// mSerializationBuffer, mSerializationLength, mVisibleChannels)
|
||||||
|
|
||||||
// This std::move is needed to "upcast" the pointer type
|
// This std::move is needed to "upcast" the pointer type
|
||||||
@ -485,8 +483,8 @@ Track::Holder NoteTrack::Copy(double t0, double t1, bool) const
|
|||||||
newTrack->SetOffset(GetOffset());
|
newTrack->SetOffset(GetOffset());
|
||||||
|
|
||||||
// What should be done with the rest of newTrack's members?
|
// What should be done with the rest of newTrack's members?
|
||||||
//(mBottomNote, mDirManager, mLastMidiPosition,
|
// (mBottomNote, mDirManager, mSerializationBuffer,
|
||||||
// mSerializationBuffer, mSerializationLength, mVisibleChannels)
|
// mSerializationLength, mVisibleChannels)
|
||||||
|
|
||||||
// This std::move is needed to "upcast" the pointer type
|
// This std::move is needed to "upcast" the pointer type
|
||||||
return std::move(newTrack);
|
return std::move(newTrack);
|
||||||
|
@ -102,13 +102,6 @@ class AUDACITY_DLL_API NoteTrack final
|
|||||||
bool ExportMIDI(const wxString &f) const;
|
bool ExportMIDI(const wxString &f) const;
|
||||||
bool ExportAllegro(const wxString &f) const;
|
bool ExportAllegro(const wxString &f) const;
|
||||||
|
|
||||||
/* REQUIRES PORTMIDI */
|
|
||||||
// int GetLastMidiPosition() const { return mLastMidiPosition; }
|
|
||||||
// void SetLastMidiPosition( int position )
|
|
||||||
// {
|
|
||||||
// mLastMidiPosition = position;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// High-level editing
|
// High-level editing
|
||||||
Track::Holder Cut (double t0, double t1) override;
|
Track::Holder Cut (double t0, double t1) override;
|
||||||
Track::Holder Copy (double t0, double t1, bool forClipboard = true) const override;
|
Track::Holder Copy (double t0, double t1, bool forClipboard = true) const override;
|
||||||
@ -244,7 +237,6 @@ class AUDACITY_DLL_API NoteTrack final
|
|||||||
int mStartBottomNote;
|
int mStartBottomNote;
|
||||||
int mPitchHeight;
|
int mPitchHeight;
|
||||||
int mVisibleChannels; // bit set of visible channels
|
int mVisibleChannels; // bit set of visible channels
|
||||||
int mLastMidiPosition;
|
|
||||||
|
|
||||||
std::weak_ptr<StretchHandle> mStretchHandle;
|
std::weak_ptr<StretchHandle> mStretchHandle;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user