~ubuntu-branches/ubuntu/precise/gst-plugins-base0.10/precise-proposed

« back to all changes in this revision

Viewing changes to gst/audiotestsrc/gstaudiotestsrc.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-12 12:40:13 UTC
  • mfrom: (36.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20111212124013-onyadfb150d8c5dk
Tags: 0.10.35.2-2
* debian/libgstreamer-plugins-base.install:
  + Add license translations file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 * @GST_AUDIO_TEST_SRC_WAVE_SINE_TAB: sine wave using a table
51
51
 * @GST_AUDIO_TEST_SRC_WAVE_TICKS: periodic ticks
52
52
 * @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.
 
53
 * @GST_AUDIO_TEST_SRC_WAVE_RED_NOISE: red (brownian) noise
 
54
 * @GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE: spectraly inverted pink noise
 
55
 * @GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE: spectraly inverted red (brownian) noise
53
56
 *
54
57
 * Different types of supported sound waves.
55
58
 */
63
66
  GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
64
67
  GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
65
68
  GST_AUDIO_TEST_SRC_WAVE_TICKS,
66
 
  GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE
67
 
} GstAudioTestSrcWave; 
 
69
  GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE,
 
70
  GST_AUDIO_TEST_SRC_WAVE_RED_NOISE,
 
71
  GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE,
 
72
  GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE
 
73
} GstAudioTestSrcWave;
68
74
 
69
75
#define PINK_MAX_RANDOM_ROWS   (30)
70
76
#define PINK_RANDOM_BITS       (16)
78
84
  gdouble    scalar;        /* Used to scale within range of -1.0 to +1.0 */
79
85
} GstPinkNoise;
80
86
 
 
87
typedef struct {
 
88
  gdouble    state;         /* noise state */
 
89
} GstRedNoise;
 
90
 
81
91
typedef enum {
82
92
  GST_AUDIO_TEST_SRC_FORMAT_NONE = -1,
83
93
  GST_AUDIO_TEST_SRC_FORMAT_S16 = 0,
105
115
  GstAudioTestSrcWave wave;
106
116
  gdouble volume;
107
117
  gdouble freq;
108
 
    
 
118
 
109
119
  /* audio parameters */
110
120
  gint channels;
111
121
  gint samplerate;
112
122
  gint samples_per_buffer;
113
123
  gint sample_size;
114
124
  GstAudioTestSrcFormat format;
115
 
  
 
125
 
116
126
  /*< private >*/
117
127
  gboolean tags_pushed;                 /* send tags just once ? */
118
128
  GstClockTimeDiff timestamp_offset;    /* base offset */
125
135
  gint generate_samples_per_buffer;     /* used to generate a partial buffer */
126
136
  gboolean can_activate_pull;
127
137
  gboolean reverse;                  /* play backwards */
128
 
  
 
138
 
129
139
  /* waveform specific context data */
130
140
  GRand *gen;               /* random number generator */
131
141
  gdouble accumulator;                  /* phase angle */
132
142
  GstPinkNoise pink;
 
143
  GstRedNoise red;
133
144
  gdouble wave_table[1024];
134
145
};
135
146