You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This came up in #13888 (comment): When Mixxx is configured to a sample rate than an AU plugin does not support (e.g. 48 kHz when the plugin only supports 44.1 kHz), the plugin may display an incorrect FFT, even if the signal processing seems to work at a surface level (note the negative spike at 10 kHz in the spectrum). Here's some white noise with the TDR Prism plugin applied to it:
Expected (matching sample rates)
Actual (mismatching sample rates)
!
The issue is that while we detect sample rate mismatches between what the plugin expects/supports, we only emit a warning:
<< "(Check https://www.osstatus.com for a description)";
}
A simple workaround is to set Mixxx's sample rate to the desired rate before using such plugins1:
It would, however, be nice if we could automatically resample audio. We have a few options for that:
We could use converter audio units, see https://stackoverflow.com/a/32872368/19890279. This would likely involve some wiring, since we'd have to keep track of the additional audio units. Ideally we'd only want to add them if they are actually needed to avoid overhead if the sample rates match.
We could use some libavutil or qm-dsp function for resampling, these libraries are already used elsewhere in the Mixxx codebase. This would require looking into the corresponding libraries and investigating where it would make sense to perform the conversion in the effect audio path.
Footnotes
Though that would of course not work if plugins require different sample rates ↩
The text was updated successfully, but these errors were encountered:
fwcd
changed the title
Automatically resample if Audio Unit does not support the current sample rate
Resample audio if an Audio Unit does not support the current sample rate
Nov 17, 2024
are you sure the audio plugin doesn't support that samplerate? sounds a little weird to me if a plugin only supports 41kHz but not 48... Are we sure we're not instantiating it wrong?
warning [0x60000470e140] Could not set Audio Unit stream format to sample rate 48000 Hz and channel count 2 : -10865 (Check https://www.osstatus.com for a description)
for most Audio Unit's I've tested, which corresponds to kAudioUnitErr_PropertyNotWritable.
This came up in #13888 (comment): When Mixxx is configured to a sample rate than an AU plugin does not support (e.g. 48 kHz when the plugin only supports 44.1 kHz), the plugin may display an incorrect FFT, even if the signal processing seems to work at a surface level (note the negative spike at 10 kHz in the spectrum). Here's some white noise with the TDR Prism plugin applied to it:
The issue is that while we detect sample rate mismatches between what the plugin expects/supports, we only emit a warning:
mixxx/src/effects/backends/audiounit/audiouniteffectprocessor.mm
Lines 243 to 250 in 2f04ffc
A simple workaround is to set Mixxx's sample rate to the desired rate before using such plugins1:
It would, however, be nice if we could automatically resample audio. We have a few options for that:
libavutil
orqm-dsp
function for resampling, these libraries are already used elsewhere in the Mixxx codebase. This would require looking into the corresponding libraries and investigating where it would make sense to perform the conversion in the effect audio path.Footnotes
Though that would of course not work if plugins require different sample rates ↩
The text was updated successfully, but these errors were encountered: