blob: 5a71b9bbd874bcc029b78e0a1cd5897339db9571 [file] [log] [blame]
From 3db43947a7314bfdd48c43800cfc72c99664086d Mon Sep 17 00:00:00 2001
From: Chuanbing Xiang <chuanbing.xiang@mediatek.com>
Date: Wed, 18 Jan 2017 13:35:57 +0800
Subject: [PATCH] dtmf: fix the bug of volume calculation
Signed-off-by: Chuanbing Xiang <chuanbing.xiang@mediatek.com>
---
gst/dtmf/gstdtmfsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c
index 49a09e6..9d0610b 100755
--- a/gst/dtmf/gstdtmfsrc.c
+++ b/gst/dtmf/gstdtmfsrc.c
@@ -573,7 +573,7 @@ gst_dtmf_src_generate_tone (GstDTMFSrcEvent * event, DTMF_KEY key,
gst_buffer_map (buffer, &map, GST_MAP_READWRITE);
p = (gint16 *) map.data;
- volume_factor = pow (10, (-event->volume) / 20);
+ volume_factor = pow (10.0, (-(double)event->volume) / 20.0);
/*
* For each sample point we calculate 'x' as the
--
1.9.1