Basic Audio Signal Processing Library

Dependents:   unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746

Embed: (wiki syntax)

« Back to documentation index

OSCSinCos Class Reference

OSCSinCos Class Reference

Sine & Cosine Oscillator. More...

#include <oscsincos.h>

Public Member Functions

 OSCSinCos (float freq, int Fs, int block_size)
 constructor
void run (float *s, float *c)
 wave generator method
void run (float *s)
 wave generator method
void setFrequency (float freq)
 set the oscillation furequncy.
void setPhase (float phase)
 set the oscillator's internal phase
float getFrequency ()
 get the oscillation furequncy.
float getPhase ()
 get the internal phase

Detailed Description

Sine & Cosine Oscillator.

Definition at line 6 of file oscsincos.h.


Constructor & Destructor Documentation

OSCSinCos ( float  freq,
int  Fs,
int  block_size 
)

constructor

Parameters:
freqFrequency in Hz.
FsSampling frequency in Hz.

Definition at line 10 of file oscsincos.cpp.


Member Function Documentation

float getFrequency (  )

get the oscillation furequncy.

Returns:
Frequency in Hz.

Definition at line 61 of file oscsincos.cpp.

float getPhase (  )

get the internal phase

Returns:
Phase in radian

Definition at line 70 of file oscsincos.cpp.

void run ( float *  s )

wave generator method

Parameters:
cPointer to the buffer to output the sine signal. count Number of sample to be generated.

Definition at line 27 of file oscsincos.h.

void run ( float *  s,
float *  c 
)

wave generator method

Parameters:
cPointer to the buffer to output the sine signal.
sPointer to the buffer to output the cosine singal. If NULL, cosine signal will be skipped. count Number of sample to be generated.

Definition at line 18 of file oscsincos.cpp.

void setFrequency ( float  freq )

set the oscillation furequncy.

Parameters:
freqFrequency in Hz.

Definition at line 42 of file oscsincos.cpp.

void setPhase ( float  phase )

set the oscillator's internal phase

Parameters:
freqphase in radian.

Definition at line 49 of file oscsincos.cpp.