Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

Tone

Generates a tone with a given frequency, phase, and magnitude.

Syntax

IppStatus ippsTone_16s(Ipp16s*
pDst
, int
len
, Ipp16s
magn
, Ipp32f
rFreq
, Ipp32f*
pPhase
, IppHintAlgorithm
hint
);
IppStatus ippsTone_16sc(Ipp16sc*
pDst
, int
len
, Ipp16s
magn
, Ipp32f
rFreq
, Ipp32f*
pPhase
, IppHintAlgorithm
hint
);
IppStatus ippsTone_32f(Ipp32f*
pDst
, int
len
, Ipp32f
magn
, Ipp32f
rFreq
, Ipp32f*
pPhase
, IppHintAlgorithm
hint
);
IppStatus ippsTone_32fc(Ipp32fc*
pDst
, int
len
, Ipp32f
magn
, float
rFreq
, Ipp32f*
pPhase
, IppHintAlgorithm
hint
);
IppStatus ippsTone_64f(Ipp64f*
pDst
, int
len
, Ipp64f
magn
, Ipp64f
rFreq
, Ipp64f*
pPhase
, IppHintAlgorithm
hint
);
IppStatus ippsTone_64fc(Ipp64fc*
pDst
, int
len
, Ipp64f
magn
, Ipp64f
rFreq
, Ipp64f*
pPhase
, IppHintAlgorithm
hint
);
Include Files
ipps.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
Libraries:
ippcore.lib
,
ippvm.lib
Parameters
magn
Magnitude of the tone, that is, the maximum value attained by the wave.
pPhase
Pointer to the phase of the tone relative to a cosine wave. It must be in range [0.0, 2π). You can use the returned value to compute the next continuous data block.
rFreq
Frequency of the tone relative to the sampling frequency. It must be in the interval [0.0, 0.5) for real tone and in [0.0, 1.0) for complex tone.
pDst
Pointer to the array that stores the samples.
len
Number of samples to be computed.
hint
Suggests using specific code. The possible values for the
hint
argument are described in Hint Arguments .
Description
This function generates the tone with the specified frequency
rFreq
, phase
pPhase
, and magnitude
magn
. The function computes
len
samples of the tone, and stores them in the array
pDst
. For real tones, each generated value
x
[
n
]
is defined as:
x
[
n
] =
magn
* cos(2π
n
*
rFreq
+
phase
)
For complex tones,
x
[
n
]
is defined as:
x
[
n
] =
magn
* (cos(2π
n
*
rFreq
+
phase
)+
j
* sin(2π
n
*
rFreq
+
phase
))
The parameter
hint
suggests using specific code, which provides for either fast but less accurate calculation, or more accurate but slower execution.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when the
pDst
or
pPhase
pointer is
NULL
.
ippStsSizeErr
Indicates an error when
len
is less than, or equal to zero.
ippStsToneMagnErr
Indicates an error when
magn
is less than, or equal to zero.
ippStsToneFreqErr
Indicates an error when
rFreq
is negative, or greater than, or equal to 0.5 for real tone and to 1.0 for complex tone.
ippStsTonePhaseErr
Indicates an error when the
pPhase
value is negative, or greater than or equal to
IPP_2PI
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804