mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2026-01-25 02:08:27 +00:00
feat/106: converting playht speed option to float instead of integer (#107)
* feat/106: converting playht speed option to float instead of integer * feat/106: Using strtod * feat/106: Using strtod Signed-off-by: Rammohan Yadavalli <rammohan.yadavalli@kore.com> --------- Signed-off-by: Rammohan Yadavalli <rammohan.yadavalli@kore.com> Signed-off-by: Rammohan Yadavalli <rammohan.yadavalli@gmail.com> Co-authored-by: Rammohan Yadavalli <rammohan.yadavalli@kore.com>
This commit is contained in:
@@ -774,7 +774,10 @@ extern "C" {
|
||||
cJSON_AddStringToObject(jResult, "quality", p->quality);
|
||||
}
|
||||
if (p->speed) {
|
||||
cJSON_AddNumberToObject(jResult, "speed", atoi(p->speed));
|
||||
double val = strtod(p->speed, NULL);
|
||||
if (val != 0.0) {
|
||||
cJSON_AddNumberToObject(jResult, "speed", val);
|
||||
}
|
||||
}
|
||||
if (p->seed) {
|
||||
cJSON_AddNumberToObject(jResult, "seed", atoi(p->seed));
|
||||
|
||||
Reference in New Issue
Block a user