typedef struct _GstPitch GstPitch;
typedef struct _GstPitchClass GstPitchClass;
+/**
+ * GstPitchAlgorithm:
+ * @GST_PITCH_ALGORITHM_FFT: simple FFT
+ * @GST_PITCH_ALGORITHM_HPS: Harmonic Product Spectrum
+ *
+ * Pitch detection algorithm.
+ */
+typedef enum
+{
+ GST_PITCH_ALGORITHM_FFT,
+ GST_PITCH_ALGORITHM_HPS
+} GstPitchAlgorithm;
+
struct _GstPitch
{
GstBaseTransform element;
/* properties */
gboolean message; /* whether or not to post messages */
- gdouble interval; /* how many seconds between emits */
gint minfreq; /* initial frequency on scan for fundamental frequency */
gint maxfreq; /* final frequency on scan for fundamental frequency */
- gint nfft; /* number of samples taken for FFT */
-
- /* <private> */
- gint rate; /* caps variables */
- gint width;
- gint channels;
-
- gint num_frames; /* frame count (1 sample per channel) */
- /* since last emit */
+ GstPitchAlgorithm algorithm; /* current pitch detection algorithm */
kiss_fft_cfg fft_cfg;
kiss_fft_cpx *signal;
kiss_fft_cpx *spectrum;
+
+ gint * module;
};
struct _GstPitchClass