CDreadda(3dm)
CDreadda - read digital audio data from audio CD in CD-ROM
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME CDreadda - read digital audio data from audio CD in CD-ROM SYNOPSIS #include <sys/types.h> #include <dmedia/cdaudio.h> int CDreadda(CDPLAYER* cd, CDFRAME* buf, int numframes) PARAMETERS cd A pointer to the CDPLAYER structure representing the target CD-ROM drive. buf A pointer to a buffer in which to put the data. numframe The number of frames of digital audio data to read. RETURNED VALUE If successful, this function returns the number of frames read (a nonnegative integer value). Otherwise -1 is returned and errno is set to indicated the error. A return value of 0 indicates the logical read pointer has reached the end of the audio CD data. DESCRIPTION CDreadda(3dm) reads numframes frames [see cdframe (4)] of digital audio data from an audio CD mounted in the CD-ROM drive. The digital audio data stream contains 75 frames every second. A file pointer is maintained which points at the starting location for the read. CDopen initializes the file pointer to 0. On successful completion CDreadda sets the pointer to the end of the requested data. The pointer may be set to any random location with CDseek. CDopen sets the CD-ROM drive read-ahead buffer parameters to values carefully chosen to allow continuous reading of audio data without interruption. To keep up with this data transfer and maintain an uninterrupted audio stream, numframes must be twelve. CDreadda will fail and no data will be returned if one of more of the following are true: [EAGAIN] The CD-ROM status is not STA_GOOD. [EBADF] The specified CDPLAYER is not valid. [EIO] An error occurred during the read operation. [ENXIO] The specified CD-ROM drive does not support this operation. SEE ALSO CDintro(3dm), CDclose(3dm), CDgetstatus(3dm), CDgettrackinfo(3dm), CDeject(3dm), CDframetomsf(3dm), CDframetotc(3dm), CDmsftoframe(3dm), CDopen(3dm), CDparseframe(3dm), CDseek(3dm), CDseekblock(3dm), CDseektrack(3dm), CDtctoframe(3dm) AUTHOR Mark Callow