Function

CMTimeMultiplyByFloat64(_:multiplier:)

Returns the product of a `CMTime` and a 64-bit float.

Parameters

`time`

The `CMTime` that will be multiplied.

`multiplier`

A 64-bit float. `CMTime time` and `multiplier` will be multiplied.

Return Value

The product of the `CMTime` and the 64-bit float.

Discussion

The result will initially have the same timescale as the CMTime operand. If the result timescale is less than 65536, it will be repeatedly doubled until it is at least 65536. If the result value overflows, the result timescale will be repeatedly halved until the result value no longer overflows. Again, default rounding will be applied when converting the result to this timescale. If the result value still overflows when timescale == 1, then the result will be either positive or negative infinity, depending on the direction of the overflow. If any rounding occurs for any reason, the result's `hasBeenRounded` flag will be set. This flag will also be set if the `CMTime` operand has `hasBeenRounded` set. If the `CMTime` operand is invalid, the result will be invalid. If the `CMTime` operand is valid, but infinite, the result will be infinite, and of an appropriate sign, given the signs of both operands. If the `CMTime` operand is valid, but indefinite, the result will be indefinite.

Performing Common Operations

`func CMTimeAdd(CMTime, CMTime) -> CMTime`

Returns the sum of two `CMTimes`.

`func CMTimeSubtract(CMTime, CMTime) -> CMTime`

Returns the difference of two `CMTimes`.

`func CMTimeMultiply(CMTime, multiplier: Int32) -> CMTime`

Returns the product of a `CMTime` and a 32-bit integer.

`func CMTimeMultiplyByRatio(CMTime, multiplier: Int32, divisor: Int32) -> CMTime`

Returns the result of multiplying a `CMTime` by an integer, then dividing by another integer.

`func CMTimeConvertScale(CMTime, timescale: Int32, method: CMTimeRoundingMethod) -> CMTime`

Returns a new `CMTime` containing the source `CMTime` converted to a new timescale (rounding as requested).