How to implement FFT to find an audio segment within another using audio data

I’d like to implement a feature in my mac/win desktop apps to allow it to find the audio of a small WAV within a larger WAV, and if found, return the offset in samples. Searching the internet I’ve found how FFT (Fast Fourier transform) can be used to calculate this offset. I found this forum post, but Christian tells me the MBS FFT methods are old (deprecated) and I’m not sure they would cover my requirement.

The closest I’ve found that looks to do what I need is written in Python shown in this blog post. It uses the Python library Signal within SciPy for the call:

c = signal.correlate(y_within, y_find[:sr_within*window], mode='valid', method='fft')

Full code here.

I also found this StackExchange post which uses cross-correlation to perform this task. In the following code it uses a FFT and inverse FFT ifft function, not sure if this is C or what library it refers to.

corr(a, b) = ifft(fft(a_and_zeros) * fft(b_and_zeros[reversed]))

As I don’t want to require my users to install Python libraries to allow my app to call them from some kind of shell script, can anyone offer a way to perform this function within Xojo, or possibly a shared lib I can call via a declare that is available for commercial apps on mac(Intel/ARM) and Windows? I’ve written the code to read the audio data from WAV files with various bit depths and encodings.

Apologies if my terminologies aren’t altogether correct, I’m new to FFT and Python.

Thanks, Mark