Function v DSP _hann _window(_: _: _:)
Creates a single-precision Hanning window.
iOS 4.0+ macOS 10.4+ Mac Catalyst 13.0+ Beta tvOS 9.0+ watchOS 2.0+ Parameters
Single-precision real output vector.
The desired window length.
parameter can have the following values:
and v DSP _hann _window(_: _: _:) functions create a Hanning window vector, and write the result to v DSP _hann _window D(_: _: _:)
, which can be multiplied by a vector using
C . v DSP _vmul
If Flag & vDSP_HANN_NORM:
W = .8165;
W = .5;
for (n = 0; n < Length; ++n)
C[n] = W * (1 - cos(2*pi*n/N));
The following code shows how to generate a Hann window.
let n = vDSP_Length(1024)
var c = [Float](repeating: 0,
The following illustrates the values of the output vector,
c See Also Vector Generation with Window Functions
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.
Learn more about using Apple's beta software