Very High Frequency Display on iOS

I'm trying to use AudioUnit to render a range of high-frequency sounds for an iPhone project (about 8-20 kHz), but everything above 12 kHz comes out with a very distorted and / or completely wrong tone. I visualized the image waveforms and realized that since the sampling frequency of the iPhone hardware is 44,100 Hz, smoothing is applied (my 22 kHz sine wave is more like a 100 Hz sine wave).

Is there any solution? I see a few "dog whistles" in the store, but I guess they are hardly "for real." Changing the sampling rate of AudioStreamBasicDescription doesn't seem to help much, but maybe I'm doing it wrong.

+4
source share
1 answer

You really can't handle the 22 kHz sinusoidal frequency at 44.1KB / s, and you can't increase the maximum sample rate above this, I suppose. Perhaps you can use 48 kHz, I vaguely remember that this is a supported rate.

On the other hand, you absolutely can make a square wave with a frequency of 22.05 kHz with a frequency of 44.1 fps, which will have several insanely high harmonic frequencies. Maybe the dog whistle app is working?

If absolute frequency control is not critical, you will get better results by rounding your frequencies to a multiple of the sampling frequency. That way, you can at least ensure that anti-aliasing doesn't give you low-frequency hits.

+2
source

Source: https://habr.com/ru/post/1347946/


All Articles