CDatotime(3dm) CDatotime(3dm)
NAME
CDatotime - convert ASCII string to timecode
SYNOPSIS
#include <sys/types.h>
#include <dmedia/cdaudio.h>
int CDatotime(struct cdtimecode* tc, const char* s)
PARAMETERS
tc A pointer to the struct cdtimecode in which to place the result.
s A pointer to the ASCII string to be converted. The string pointed
at by s must be at least 11 bytes long not counting the terminating
null.
RETURNED VALUE
CDatotime(3dm) returns non-zero if the string represents a valid timecode
otherwise it returns zero.
DESCRIPTION
CDatotime(3dm) converts an ASCII string of the form
"00:00:00"
representing a CD time code into a struct cdtimecode which is defined as
follows in cdaudio.h :
struct cdtimecode {
unchar mhi:4, mlo:4;
unchar shi:4, slo:4;
unchar fhi:4, flo:4;
};
Minutes, seconds and frame number are each represented by 2 BCD digits.
Any of the following separators may be used in the string: :-/#|,.;*
CDatotime(3dm) sets as many values as there are fields in the string,
starting with the minutes value, up to the maximum of three. Values
corresponding to unsupplied fields are set to zero.
SEE ALSO
CDintro(3dm), CDaddcallback(3dm), CDatomsf(3dm), CDtimetoa(3dm),
CDparseframe(3dm), cdframe(4)
AUTHOR
Mark Callow
Page 1