* Waveform specific notes:
*
* ## Gaussian white noise
- *
+ *
* This waveform produces 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.
- *
+ *
* ## Ticks
- *
+ *
* This waveform is special in that it does not produce one continuous
* signal. Instead, it produces finite-length sine wave pulses (the "ticks").
* It is useful for detecting time shifts between audio signal, for example
src->wave = DEFAULT_WAVE;
gst_base_src_set_blocksize (GST_BASE_SRC (src), -1);
+#ifdef TIZEN_FEATURE_FIX_SEG_FAULT
+ g_mutex_init (&src->func_lock);
+#endif
}
static void
g_free (src->tmp);
src->tmp = NULL;
src->tmpsize = 0;
-
+#ifdef TIZEN_FEATURE_FIX_SEG_FAULT
+ g_mutex_clear (&src->func_lock);
+#endif
G_OBJECT_CLASS (parent_class)->finalize (object);
}
gst_audio_test_src_change_wave (GstAudioTestSrc * src)
{
gint idx;
-
+#ifdef TIZEN_FEATURE_FIX_SEG_FAULT
+ g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&src->func_lock);
+#endif
src->pack_func = NULL;
src->process = NULL;
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
gst_buffer_map (buffer, &map, GST_MAP_WRITE);
+#ifdef TIZEN_FEATURE_FIX_SEG_FAULT
+ g_mutex_lock (&src->func_lock);
+#endif
if (src->pack_func) {
gsize tmpsize;
} else {
src->process (src, map.data);
}
+#ifdef TIZEN_FEATURE_FIX_SEG_FAULT
+ g_mutex_unlock (&src->func_lock);
+#endif
gst_buffer_unmap (buffer, &map);
if (G_UNLIKELY ((src->wave == GST_AUDIO_TEST_SRC_WAVE_SILENCE)