Commit 6f397125 authored by Sebastian Dröge's avatar Sebastian Dröge

gst/audiotestsrc/gstaudiotestsrc.*: Add float/double and int32 support to...

gst/audiotestsrc/gstaudiotestsrc.*: Add float/double and int32 support to audiotestsrc. Fixes #460422.

Original commit message from CVS:
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),
(gst_audio_test_src_src_fixate), (gst_audio_test_src_setcaps),
(gst_audio_test_src_init_sine_table),
(gst_audio_test_src_change_wave), (gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
Add float/double and int32 support to audiotestsrc. Fixes #460422.
Also set the default volume to the default value specified in the
GParamSpec.
parent ef33f2fd
2007-08-03 Sebastian Dröge <slomo@circular-chaos.org>
* gst/audiotestsrc/gstaudiotestsrc.c: (gst_audio_test_src_init),
(gst_audio_test_src_src_fixate), (gst_audio_test_src_setcaps),
(gst_audio_test_src_init_sine_table),
(gst_audio_test_src_change_wave), (gst_audio_test_src_create):
* gst/audiotestsrc/gstaudiotestsrc.h:
Add float/double and int32 support to audiotestsrc. Fixes #460422.
Also set the default volume to the default value specified in the
GParamSpec.
2007-08-03 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Jens Granseuer <jensgr at gmx dot net>
This diff is collapsed.
......@@ -71,12 +71,22 @@ typedef struct {
glong running_sum; /* Used to optimize summing of generators. */
gint index; /* Incremented each sample. */
gint index_mask; /* Index wrapped by ANDing with this mask. */
gfloat scalar; /* Used to scale within range of -1.0 to +1.0 */
gdouble scalar; /* Used to scale within range of -1.0 to +1.0 */
} GstPinkNoise;
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;
typedef void (*ProcessFunc) (GstAudioTestSrc*, guint8 *);
/**
* GstAudioTestSrc:
*
......@@ -85,7 +95,7 @@ typedef struct _GstAudioTestSrcClass GstAudioTestSrcClass;
struct _GstAudioTestSrc {
GstBaseSrc parent;
void (*process)(GstAudioTestSrc*, gint16 *);
ProcessFunc process;
/* parameters */
GstAudioTestSrcWave wave;
......@@ -95,6 +105,7 @@ struct _GstAudioTestSrc {
/* audio parameters */
gint samplerate;
gint samples_per_buffer;
GstAudioTestSrcFormat format;
/*< private >*/
gboolean tags_pushed; /* send tags just once ? */
......@@ -109,7 +120,7 @@ struct _GstAudioTestSrc {
/* waveform specific context data */
gdouble accumulator; /* phase angle */
GstPinkNoise pink;
gint16 wave_table[1024];
gdouble wave_table[1024];
};
struct _GstAudioTestSrcClass {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment