60#ifndef wb_fft_frequencies_h_
61#define wb_fft_frequencies_h_
69#pragma clang diagnostic push
70#pragma clang diagnostic ignored "-Wvarargs"
72#ifdef GU_SIMPLE_WHITEBOARD_BUFSIZE
74#define FFT_DOMINANT_NUMFREQ ((GU_SIMPLE_WHITEBOARD_BUFSIZE - sizeof(struct rms_strength) - sizeof(struct fsk_frequencies)) / sizeof(struct fft_frequency_level_pair))
76#define FFT_DOMINANT_NUMFREQ 0
79#define FSK_DEFAULT_HI 320
80#define FSK_DEFAULT_LO 200
194 int16_t *freqp = &_frequencies->left();
195 const int16_t *
const start = freqp;
196 int16_t freq =
static_cast<int16_t
>(va_arg(freqs,
int));
197 while (freq) { *freqp++ = freq; freq =
static_cast<int16_t
>(va_arg(freqs,
int)); }
198 const size_t n =
static_cast<const size_t>(freqp - start);
223 va_start(freqs,
fsk);
224 int16_t freq =
static_cast<int16_t
>(va_arg(freqs,
int));
225 int16_t *freqp = &_frequencies->left();
226 while (freq) { *freqp++ = freq; freq =
static_cast<int16_t
>(va_arg(freqs,
int)); }
232#pragma clang diagnostic pop
Main FFT Analysis Structure This structure contains all the components of the FFT analysis,...
PROPERTY(struct rms_strength, rms) PROPERTY(struct fsk_frequencies
overall RMS levels
fsk int16_t uint16_t uint16_t uint16_t fsk
fsk int16_t uint16_t uint16_t lo
fsk ARRAY_PROPERTY(struct fft_frequency_level_pair, frequencies, 0) fft_dominant_frequency(int16_t lrms=0
Array of frequency pairs ordered by level (strongest first.
fsk int16_t uint16_t uint16_t uint16_t _fsk(hi, lo, fsk)
Frequency pair for a stereo channel This struct contains a single frequency pair (in Hz) for a stereo...
PROPERTY(int16_t, left) PROPERTY(int16_t
left frequency in Hz (0 means not measured)
right fft_frequency_level_pair(int16_t l=0, int16_t r=0)
constructor with 0 Hz default values (C++ only)
FSK frequency pair and keying values This struct contains the main components of the FSK analysis.
uint16_t lo_freq() const
getter for the low frequency (C++ only)
unsigned _unused_pad
reserved for future use
float hi_ratio() const
convenience getter for the high to low FSK ratio (C++ only)
unsigned _lo_freq
low frequency (0..8191 Hz) divided by 2
void set_lo_freq(uint16_t lo=200)
setter for the low frequency FSK percentage (C++ only)
unsigned _hi_freq
high frequency (0..8191 Hz) divided by 2
unsigned _hi_percentage
FSK hi percentage (0..100 %)
uint16_t hi_freq() const
getter for the high frequency (C++ only)
uint16_t hi_percentage() const
getter for the high frequency FSK percentage (C++ only)
void set_hi_freq(uint16_t hi=320)
setter for the high frequency FSK percentage (C++ only)
void set_hi_ratio(float r)
convenience setter for the high to low FSK ratio (C++ only)
void set_hi_percentage(uint16_t percent=0)
setter for the high frequency FSK percentage (C++ only)
fsk_frequencies(uint16_t hi=320, uint16_t lo=200, uint16_t fsk=0)
constructor with default hi and low frequencies (C++ only)
RMS levels for a stereo channel pair This struct contains the RMS (root mean square) level measured f...
right rms_strength(int16_t l=0, int16_t r=0)
constructor with zero strength default values (C++ only)
PROPERTY(int16_t, left) PROPERTY(int16_t
RMS level for the left channel.
#define FSK_DEFAULT_HI
default hi frequency for fsk
#define FSK_DEFAULT_LO
default lo frequency for fsk
#define FFT_DOMINANT_NUMFREQ
no wb -> don't register size