X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Faudiotestsrc%2Fgstaudiotestsrc.h;h=2b518912205f321bd22d8ac28c0dfc3a8a21f610;hb=refs%2Fheads%2Fmaster;hp=8c765948225cfdb7bdbf2c0e7678215be5acb11d;hpb=5368e843d0f50770b7959782e360243dff90eb8d;p=framework%2Fmultimedia%2Fgst-plugins-base0.10.git diff --git a/gst/audiotestsrc/gstaudiotestsrc.h b/gst/audiotestsrc/gstaudiotestsrc.h index 8c76594..2b51891 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.h +++ b/gst/audiotestsrc/gstaudiotestsrc.h @@ -50,6 +50,9 @@ G_BEGIN_DECLS * @GST_AUDIO_TEST_SRC_WAVE_SINE_TAB: sine wave using a table * @GST_AUDIO_TEST_SRC_WAVE_TICKS: periodic ticks * @GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE: white (zero mean) Gaussian noise; volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples. + * @GST_AUDIO_TEST_SRC_WAVE_RED_NOISE: red (brownian) noise + * @GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE: spectraly inverted pink noise + * @GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE: spectraly inverted red (brownian) noise * * Different types of supported sound waves. */ @@ -63,8 +66,11 @@ typedef enum { GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE, GST_AUDIO_TEST_SRC_WAVE_SINE_TAB, GST_AUDIO_TEST_SRC_WAVE_TICKS, - GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE -} GstAudioTestSrcWave; + GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE, + GST_AUDIO_TEST_SRC_WAVE_RED_NOISE, + GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE, + GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE +} GstAudioTestSrcWave; #define PINK_MAX_RANDOM_ROWS (30) #define PINK_RANDOM_BITS (16) @@ -78,6 +84,10 @@ typedef struct { gdouble scalar; /* Used to scale within range of -1.0 to +1.0 */ } GstPinkNoise; +typedef struct { + gdouble state; /* noise state */ +} GstRedNoise; + typedef enum { GST_AUDIO_TEST_SRC_FORMAT_NONE = -1, GST_AUDIO_TEST_SRC_FORMAT_S16 = 0, @@ -105,14 +115,14 @@ struct _GstAudioTestSrc { GstAudioTestSrcWave wave; gdouble volume; gdouble freq; - + /* audio parameters */ gint channels; gint samplerate; gint samples_per_buffer; gint sample_size; GstAudioTestSrcFormat format; - + /*< private >*/ gboolean tags_pushed; /* send tags just once ? */ GstClockTimeDiff timestamp_offset; /* base offset */ @@ -125,11 +135,12 @@ struct _GstAudioTestSrc { gint generate_samples_per_buffer; /* used to generate a partial buffer */ gboolean can_activate_pull; gboolean reverse; /* play backwards */ - + /* waveform specific context data */ GRand *gen; /* random number generator */ gdouble accumulator; /* phase angle */ GstPinkNoise pink; + GstRedNoise red; gdouble wave_table[1024]; };