mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 23:33:49 +01:00
This commit is partial effort toward more libsoxr integration, that implements Rob Sykes's latest patch. I have no idea whether the Linux-specific stuff from the patch (e.g., M4 file) is still correct in this.
For Resample.* and QualityPrefs.cpp, this commit has my restructuring for distinguishing constant-rate vs variable-rate resamplers more generally. I think it's complete and ready for const-rate, but I have more review and testing to do for the var-rate cases. Variable-rate resampling is not implemented here, so Time Tracks are still broken, but this is a milestone in getting to a more general and correct structure. Also I think this fixes AboutDialog issues Steve noticed.
This commit is contained in:
@@ -109,11 +109,17 @@ void QualityPrefs::GetNamesAndLabels()
|
||||
//------------- Converter Names
|
||||
// We used to set and get best/fast method via Resample.cpp.
|
||||
// Need to ensure that preferences strings in Resample.cpp match.
|
||||
// Note that these methods used to be public and static, but are now protected and pure virtual.
|
||||
// int converterHQ = Resample::GetBestMethod();
|
||||
// int converter = Resample::GetFastMethod();
|
||||
int numConverters = Resample::GetNumMethods();
|
||||
//
|
||||
//vvvvv Note that we're now using libsoxr for constant-rate resampling
|
||||
// and either libresample or libsamplerate for variable-rate,
|
||||
// and currently *not* allowing method choice for variable-rate,
|
||||
// per discussion on -devel.
|
||||
int numConverters = ConstRateResample::GetNumMethods();
|
||||
for (int i = 0; i < numConverters; i++) {
|
||||
mConverterNames.Add(Resample::GetMethodName(i));
|
||||
mConverterNames.Add(ConstRateResample::GetMethodName(i));
|
||||
mConverterLabels.Add(i);
|
||||
}
|
||||
}
|
||||
@@ -169,8 +175,8 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.SetStretchyCol(2);
|
||||
|
||||
S.TieChoice(_("Sample Rate Con&verter:"),
|
||||
Resample::GetFastMethodKey(),
|
||||
Resample::GetFastMethodDefault(),
|
||||
ConstRateResample::GetFastMethodKey(),
|
||||
ConstRateResample::GetFastMethodDefault(),
|
||||
mConverterNames,
|
||||
mConverterLabels),
|
||||
S.SetSizeHints(mConverterNames);
|
||||
@@ -191,8 +197,8 @@ void QualityPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.StartMultiColumn(2);
|
||||
{
|
||||
S.TieChoice(_("Sample Rate Conver&ter:"),
|
||||
Resample::GetBestMethodKey(),
|
||||
Resample::GetBestMethodDefault(),
|
||||
ConstRateResample::GetBestMethodKey(),
|
||||
ConstRateResample::GetBestMethodDefault(),
|
||||
mConverterNames,
|
||||
mConverterLabels),
|
||||
S.SetSizeHints(mConverterNames);
|
||||
|
||||
Reference in New Issue
Block a user