audiotestsrc: fix rounding errors that might cause segments to be one sample too...
[platform/upstream/gstreamer.git] / gst / audiotestsrc / gstaudiotestsrc.h
index 2b51891..7372079 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_AUDIO_TEST_SRC_H__
@@ -24,6 +24,8 @@
 #include <gst/gst.h>
 #include <gst/base/gstbasesrc.h>
 
+#include <gst/audio/audio.h>
+
 G_BEGIN_DECLS
 
 
@@ -88,14 +90,6 @@ typedef struct {
   gdouble    state;         /* noise state */
 } GstRedNoise;
 
-typedef enum {
-  GST_AUDIO_TEST_SRC_FORMAT_NONE = -1,
-  GST_AUDIO_TEST_SRC_FORMAT_S16 = 0,
-  GST_AUDIO_TEST_SRC_FORMAT_S32,
-  GST_AUDIO_TEST_SRC_FORMAT_F32,
-  GST_AUDIO_TEST_SRC_FORMAT_F64
-} GstAudioTestSrcFormat;
-
 typedef struct _GstAudioTestSrc GstAudioTestSrc;
 typedef struct _GstAudioTestSrcClass GstAudioTestSrcClass;
 
@@ -117,11 +111,8 @@ struct _GstAudioTestSrc {
   gdouble freq;
 
   /* audio parameters */
-  gint channels;
-  gint samplerate;
+  GstAudioInfo info;
   gint samples_per_buffer;
-  gint sample_size;
-  GstAudioTestSrcFormat format;
 
   /*< private >*/
   gboolean tags_pushed;                        /* send tags just once ? */