Basic Audio Signal Processing Library
Dependents: unzen_sample_nucleo_f746 skeleton_unzen_nucleo_f746 ifmag_noise_canceller synthesizer_f746
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:
-
freq Frequency in Hz. Fs Sampling 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 | ( | ) |
void run | ( | float * | s ) |
wave generator method
- Parameters:
-
c Pointer 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:
-
c Pointer to the buffer to output the sine signal. s Pointer 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:
-
freq Frequency in Hz.
Definition at line 42 of file oscsincos.cpp.
void setPhase | ( | float | phase ) |
set the oscillator's internal phase
- Parameters:
-
freq phase in radian.
Definition at line 49 of file oscsincos.cpp.
Generated on Tue Jul 12 2022 21:49:23 by 1.7.2