atof returns double not float?

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@233 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-06-07 03:36:03 +00:00
parent 0faa06ab1a
commit cc17fa213d
1 changed files with 2 additions and 2 deletions

View File

@ -355,7 +355,7 @@ int teletone_run(teletone_generation_session_t *ts, char *cmd)
break; break;
case 'v': case 'v':
{ {
float vol = atof(cur + 2); float vol = (float)atof(cur + 2);
if (vol <= TELETONE_VOL_DB_MAX && vol >= TELETONE_VOL_DB_MIN) { if (vol <= TELETONE_VOL_DB_MAX && vol >= TELETONE_VOL_DB_MIN) {
ts->volume = vol; ts->volume = vol;
} }
@ -370,7 +370,7 @@ int teletone_run(teletone_generation_session_t *ts, char *cmd)
ts->decay_direction = 1; ts->decay_direction = 1;
break; break;
case '+': case '+':
ts->decay_factor = atof(cur + 2); ts->decay_factor = (float)atof(cur + 2);
break; break;
case 'w': case 'w':
ts->wait = atoi(cur + 2) * (ts->rate / 1000); ts->wait = atoi(cur + 2) * (ts->rate / 1000);