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:
1 parent
eec4df4b77
commit
d01991ed0f
2 files changed
+8
-2
No files matched your search
@@ -378,7 +378,10 @@ switch_status_t playht_parse_text(const std::map<std::string, std::string>& para
|
||||
cJSON_AddStringToObject(jResult, "quality", quality.c_str());
|
||||
}
|
||||
if (!speed.empty()) {
|
||||
cJSON_AddNumberToObject(jResult, "speed", atoi(speed.c_str()));
|
||||
double val = strtod(speed.c_str(), NULL);
|
||||
if (val != 0.0) {
|
||||
cJSON_AddNumberToObject(jResult, "speed", val);
|
||||
}
|
||||
}
|
||||
if (!seed.empty()) {
|
||||
cJSON_AddNumberToObject(jResult, "seed", atoi(seed.c_str()));
|
||||
|
||||
Reference in new issue
Block a user