Thread: CDROMREADAUDIO ioctl

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    19

    CDROMREADAUDIO ioctl

    hi linux-programmers,

    I played a bit with the CDROM-ioctls, really great . But now i have some problems with CDROMREADAUDIO! don't get the track of a cd to a file in raw mode... do you have some experience with this ioctl? could you post me an example, i really didn't find something suitable on the internet!

    thanks in advance
    wudmx

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    CDROMREADAUDIO takes an input pointer 'const struct cdrom_read_audio *'.
    The 'buf' field points to an output buffer
    of length 'nframes * CD_FRAMESIZE_RAW'.
    That was from a cdrom ioctl man page, and cdrom_read_audio is this
    Code:
    struct cdrom_read_audio
    {
    	union cdrom_addr addr; /* frame address */
    	u_char addr_format; /* CDROM_LBA or CDROM_MSF */
    	int nframes; /* number of 2352-byte-frames to read at once, limited by the drivers */
    	u_char *buf; /* frame buffer (size: nframes*2352 bytes) */
    };
    I don't know how to use them, but mabey that will help.
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    19
    I don't know how to use them, but mabey that will help.
    I already know this structure, should have said this in my first posting. My problem is how to use it, so an example would be really nice!

    thanks anyway
    wudmx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ioctl request to get the HW address
    By threahdead in forum Linux Programming
    Replies: 7
    Last Post: 01-03-2008, 01:34 AM
  2. Problem with TIOCMGET ioctl
    By EvilGuru in forum Linux Programming
    Replies: 4
    Last Post: 10-17-2007, 01:35 PM
  3. Replies: 6
    Last Post: 11-25-2005, 02:31 PM
  4. ioctl and keyboard leds
    By EnC in forum Linux Programming
    Replies: 1
    Last Post: 04-23-2003, 08:46 AM
  5. Questions about ioctl() or exec() family
    By PhilB in forum C Programming
    Replies: 6
    Last Post: 04-28-2002, 02:28 PM