mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 23:02:42 +02:00
use AudioTrack
This commit is contained in:
parent
c391a8f884
commit
f1bec85675
@ -4608,11 +4608,13 @@ bool AudacityProject::HandlePasteNothingSelected()
|
||||
pNewTrack = mTrackFactory->NewWaveTrack(w->GetSampleFormat(), w->GetRate());
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef USE_MIDI
|
||||
case Track::Note:
|
||||
pNewTrack = mTrackFactory->NewNoteTrack();
|
||||
break;
|
||||
#endif // USE_MIDI
|
||||
|
||||
case Track::Label:
|
||||
pNewTrack = mTrackFactory->NewLabelTrack();
|
||||
break;
|
||||
@ -6150,12 +6152,7 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
|
||||
|
||||
while (t) {
|
||||
// We only want Wave and Note tracks here.
|
||||
#if defined(USE_MIDI)
|
||||
if (t->GetSelected() && ((t->GetKind() == Track::Wave) ||
|
||||
(t->GetKind() == Track::Note)))
|
||||
#else
|
||||
if (t->GetSelected() && (t->GetKind() == Track::Wave))
|
||||
#endif
|
||||
if (t->GetSelected() && dynamic_cast<const AudioTrack*>(t))
|
||||
{
|
||||
offset = t->GetOffset();
|
||||
if (t->GetLinked()) { // Left channel of stereo track.
|
||||
@ -6236,12 +6233,7 @@ void AudacityProject::HandleAlign(int index, bool moveSel)
|
||||
while (t) {
|
||||
// This shifts different tracks in different ways, so no sync-lock move.
|
||||
// Only align Wave and Note tracks end to end.
|
||||
#if defined(USE_MIDI)
|
||||
if (t->GetSelected() && ((t->GetKind() == Track::Wave) ||
|
||||
(t->GetKind() == Track::Note)))
|
||||
#else
|
||||
if (t->GetSelected() && (t->GetKind() == Track::Wave))
|
||||
#endif
|
||||
if (t->GetSelected() && dynamic_cast<const AudioTrack*>(t))
|
||||
{
|
||||
t->SetOffset(newPos); // Move the track
|
||||
|
||||
|
@ -418,11 +418,7 @@ void ControlToolBar::EnableDisableButtons()
|
||||
if (p) {
|
||||
TrackListIterator iter( p->GetTracks() );
|
||||
for (Track *t = iter.First(); t; t = iter.Next()) {
|
||||
if (t->GetKind() == Track::Wave
|
||||
#if defined(USE_MIDI)
|
||||
|| t->GetKind() == Track::Note
|
||||
#endif
|
||||
) {
|
||||
if (dynamic_cast<const AudioTrack*>(t)) {
|
||||
tracks = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user