Browse Source

Fixed a window naming typo in the DSP module

tags/2021-05-28
hogliux 7 years ago
parent
commit
9206f8819f
4 changed files with 10 additions and 10 deletions
  1. +2
    -2
      examples/DSPDemo/JuceLibraryCode/BinaryData.cpp
  2. +2
    -2
      examples/DSPDemo/Source/Demos/FIRFilterDemo.cpp
  3. +4
    -4
      modules/juce_dsp/frequency/juce_Windowing.cpp
  4. +2
    -2
      modules/juce_dsp/frequency/juce_Windowing.h

+ 2
- 2
examples/DSPDemo/JuceLibraryCode/BinaryData.cpp View File

@@ -1629,7 +1629,7 @@ static const unsigned char temp_binary_data_4[] =
" sampleRate = spec.sampleRate;\r\n"
"\r\n"
" fir.state = FilterDesign<float>::designFIRLowpassWindowMethod (440.0f, sampleRate, 21,\r\n"
" WindowingFunction<float>::blackmann);\r\n"
" WindowingFunction<float>::blackman);\r\n"
" fir.prepare (spec);\r\n"
" }\r\n"
"\r\n"
@@ -1660,7 +1660,7 @@ static const unsigned char temp_binary_data_4[] =
" double sampleRate = 0;\r\n"
"\r\n"
" SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.4, 440.0f, \"Cutoff\", \"Hz\" };\r\n"
" ChoiceParameter typeParam { { \"Rectangular\", \"Triangular\", \"Hann\", \"Hamming\", \"Blackmann\", \"Blackmann-Harris\", \"Flat Top\", \"Kaiser\" },\r\n"
" ChoiceParameter typeParam { { \"Rectangular\", \"Triangular\", \"Hann\", \"Hamming\", \"Blackman\", \"Blackman-Harris\", \"Flat Top\", \"Kaiser\" },\r\n"
" 5, \"Windowing Function\" };\r\n"
"\r\n"
" std::vector<DSPDemoParameterBase*> parameters { &cutoffParam, &typeParam };\r\n"


+ 2
- 2
examples/DSPDemo/Source/Demos/FIRFilterDemo.cpp View File

@@ -35,7 +35,7 @@ struct FIRFilterDemo
sampleRate = spec.sampleRate;
fir.state = FilterDesign<float>::designFIRLowpassWindowMethod (440.0f, sampleRate, 21,
WindowingFunction<float>::blackmann);
WindowingFunction<float>::blackman);
fir.prepare (spec);
}
@@ -66,7 +66,7 @@ struct FIRFilterDemo
double sampleRate = 0;
SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.4, 440.0f, "Cutoff", "Hz" };
ChoiceParameter typeParam { { "Rectangular", "Triangular", "Hann", "Hamming", "Blackmann", "Blackmann-Harris", "Flat Top", "Kaiser" },
ChoiceParameter typeParam { { "Rectangular", "Triangular", "Hann", "Hamming", "Blackman", "Blackman-Harris", "Flat Top", "Kaiser" },
5, "Windowing Function" };
std::vector<DSPDemoParameterBase*> parameters { &cutoffParam, &typeParam };


+ 4
- 4
modules/juce_dsp/frequency/juce_Windowing.cpp View File

@@ -88,7 +88,7 @@ void WindowingFunction<FloatType>::fillWindowingTables (FloatType* samples, size
}
break;
case blackmann:
case blackman:
{
constexpr FloatType alpha = 0.16f;
@@ -102,7 +102,7 @@ void WindowingFunction<FloatType>::fillWindowingTables (FloatType* samples, size
}
break;
case blackmannHarris:
case blackmanHarris:
{
for (size_t i = 0; i < size; ++i)
{
@@ -174,8 +174,8 @@ const char* WindowingFunction<FloatType>::getWindowingMethodName (WindowingMetho
case triangular: return "Triangular";
case hann: return "Hann";
case hamming: return "Hamming";
case blackmann: return "Blackmann";
case blackmannHarris: return "Blackmann-Harris";
case blackman: return "Blackman";
case blackmanHarris: return "Blackman-Harris";
case flatTop: return "FlatTop";
case kaiser: return "Kaiser";
default: jassertfalse; return "";


+ 2
- 2
modules/juce_dsp/frequency/juce_Windowing.h View File

@@ -38,8 +38,8 @@ struct WindowingFunction
triangular,
hann,
hamming,
blackmann,
blackmannHarris,
blackman,
blackmanHarris,
flatTop,
kaiser,
numWindowingMethods


Loading…
Cancel
Save