Initializes the tone generator specification structure for fixed point data.
IppStatus ippsToneInitQ15_16s(IppToneState_16s* pToneState, Ipp16s magn, Ipp16s rFreqQ15, Ipp32s phaseQ15);
pToneState |
Pointer to the tone generator specification structure. |
magn |
Magnitude of the tone, that is, the maximum value attained by the wave. |
phaseQ15 |
Phase of the tone relative to a cosine wave in Q16.15 format. It must be in the range [0, 205886]. |
rFreqQ15 |
Frequency of the tone relative to the sampling frequency in Q0.15 format. It must be in the range [0, 16383]. |
The function ippsToneInitQ15 is declared in the ipps.h file. This function initializes the tone generator structure pToneState with the specified frequency rFreqQ15, phase phaseQ15, and magnitude magn. The structure is allocated in the external buffer, the size of which must be computed by the function ippsToneGetStateSizeQ15 . Data in Q15 format are converted to the corresponding float data type that lay in the range [0, 0.5) for relative frequency and [0, 2π) for phase. Q16.15 designates that 16 bits before and 15 bits after fixed point position are used to present a 32-bit value in the fixed point format. Q0.15 designates that 0 bits before and 15 bits after fixed point position are used to present a 16-bit value in the fixed point format.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error when the pToneState pointer is NULL. |
ippStsToneMagnErr |
Indicates an error when magn is less than or equal to zero. |
ippStsToneFreqErr |
Indicates an error when rFreqQ15 is negative, or greater than 16383. |
ippStsTonePhaseErr |
Indicates an error when the phaseQ15 value is negative, or greater than 205886. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.