private/super_tone_rx.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #if !defined(_SPANDSP_PRIVATE_SUPER_TONE_RX_H_)
00029 #define _SPANDSP_PRIVATE_SUPER_TONE_RX_H_
00030
00031 #define BINS 128
00032
00033 struct super_tone_rx_segment_s
00034 {
00035 int f1;
00036 int f2;
00037 int recognition_duration;
00038 int min_duration;
00039 int max_duration;
00040 };
00041
00042 struct super_tone_rx_descriptor_s
00043 {
00044 int used_frequencies;
00045 int monitored_frequencies;
00046 int pitches[BINS/2][2];
00047 int tones;
00048 super_tone_rx_segment_t **tone_list;
00049 int *tone_segs;
00050 goertzel_descriptor_t *desc;
00051 };
00052
00053 struct super_tone_rx_state_s
00054 {
00055 super_tone_rx_descriptor_t *desc;
00056 float energy;
00057 int detected_tone;
00058 int rotation;
00059 tone_report_func_t tone_callback;
00060 void (*segment_callback)(void *data, int f1, int f2, int duration);
00061 void *callback_data;
00062 super_tone_rx_segment_t segments[11];
00063 goertzel_state_t state[];
00064 };
00065
00066 #endif
00067