Audacity 3.2.0
Classes | Enumerations | Functions | Variables
anonymous_namespace{NoiseReductionBase.cpp} Namespace Reference

Classes

struct  DiscriminationMethodInfo
 
struct  PrefsTableEntry
 
struct  WindowTypesInfo
 

Enumerations

enum  DiscriminationMethod : size_t {
  DM_MEDIAN , DM_SECOND_GREATEST , DM_OLD_METHOD , DM_N_METHODS ,
  DM_DEFAULT_METHOD = DM_SECOND_GREATEST
}
 
enum  WindowTypes : unsigned {
  WT_RECTANGULAR_HANN = 0 , WT_HANN_RECTANGULAR , WT_HANN_HANN , WT_BLACKMAN_HANN ,
  WT_HAMMING_RECTANGULAR , WT_HAMMING_HANN , WT_N_WINDOW_TYPES , WT_DEFAULT_WINDOW_TYPES = WT_HANN_HANN
}
 
enum  { DEFAULT_WINDOW_SIZE_CHOICE = 8 , DEFAULT_STEPS_PER_WINDOW_CHOICE }
 

Functions

template<typename StructureType , typename FieldType >
void readPrefs (StructureType *structure, const wxString &prefix, const PrefsTableEntry< StructureType, FieldType > *fields, size_t numFields)
 
template<typename StructureType , typename FieldType >
void writePrefs (const StructureType *structure, const wxString &prefix, const PrefsTableEntry< StructureType, FieldType > *fields, size_t numFields)
 

Variables

const struct anonymous_namespace{NoiseReductionBase.cpp}::DiscriminationMethodInfo discriminationMethodInfo [DM_N_METHODS]
 
const float minSignalTime = 0.05f
 
const struct anonymous_namespace{NoiseReductionBase.cpp}::WindowTypesInfo windowTypesInfo [WT_N_WINDOW_TYPES]
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_WINDOW_SIZE_CHOICE 
DEFAULT_STEPS_PER_WINDOW_CHOICE 

Definition at line 129 of file NoiseReductionBase.cpp.

130{
131 DEFAULT_WINDOW_SIZE_CHOICE = 8, // corresponds to 2048
133 1 // corresponds to 4, minimum for WT_HANN_HANN
134};

◆ DiscriminationMethod

enum anonymous_namespace{NoiseReductionBase.cpp}::DiscriminationMethod : size_t

◆ WindowTypes

enum anonymous_namespace{NoiseReductionBase.cpp}::WindowTypes : unsigned
Enumerator
WT_RECTANGULAR_HANN 
WT_HANN_RECTANGULAR 
WT_HANN_HANN 
WT_BLACKMAN_HANN 
WT_HAMMING_RECTANGULAR 
WT_HAMMING_HANN 
WT_N_WINDOW_TYPES 
WT_DEFAULT_WINDOW_TYPES 

Definition at line 93 of file NoiseReductionBase.cpp.

Function Documentation

◆ readPrefs()

template<typename StructureType , typename FieldType >
void anonymous_namespace{NoiseReductionBase.cpp}::readPrefs ( StructureType *  structure,
const wxString &  prefix,
const PrefsTableEntry< StructureType, FieldType > *  fields,
size_t  numFields 
)

Definition at line 332 of file NoiseReductionBase.cpp.

335{
336 for (size_t ii = 0; ii < numFields; ++ii)
337 {
339 gPrefs->Read(
340 prefix + entry.name, &(structure->*(entry.field)), entry.defaultValue);
341 }
342}
static ProjectFileIORegistry::AttributeWriterEntry entry
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
virtual bool Read(const wxString &key, bool *value) const =0

References entry, gPrefs, and audacity::BasicSettings::Read().

Referenced by NoiseReductionBase::Settings::PrefsIO().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writePrefs()

template<typename StructureType , typename FieldType >
void anonymous_namespace{NoiseReductionBase.cpp}::writePrefs ( const StructureType *  structure,
const wxString &  prefix,
const PrefsTableEntry< StructureType, FieldType > *  fields,
size_t  numFields 
)

Definition at line 345 of file NoiseReductionBase.cpp.

348{
349 for (size_t ii = 0; ii < numFields; ++ii)
350 {
352 gPrefs->Write(prefix + entry.name, structure->*(entry.field));
353 }
354}
virtual bool Write(const wxString &key, bool value)=0

References entry, gPrefs, and audacity::BasicSettings::Write().

Referenced by NoiseReductionBase::Settings::PrefsIO().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ discriminationMethodInfo

const struct anonymous_namespace{NoiseReductionBase.cpp}::DiscriminationMethodInfo anonymous_namespace{NoiseReductionBase.cpp}::discriminationMethodInfo[DM_N_METHODS]
Initial value:
= {
{ XO("Median") },
{ XO("Second greatest") },
{ XO("Old") },
}
XO("Cut/Copy/Paste")

Referenced by EffectNoiseReduction::Dialog::PopulateOrExchange().

◆ minSignalTime

const float anonymous_namespace{NoiseReductionBase.cpp}::minSignalTime = 0.05f

Definition at line 91 of file NoiseReductionBase.cpp.

Referenced by NoiseReductionBase::Worker::Worker().

◆ windowTypesInfo

const struct anonymous_namespace{NoiseReductionBase.cpp}::WindowTypesInfo anonymous_namespace{NoiseReductionBase.cpp}::windowTypesInfo[WT_N_WINDOW_TYPES]
Initial value:
= {
{ Verbatim("none, Hann (2.0.6 behavior)"), 2 },
{ Verbatim("Hann, none"), 2 },
{ Verbatim("Hann, Hann (default)"), 4 },
{ Verbatim("Blackman, Hann"), 4 },
{ Verbatim("Hamming, none"), 2 },
{ Verbatim("Hamming, Hann"), 4 },
}
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.

Referenced by EffectNoiseReduction::Dialog::PopulateOrExchange(), and NoiseReductionBase::Settings::Validate().