Massive fmtlib refactor

This commit is contained in:
Jack Andersen
2019-07-19 18:22:36 -10:00
parent b2bf7549f5
commit deefc8e995
38 changed files with 364 additions and 400 deletions

View File

@@ -27,7 +27,7 @@ void AudioVoice::_setPitchRatio(double ratio, bool slew) {
m_sampleRatio = ratio * m_sampleRateIn / m_sampleRateOut;
soxr_error_t err = soxr_set_io_ratio(m_src, m_sampleRatio, slew ? m_head->m_5msFrames : 0);
if (err) {
Log.report(logvisor::Fatal, "unable to set resampler rate: %s", soxr_strerror(err));
Log.report(logvisor::Fatal, fmt("unable to set resampler rate: {}"), soxr_strerror(err));
m_setPitchRatio = false;
return;
}
@@ -74,7 +74,7 @@ void AudioVoiceMono::_resetSampleRate(double sampleRate) {
m_src = soxr_create(sampleRate, rateOut, 1, &err, &ioSpec, &qSpec, nullptr);
if (err) {
Log.report(logvisor::Fatal, "unable to create soxr resampler: %s", soxr_strerror(err));
Log.report(logvisor::Fatal, fmt("unable to create soxr resampler: {}"), soxr_strerror(err));
m_resetSampleRate = false;
return;
}
@@ -195,7 +195,7 @@ void AudioVoiceStereo::_resetSampleRate(double sampleRate) {
m_src = soxr_create(sampleRate, rateOut, 2, &err, &ioSpec, &qSpec, nullptr);
if (!m_src) {
Log.report(logvisor::Fatal, "unable to create soxr resampler: %s", soxr_strerror(err));
Log.report(logvisor::Fatal, fmt("unable to create soxr resampler: {}"), soxr_strerror(err));
m_resetSampleRate = false;
return;
}