diff options
author | HÃ¥vard Graff <havard.graff@tandberg.com> | 2008-12-01 17:37:10 -0500 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-21 17:48:07 +0100 |
commit | 89cbf4fc967b897cc8c83728fae1d6979242a6d9 (patch) | |
tree | 30a6e181d108532218b56f4cf80d4b66c5561443 | |
parent | a5c79750c44eb928d142033487c39a38a0a42187 (diff) | |
download | gst-plugins-bad-89cbf4fc967b897cc8c83728fae1d6979242a6d9.tar.gz gst-plugins-bad-89cbf4fc967b897cc8c83728fae1d6979242a6d9.tar.bz2 gst-plugins-bad-89cbf4fc967b897cc8c83728fae1d6979242a6d9.zip |
[MOVED FROM GST-P-FARSIGHT] Do wierd casting of the volume to make MSVC happy
-rw-r--r-- | gst/dtmf/gstrtpdtmfdepay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/dtmf/gstrtpdtmfdepay.c b/gst/dtmf/gstrtpdtmfdepay.c index d1096c87..fad65792 100644 --- a/gst/dtmf/gstrtpdtmfdepay.c +++ b/gst/dtmf/gstrtpdtmfdepay.c @@ -228,6 +228,7 @@ gst_dtmf_src_generate_tone(GstRtpDTMFDepay *rtpdtmfdepay, DTMF_KEY key = DTMF_KEYS[payload.event]; guint32 clock_rate = 8000 /* default */; GstBaseRTPDepayload * depayload = GST_BASE_RTP_DEPAYLOAD (rtpdtmfdepay); + gint volume; clock_rate = depayload->clock_rate; @@ -237,10 +238,11 @@ gst_dtmf_src_generate_tone(GstRtpDTMFDepay *rtpdtmfdepay, GST_BUFFER_MALLOCDATA (buffer) = g_malloc(tone_size); GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); GST_BUFFER_DURATION (buffer) = payload.duration * GST_SECOND / clock_rate; + volume = payload.volume; p = (gint16 *) GST_BUFFER_MALLOCDATA (buffer); - volume_factor = pow (10, (-payload.volume) / 20); + volume_factor = pow (10, (-volume) / 20); /* * For each sample point we calculate 'x' as the |