Go to the source code of this file.
static double parse_time |
( |
const char * |
time | ) |
|
|
static |
Definition at line 15 of file playback_control.cpp.
16 unsigned vTotal = 0, vCur = 0;
19 if (c == 0)
return (
double) (vTotal + vCur);
21 vCur = vCur * 10 + (unsigned)(c-
'0');
22 }
else if (c ==
':') {
23 if (vCur >= 60) {PFC_ASSERT(!
"Invalid input");
return 0; }
24 vTotal += vCur; vCur = 0; vTotal *= 60;
25 }
else if (c ==
'.') {
28 PFC_ASSERT(!
"Invalid input");
return 0;
static double parseFraction(const char *fraction)
bool char_is_numeric(char_t p_char)
static double parseFraction |
( |
const char * |
fraction | ) |
|
|
static |
Definition at line 3 of file playback_control.cpp.
8 v += (unsigned) ( *fraction -
'0' );
11 PFC_ASSERT( *fraction == 0 );
12 return (
double)v / (double)d;
bool char_is_numeric(char_t p_char)