mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
update for memory api changes
This commit is contained in:
parent
124a33dc95
commit
04a91237f3
2 changed files with 4 additions and 2 deletions
|
@ -547,11 +547,12 @@ gst_dtmf_src_generate_tone (GstDTMFSrcEvent * event, DTMF_KEY key,
|
|||
double i = 0;
|
||||
double amplitude, f1, f2;
|
||||
double volume_factor;
|
||||
static GstAllocationParams params = { 0, 0, 0, 1, };
|
||||
|
||||
/* Create a buffer for the tone */
|
||||
tone_size = ((duration / 1000) * sample_rate * SAMPLE_SIZE * CHANNELS) / 8;
|
||||
|
||||
buffer = gst_buffer_new_allocate (NULL, tone_size, 1);
|
||||
buffer = gst_buffer_new_allocate (NULL, tone_size, ¶ms);
|
||||
|
||||
gst_buffer_map (buffer, &map, GST_MAP_READWRITE);
|
||||
p = (gint16 *) map.data;
|
||||
|
|
|
@ -342,12 +342,13 @@ gst_dtmf_src_generate_tone (GstRtpDTMFDepay * rtpdtmfdepay,
|
|||
guint32 clock_rate = 8000 /* default */ ;
|
||||
GstRTPBaseDepayload *depayload = GST_RTP_BASE_DEPAYLOAD (rtpdtmfdepay);
|
||||
gint volume;
|
||||
static GstAllocationParams params = { 0, 0, 0, 1, };
|
||||
|
||||
clock_rate = depayload->clock_rate;
|
||||
|
||||
/* Create a buffer for the tone */
|
||||
tone_size = (payload.duration * SAMPLE_SIZE * CHANNELS) / 8;
|
||||
buf = gst_buffer_new_allocate (NULL, tone_size, 1);
|
||||
buf = gst_buffer_new_allocate (NULL, tone_size, ¶ms);
|
||||
GST_BUFFER_DURATION (buf) = payload.duration * GST_SECOND / clock_rate;
|
||||
volume = payload.volume;
|
||||
|
||||
|
|
Loading…
Reference in a new issue