[][src]Function discid_sys::discid_put

pub unsafe extern "C" fn discid_put(
    d: *mut DiscId,
    first: c_int,
    last: c_int,
    offsets: *mut c_int
) -> c_int

Provides the TOC of a known CD.

This function may be used if the TOC has been read earlier and you want to calculate the disc ID afterwards, without accessing the disc drive. It replaces the discid_read function in this case.

On error, this function returns false and sets the error message which you can access using discid_get_error_msg(). In this case, the other functions won't return meaningful values and should not be used.

The offsets parameter points to an array which contains the track offsets for each track. The first element, offsets[0], is the leadout track. It must contain the total number of sectors on the disc.

For discs with additional data tracks, the trailing data tracks should be ignored. offset[0] should then be the last sector of the last audio track. Make sure the length of the last audio track as returned by libdiscid after a put is the same as the length of your last audio track. Depending on your tools you might need to substract 11400 (2:32 min.). See also: Disc ID Calculation

@param d a DiscID object created by discid_new() @param first the number of the first audio track on disc (usually one) @param last the number of the last audio track on the disc @param offsets a pointer to an array of 100 track offsets @return true if the given data was valid, and false on error