1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-28 14:18:41 +02:00

Fix compiling when USE_MIDI not is defined

Compilation broke in TrackPanel in ed277ec and in TrackpanelAx in a96c719c.
This commit is contained in:
Pokechu22 2017-03-18 21:15:07 -07:00 committed by Paul Licameli
parent e2a7282690
commit bdb0790150
2 changed files with 7 additions and 2 deletions

View File

@ -3732,8 +3732,11 @@ void TrackPanel::DoSlide(wxMouseEvent & event)
#else #else
{ {
trySnap = true; trySnap = true;
desiredSlideAmount = rint(mouseTrack->GetRate() * desiredSlideAmount) / if (mouseTrack->GetKind() == Track::Wave) {
mouseTrack->GetRate(); // set it to a sample point WaveTrack *mtw = (WaveTrack *)mouseTrack;
desiredSlideAmount = rint(mtw->GetRate() * desiredSlideAmount) /
mtw->GetRate(); // set it to a sample point
}
if (mSnapManager && mCapturedClip) { if (mSnapManager && mCapturedClip) {
clipLeft = mCapturedClip->GetStartTime() + desiredSlideAmount; clipLeft = mCapturedClip->GetStartTime() + desiredSlideAmount;
clipRight = mCapturedClip->GetEndTime() + desiredSlideAmount; clipRight = mCapturedClip->GetEndTime() + desiredSlideAmount;

View File

@ -353,12 +353,14 @@ wxAccStatus TrackPanelAx::GetName( int childId, wxString* name )
this is a Time track.*/ this is a Time track.*/
name->Append( wxT(" ") + wxString(_("Time Track"))); name->Append( wxT(" ") + wxString(_("Time Track")));
} }
#ifdef USE_MIDI
else if (t->GetKind() == Track::Note) else if (t->GetKind() == Track::Note)
{ {
/* i18n-hint: This is for screen reader software and indicates that /* i18n-hint: This is for screen reader software and indicates that
this is a Note track.*/ this is a Note track.*/
name->Append( wxT(" ") + wxString(_("Note Track"))); name->Append( wxT(" ") + wxString(_("Note Track")));
} }
#endif
// LLL: Remove these during "refactor" // LLL: Remove these during "refactor"
if( t->GetMute() ) if( t->GetMute() )