mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804387. Part 2: Fix misleading parameter name; these are NOT exactly microseconds. r=jesup
--HG-- extra : rebase_source : da23d4a4e5a9804b3c3ca19183ae048bf6012152
This commit is contained in:
parent
f42503daeb
commit
c9484fdea1
@ -35,18 +35,18 @@ const TrackRate TRACK_RATE_MAX = 1 << MEDIA_TIME_FRAC_BITS;
|
||||
typedef int32_t TrackID;
|
||||
const TrackID TRACK_NONE = 0;
|
||||
|
||||
inline TrackTicks TimeToTicksRoundUp(TrackRate aRate, StreamTime aMicroseconds)
|
||||
inline TrackTicks TimeToTicksRoundUp(TrackRate aRate, StreamTime aTime)
|
||||
{
|
||||
NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
|
||||
NS_ASSERTION(0 <= aMicroseconds && aMicroseconds <= STREAM_TIME_MAX, "Bad microseconds");
|
||||
return (aMicroseconds*aRate + (1 << MEDIA_TIME_FRAC_BITS) - 1) >> MEDIA_TIME_FRAC_BITS;
|
||||
NS_ASSERTION(0 <= aTime && aTime <= STREAM_TIME_MAX, "Bad time");
|
||||
return (aTime*aRate + (1 << MEDIA_TIME_FRAC_BITS) - 1) >> MEDIA_TIME_FRAC_BITS;
|
||||
}
|
||||
|
||||
inline TrackTicks TimeToTicksRoundDown(TrackRate aRate, StreamTime aMicroseconds)
|
||||
inline TrackTicks TimeToTicksRoundDown(TrackRate aRate, StreamTime aTime)
|
||||
{
|
||||
NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
|
||||
NS_ASSERTION(0 <= aMicroseconds && aMicroseconds <= STREAM_TIME_MAX, "Bad microseconds");
|
||||
return (aMicroseconds*aRate) >> MEDIA_TIME_FRAC_BITS;
|
||||
NS_ASSERTION(0 <= aTime && aTime <= STREAM_TIME_MAX, "Bad time");
|
||||
return (aTime*aRate) >> MEDIA_TIME_FRAC_BITS;
|
||||
}
|
||||
|
||||
inline StreamTime TicksToTimeRoundUp(TrackRate aRate, TrackTicks aTicks)
|
||||
|
Loading…
Reference in New Issue
Block a user