mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 17:39:25 +02:00
Change *selection* tracks property to a list rather than a total - greater flexibility for plugins.
This commit is contained in:
parent
974230ae81
commit
c2f90ac41e
@ -730,11 +730,18 @@ bool EffectNyquist::Process()
|
|||||||
int numLabel = 0;
|
int numLabel = 0;
|
||||||
int numMidi = 0;
|
int numMidi = 0;
|
||||||
int numTime = 0;
|
int numTime = 0;
|
||||||
|
wxString waveTrackList = wxT(""); // track positions of selected audio tracks.
|
||||||
|
|
||||||
for (t = all.First(); t; t = all.Next())
|
for (t = all.First(); t; t = all.Next())
|
||||||
{
|
{
|
||||||
switch (t->GetKind())
|
switch (t->GetKind())
|
||||||
{
|
{
|
||||||
case Track::Wave: numWave++; break;
|
case Track::Wave:
|
||||||
|
numWave++;
|
||||||
|
if (t->GetSelected()) {
|
||||||
|
waveTrackList += wxString::Format(wxT("%d "), 1 + numTracks);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case Track::Label: numLabel++; break;
|
case Track::Label: numLabel++; break;
|
||||||
#if defined(USE_MIDI)
|
#if defined(USE_MIDI)
|
||||||
case Track::Note: numMidi++; break;
|
case Track::Note: numMidi++; break;
|
||||||
@ -759,9 +766,7 @@ bool EffectNyquist::Process()
|
|||||||
|
|
||||||
SelectedTrackListOfKindIterator sel(Track::Wave, mOutputTracks);
|
SelectedTrackListOfKindIterator sel(Track::Wave, mOutputTracks);
|
||||||
int numChannels = 0;
|
int numChannels = 0;
|
||||||
numTracks = 0;
|
|
||||||
for (WaveTrack *t = (WaveTrack *) sel.First(); t; t = (WaveTrack *) sel.Next()) {
|
for (WaveTrack *t = (WaveTrack *) sel.First(); t; t = (WaveTrack *) sel.Next()) {
|
||||||
numTracks++;
|
|
||||||
numChannels++;
|
numChannels++;
|
||||||
if (mT1 >= mT0) {
|
if (mT1 >= mT0) {
|
||||||
if (t->GetLinked()) {
|
if (t->GetLinked()) {
|
||||||
@ -773,7 +778,7 @@ bool EffectNyquist::Process()
|
|||||||
|
|
||||||
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %g) 'START)\n"), mT0);
|
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %g) 'START)\n"), mT0);
|
||||||
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %g) 'END)\n"), mT1);
|
mProps += wxString::Format(wxT("(putprop '*SELECTION* (float %g) 'END)\n"), mT1);
|
||||||
mProps += wxString::Format(wxT("(putprop '*SELECTION* %d 'TRACKS)\n"), numTracks);
|
mProps += wxString::Format(wxT("(putprop '*SELECTION* (list %s) 'TRACKS)\n"), waveTrackList.c_str());
|
||||||
mProps += wxString::Format(wxT("(putprop '*SELECTION* %d 'CHANNELS)\n"), numChannels);
|
mProps += wxString::Format(wxT("(putprop '*SELECTION* %d 'CHANNELS)\n"), numChannels);
|
||||||
|
|
||||||
wxString lowHz = wxT("nil");
|
wxString lowHz = wxT("nil");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user