mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Bug fixes to the linear resampler.
This changes the the lpfCutoffFrequency config variable from a uint32 to a double. This is required because we simplify the sample rate fraction which cant result in cases where the cutoff frequency is too aggressively rounded down due to dividing tiny integers.
This commit is contained in:
+3
-3
@@ -41,10 +41,10 @@ typedef struct
|
||||
ma_format format;
|
||||
ma_uint32 channels;
|
||||
ma_uint32 sampleRate;
|
||||
ma_uint32 cutoffFrequency;
|
||||
double cutoffFrequency;
|
||||
} ma_lpf_config;
|
||||
|
||||
ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 cutoffFrequency);
|
||||
ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -220,7 +220,7 @@ ma_uint32 ma_biquad_get_latency(ma_biquad* pBQ)
|
||||
}
|
||||
|
||||
|
||||
ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 cutoffFrequency)
|
||||
ma_lpf_config ma_lpf_config_init(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, double cutoffFrequency)
|
||||
{
|
||||
ma_lpf_config config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user