3 * Copyright (C) 2008 Rov Juvano <rovjuvano@users.sourceforge.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_SCALETEMPO_H__
22 #define __GST_SCALETEMPO_H__
25 #include <gst/base/gstbasetransform.h>
29 #define GST_TYPE_SCALETEMPO (gst_scaletempo_get_type())
30 #define GST_SCALETEMPO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_SCALETEMPO, GstScaletempo))
31 #define GST_SCALETEMPO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_SCALETEMPO, GstScaletempoClass))
32 #define GST_IS_SCALETEMPO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_SCALETEMPO))
33 #define GST_IS_SCALETEMPO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_SCALETEMPO))
35 typedef struct _GstScaletempo GstScaletempo;
36 typedef struct _GstScaletempoClass GstScaletempoClass;
37 typedef struct _GstScaletempoPrivate GstScaletempoPrivate;
41 GstBaseTransform element;
47 gdouble percent_overlap;
52 guint samples_per_frame; /* AKA number of channels */
53 guint bytes_per_sample;
54 guint bytes_per_frame;
58 gdouble frames_stride_scaled;
59 gdouble frames_stride_error;
61 gdouble bytes_stride_scaled;
62 guint bytes_queue_max;
68 guint samples_overlap;
69 guint samples_standing;
74 void (*output_overlap) (GstScaletempo * scaletempo, gpointer out_buf, guint bytes_off);
78 gpointer buf_pre_corr;
79 gpointer table_window;
80 guint (*best_overlap_offset) (GstScaletempo * scaletempo);
87 gboolean reinit_buffers;
90 struct _GstScaletempoClass
92 GstBaseTransformClass parent_class;
95 GType gst_scaletempo_get_type (void);
98 #endif /* __GST_SCALETEMPO_H__ */