5.3.99 _Q31sinSeries Function

Generates the sine series with the given normalizing frequency, f, and the given number of samples, num, starting from start. Stores the result in buffer, buf.

Include

<libq.h>

Prototype

short _Q31sinSeries(_Q31 f, short start, short num, _Q31 *buf);

Arguments

f a fixed-point number in Q31 format, which ranges from 0 to (231-1). The valid range of values for this argument is from -1073741824 to 1073741824. The argument represents the Normalizing frequency.
start a fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from 1 to 2147483647. This argument represents the Starting Sample number in the Sine Series.
num a fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from 1 to 2147483647. This argument represents the Number of Sine Samples the function is called to generate. Note: num should not be more than 16383 for dsPIC devices.
buf a pointer to the buffer where the generated sine samples would get copied into.

Return Value

This function returns num, the number of generated sine samples.