mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Don't support such extreme resampling ratios.
This was affecting the stability of the internal low pass filters.
This commit is contained in:
+2
-3
@@ -7272,7 +7272,6 @@ static MA_INLINE float ma_mix_f32_fast(float x, float y, float a)
|
|||||||
/*return x + (y - x)*a;*/
|
/*return x + (y - x)*a;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined(MA_SUPPORT_SSE2)
|
#if defined(MA_SUPPORT_SSE2)
|
||||||
static MA_INLINE __m128 ma_mix_f32_fast__sse2(__m128 x, __m128 y, __m128 a)
|
static MA_INLINE __m128 ma_mix_f32_fast__sse2(__m128 x, __m128 y, __m128 a)
|
||||||
{
|
{
|
||||||
@@ -35948,7 +35947,7 @@ MA_API ma_result ma_linear_resampler_set_rate_ratio(ma_linear_resampler* pResamp
|
|||||||
ma_uint32 n;
|
ma_uint32 n;
|
||||||
ma_uint32 d;
|
ma_uint32 d;
|
||||||
|
|
||||||
d = 1000000; /* We use up to 6 decimal places. */
|
d = 1000;
|
||||||
n = (ma_uint32)(ratioInOut * d);
|
n = (ma_uint32)(ratioInOut * d);
|
||||||
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
@@ -36450,7 +36449,7 @@ MA_API ma_result ma_resampler_set_rate_ratio(ma_resampler* pResampler, float rat
|
|||||||
ma_uint32 n;
|
ma_uint32 n;
|
||||||
ma_uint32 d;
|
ma_uint32 d;
|
||||||
|
|
||||||
d = 1000000; /* We use up to 6 decimal places. */
|
d = 1000;
|
||||||
n = (ma_uint32)(ratio * d);
|
n = (ma_uint32)(ratio * d);
|
||||||
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user