mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-03 17:19:43 +02:00
Fix midi-related compile problems in AudioIO and NoteTrack
The compilation was broken in 67cec5a but fixed in ed8c7fd. However, the warnings weren't fixed. The same general sign-related changes from 67cec5a were applied, fixing several warnings. This also changes the arguments for NoteTrack's label click handler, to match the ones found in TrackPanel. That's needed to handle some other const-related changes. Additionally, EXPERIMENTAL_MIDI_PLAYBACK was changed to EXPERIMENTAL_MIDI_OUT in the documentation, as that is the correct name.
This commit is contained in:
parent
bdb0790150
commit
0ce9598274
@ -28,8 +28,8 @@
|
|||||||
To highlight this deliniation, the file is divided into three parts
|
To highlight this deliniation, the file is divided into three parts
|
||||||
based on what thread context each function is intended to run in.
|
based on what thread context each function is intended to run in.
|
||||||
|
|
||||||
\par EXPERIMENTAL_MIDI_PLAYBACK
|
\par EXPERIMENTAL_MIDI_OUT
|
||||||
If EXPERIMENTAL_MIDI_PLAYBACK is defined, this class also manages
|
If EXPERIMENTAL_MIDI_OUT is defined, this class also manages
|
||||||
MIDI playback. The reason for putting MIDI here rather than in, say,
|
MIDI playback. The reason for putting MIDI here rather than in, say,
|
||||||
class MidiIO, is that there is no high-level synchronization and
|
class MidiIO, is that there is no high-level synchronization and
|
||||||
transport architecture, so Audio and MIDI must be coupled in order
|
transport architecture, so Audio and MIDI must be coupled in order
|
||||||
@ -3897,7 +3897,7 @@ void AudioIO::FillMidiBuffers()
|
|||||||
hasSolo = true;
|
hasSolo = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int numMidiPlaybackTracks = gAudioIO->mMidiPlaybackTracks.size();
|
auto numMidiPlaybackTracks = gAudioIO->mMidiPlaybackTracks.size();
|
||||||
for(unsigned t = 0; t < numMidiPlaybackTracks; t++ )
|
for(unsigned t = 0; t < numMidiPlaybackTracks; t++ )
|
||||||
if( gAudioIO->mMidiPlaybackTracks[t]->GetSolo() ) {
|
if( gAudioIO->mMidiPlaybackTracks[t]->GetSolo() ) {
|
||||||
hasSolo = true;
|
hasSolo = true;
|
||||||
@ -4370,7 +4370,7 @@ int audacityAudioCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
if( gAudioIO->mPlaybackTracks[t]->GetSolo() )
|
if( gAudioIO->mPlaybackTracks[t]->GetSolo() )
|
||||||
numSolo++;
|
numSolo++;
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
int numMidiPlaybackTracks = gAudioIO->mMidiPlaybackTracks.size();
|
auto numMidiPlaybackTracks = gAudioIO->mMidiPlaybackTracks.size();
|
||||||
for( unsigned t = 0; t < numMidiPlaybackTracks; t++ )
|
for( unsigned t = 0; t < numMidiPlaybackTracks; t++ )
|
||||||
if( gAudioIO->mMidiPlaybackTracks[t]->GetSolo() )
|
if( gAudioIO->mMidiPlaybackTracks[t]->GetSolo() )
|
||||||
numSolo++;
|
numSolo++;
|
||||||
|
@ -239,7 +239,7 @@ void NoteTrack::WarpAndTransposeNotes(double t0, double t1,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int NoteTrack::DrawLabelControls(wxDC & dc, wxRect & r)
|
int NoteTrack::DrawLabelControls(wxDC & dc, const wxRect &r)
|
||||||
{
|
{
|
||||||
int wid = 23;
|
int wid = 23;
|
||||||
int ht = 16;
|
int ht = 16;
|
||||||
@ -328,7 +328,7 @@ int NoteTrack::DrawLabelControls(wxDC & dc, wxRect & r)
|
|||||||
return box.GetBottom();
|
return box.GetBottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NoteTrack::LabelClick(wxRect & r, int mx, int my, bool right)
|
bool NoteTrack::LabelClick(const wxRect &r, int mx, int my, bool right)
|
||||||
{
|
{
|
||||||
int wid = 23;
|
int wid = 23;
|
||||||
int ht = 16;
|
int ht = 16;
|
||||||
|
@ -69,8 +69,8 @@ class AUDACITY_DLL_API NoteTrack final : public Track {
|
|||||||
void WarpAndTransposeNotes(double t0, double t1,
|
void WarpAndTransposeNotes(double t0, double t1,
|
||||||
const TimeWarper &warper, double semitones);
|
const TimeWarper &warper, double semitones);
|
||||||
|
|
||||||
int DrawLabelControls(wxDC & dc, wxRect & r);
|
int DrawLabelControls(wxDC & dc, const wxRect &r);
|
||||||
bool LabelClick(wxRect & r, int x, int y, bool right);
|
bool LabelClick(const wxRect &rect, int x, int y, bool right);
|
||||||
|
|
||||||
void SetSequence(std::unique_ptr<Alg_seq> &&seq);
|
void SetSequence(std::unique_ptr<Alg_seq> &&seq);
|
||||||
Alg_seq* GetSequence();
|
Alg_seq* GetSequence();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user