Granule calculations


Detailed Description


Functions

int kate_granule_shift (const kate_info *ki)
kate_int64_t kate_time_granule (const kate_info *ki, kate_float base, kate_float offset)
kate_float kate_granule_time (const kate_info *ki, kate_int64_t granulepos)
kate_int64_t kate_duration_granule (const kate_info *ki, kate_float duration)
kate_float kate_granule_duration (const kate_info *ki, kate_int64_t duration)


Function Documentation

kate_int64_t kate_duration_granule ( const kate_info ki,
kate_float  duration 
)

Converts a duration to a granule duration

Parameters:
ki the kate_info structure describing the granule encoding setup
duration the duration in seconds to convert to a granulepos offset
Returns:
>=0 the time corresponding to the granulepos

KATE_E_* error

kate_float kate_granule_duration ( const kate_info ki,
kate_int64_t  duration 
)

Converts a granule offset position to a time in seconds.

Parameters:
ki the kate_info structure describing the granule encoding setup
duration the granulepos offset to convert to a time
Returns:
>=0 the time corresponding to the granulepos offset

KATE_E_* error

int kate_granule_shift ( const kate_info ki  ) 

Returns the granule shift for the given stream

Parameters:
ki the kate_info structure describing the granule encoding setup
Returns:
>=0 the granule shift

KATE_E_* error

kate_float kate_granule_time ( const kate_info ki,
kate_int64_t  granulepos 
)

Converts a granule position to a time in seconds.

Parameters:
ki the kate_info structure describing the granule encoding setup
granulepos the granulepos to convert to a time
Returns:
>=0 the time corresponding to the granulepos

KATE_E_* error

kate_int64_t kate_time_granule ( const kate_info ki,
kate_float  base,
kate_float  offset 
)

Converts a base/offset pair in seconds to a granule position

Parameters:
ki the kate_info structure describing the granule encoding setup
base the base time in seconds to convert
offset the time offset in seconds to convert
Returns:
>=0 the granule corresponding to the base/offset pair

KATE_E_* error


Generated on Sun Mar 16 23:33:04 2008 for libkate by  doxygen 1.5.4