diff options
| author | Lywx <kiritodev01@gmail.com> | 2025-06-28 12:59:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-28 12:59:09 -0600 |
| commit | bc2736adb1b3b3fc7e110cb3a518a7bbe8af65d8 (patch) | |
| tree | 89d8c35c51c62f1fe417287ddd5aa49403cd4c10 /src | |
| parent | 5773373b3620e4a6bc6c92fdc4690d66741c086d (diff) | |
Fixed incorrect sample rate calculation
Diffstat (limited to 'src')
| -rw-r--r-- | src/factories/naudio/v1/AudioConverter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/factories/naudio/v1/AudioConverter.cpp b/src/factories/naudio/v1/AudioConverter.cpp index 462a6d7..7c4ebb4 100644 --- a/src/factories/naudio/v1/AudioConverter.cpp +++ b/src/factories/naudio/v1/AudioConverter.cpp @@ -93,13 +93,13 @@ void AudioConverter::SampleV0ToAIFC(AudioBankSample* sample, LUS::BinaryWriter & float tmin = PyUtils::min(sample->tunings); float tmax = PyUtils::max(sample->tunings); - if(tmin <= 0.5f <= tmax){ + if(tmin <= 0.5f && 0.5f <= tmax) { sample_rate = 16000; - } else if(tmin <= 1.0f <= tmax){ + } else if(tmin <= 1.0f && 1.0f <= tmax){ sample_rate = 32000; - } else if(tmin <= 1.5f <= tmax){ + } else if(tmin <= 1.5f && 1.5f <= tmax){ sample_rate = 48000; - } else if(tmin <= 2.5f <= tmax){ + } else if(tmin <= 2.5f && 2.5f <= tmax){ sample_rate = 80000; } else { sample_rate = 16000 * (tmin + tmax); |
