projects
/
platform
/
core
/
uifw
/
voice-control.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6304a41
)
Fix invalid volume value when recording value is zero
93/126093/1
author
Kwangyoun Kim
<ky85.kim@samsung.com>
Thu, 20 Apr 2017 05:58:16 +0000
(14:58 +0900)
committer
Kwangyoun Kim
<ky85.kim@samsung.com>
Thu, 20 Apr 2017 05:58:48 +0000
(14:58 +0900)
Change-Id: I05c815b192380c575da1b4217bd26e8f2f5c81bf
server/vcd_recorder.c
patch
|
blob
|
history
diff --git
a/server/vcd_recorder.c
b/server/vcd_recorder.c
index
4d3cb7e
..
5ba69d6
100644
(file)
--- a/
server/vcd_recorder.c
+++ b/
server/vcd_recorder.c
@@
-514,8
+514,8
@@
static float get_volume_decibel(char* data, int size)
count++;
}
- if (0 == count) {
- SLOG(LOG_ERROR, TAG_VCD, "[ERROR] N
ULL
data");
+ if (0 == count
|| 0 == square_sum
) {
+ SLOG(LOG_ERROR, TAG_VCD, "[ERROR] N
o
data");
rms = 1.0;
} else {
rms = sqrt((float)square_sum/count);