mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
Keep !EXPERIMENTAL_MIDI_OUT compilable
This commit is contained in:
parent
8bb55b8bbf
commit
85a8d0ac97
@ -2448,7 +2448,7 @@ void AudioIO::StopStream()
|
|||||||
|
|
||||||
mPlaybackTracks.clear();
|
mPlaybackTracks.clear();
|
||||||
mCaptureTracks.clear();
|
mCaptureTracks.clear();
|
||||||
#ifdef USE_MIDI
|
#if defined(EXPERIMENTAL_MIDI_OUT) && defined(USE_MIDI)
|
||||||
mMidiPlaybackTracks.clear();
|
mMidiPlaybackTracks.clear();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -635,6 +635,7 @@ void NoteTrack::InsertSilence(double t, double len)
|
|||||||
// AddToDuration( len );
|
// AddToDuration( len );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
void NoteTrack::SetVelocity(float velocity)
|
void NoteTrack::SetVelocity(float velocity)
|
||||||
{
|
{
|
||||||
if (mVelocity != velocity) {
|
if (mVelocity != velocity) {
|
||||||
@ -642,6 +643,7 @@ void NoteTrack::SetVelocity(float velocity)
|
|||||||
Notify();
|
Notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Call this function to manipulate the underlying sequence data. This is
|
// Call this function to manipulate the underlying sequence data. This is
|
||||||
// NOT the function that handles horizontal dragging.
|
// NOT the function that handles horizontal dragging.
|
||||||
|
@ -52,8 +52,10 @@ bool DoImportMIDI( AudacityProject &project, const FilePath &fileName )
|
|||||||
// the newly imported track is muted.
|
// the newly imported track is muted.
|
||||||
const bool projectHasSolo =
|
const bool projectHasSolo =
|
||||||
!(tracks.Any<PlayableTrack>() + &PlayableTrack::GetSolo).empty();
|
!(tracks.Any<PlayableTrack>() + &PlayableTrack::GetSolo).empty();
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
if (projectHasSolo)
|
if (projectHasSolo)
|
||||||
pTrack->SetMute(true);
|
pTrack->SetMute(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
ProjectHistory::Get( project )
|
ProjectHistory::Get( project )
|
||||||
.PushState(
|
.PushState(
|
||||||
|
@ -186,6 +186,7 @@ void SliderDrawFunction
|
|||||||
Selector( sliderRect, nt, captured, pParent )->OnPaint(*dc, highlight);
|
Selector( sliderRect, nt, captured, pParent )->OnPaint(*dc, highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
void VelocitySliderDrawFunction
|
void VelocitySliderDrawFunction
|
||||||
( TrackPanelDrawingContext &context,
|
( TrackPanelDrawingContext &context,
|
||||||
const wxRect &rect, const Track *pTrack )
|
const wxRect &rect, const Track *pTrack )
|
||||||
@ -202,6 +203,7 @@ void VelocitySliderDrawFunction
|
|||||||
&NoteTrackControls::VelocitySlider, dc, rect, pTrack,
|
&NoteTrackControls::VelocitySlider, dc, rect, pTrack,
|
||||||
pParent, captured, hit);
|
pParent, captured, hit);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void MidiControlsDrawFunction
|
void MidiControlsDrawFunction
|
||||||
( TrackPanelDrawingContext &context,
|
( TrackPanelDrawingContext &context,
|
||||||
@ -225,8 +227,10 @@ static const struct NoteTrackTCPLines
|
|||||||
insert( end(), {
|
insert( end(), {
|
||||||
{ TCPLine::kItemMidiControlsRect, kMidiCellHeight * 4, 0,
|
{ TCPLine::kItemMidiControlsRect, kMidiCellHeight * 4, 0,
|
||||||
MidiControlsDrawFunction },
|
MidiControlsDrawFunction },
|
||||||
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
{ TCPLine::kItemVelocity, kTrackInfoSliderHeight, kTrackInfoSliderExtra,
|
{ TCPLine::kItemVelocity, kTrackInfoSliderHeight, kTrackInfoSliderExtra,
|
||||||
VelocitySliderDrawFunction },
|
VelocitySliderDrawFunction },
|
||||||
|
#endif
|
||||||
} );
|
} );
|
||||||
} } noteTrackTCPLines;
|
} } noteTrackTCPLines;
|
||||||
|
|
||||||
@ -312,8 +316,6 @@ void NoteTrackControls::ReCreateVelocitySlider( wxEvent &evt )
|
|||||||
wxSize(sliderRect.width, sliderRect.height),
|
wxSize(sliderRect.width, sliderRect.height),
|
||||||
VEL_SLIDER);
|
VEL_SLIDER);
|
||||||
gVelocityCaptured->SetDefaultValue(0.0);
|
gVelocityCaptured->SetDefaultValue(0.0);
|
||||||
#else
|
|
||||||
pParent;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user