Bug 938022. Part 4: Add MediaTimeToMicroseconds. r=cpearce

--HG--
extra : rebase_source : 4c28f1b4babfbccc86bdacb9cc54810a307da8bb
This commit is contained in:
Robert O'Callahan 2013-11-26 00:57:26 +13:00
parent c4937693dc
commit be6224b575

View File

@ -40,6 +40,11 @@ inline double MediaTimeToSeconds(MediaTime aTime)
return aTime*(1.0/(1 << MEDIA_TIME_FRAC_BITS));
}
inline int64_t MediaTimeToMicroseconds(MediaTime aTime)
{
return aTime*(1000000.0/(1 << MEDIA_TIME_FRAC_BITS));
}
/**
* A number of ticks at a rate determined by some underlying track (e.g.
* audio sample rate). We want to make sure that multiplying TrackTicks by