Eject if tracks are not all at the same sampling rate.

We could perhaps apply the filter at different sampling rates, but that would require a lot of reworking.
This commit is contained in:
martynshaw99 2014-01-08 01:03:31 +00:00
parent a2dbc06869
commit 45973724b3
1 changed files with 20 additions and 0 deletions

View File

@ -254,6 +254,26 @@ EffectEqualization::~EffectEqualization()
bool EffectEqualization::Init()
{
int selcount = 0;
double rate;
TrackListIterator iter(GetActiveProject()->GetTracks());
Track *t = iter.First();
while (t) {
if (t->GetSelected() && t->GetKind() == Track::Wave) {
WaveTrack *track = (WaveTrack *)t;
if (selcount==0) {
rate = track->GetRate();
}
else {
if (track->GetRate() != rate) {
wxMessageBox(_("To apply Equalization, all selected tracks must have the same sample rate."));
return(false);
}
}
selcount++;
}
t = iter.Next();
}
return(true);
}