8 v += (unsigned) ( *fraction -
'0' );
11 PFC_ASSERT( *fraction == 0 );
12 return (
double)v / (double)d;
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;
39 rv = ptr->get_length();
49 rv = ptr->get_length();
52 titleformat_object::ptr script;
display_level_basic + dynamic track titles on e.g. live streams
double playback_get_length()
Helper; retrieves length of currently playing item.
virtual bool get_now_playing(metadb_handle_ptr &p_out)=0
Retrieves now playing item handle.
static double parseFraction(const char *fraction)
virtual bool playback_format_title(titleformat_hook *p_hook, pfc::string_base &p_out, const service_ptr_t< class titleformat_object > &p_script, titleformat_text_filter *p_filter, t_display_level p_level)=0
Renders information about currently playing item.
static double parse_time(const char *time)
double playback_get_length_ex()
bool char_is_numeric(char_t p_char)
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
t_size length() const
For compatibility with old conventions.