org.tritonus.lowlevel.cdda.cdparanoia
Class Cdparanoia

java.lang.Object
  extended byorg.tritonus.lowlevel.cdda.cdparanoia.Cdparanoia

public class Cdparanoia
extends Object

Reading audio CDs using libcdparanoia.


Constructor Summary
Cdparanoia(String strDevice)
           
 
Method Summary
 void close()
          Closes the device.
 String getCddaErrors()
          Gets error messages for the CDROM drive.
 int open()
          Opens and initializes the device.
 int prepareTrack(int nTrack)
           
 int readNextFrame(int nCount, byte[] abData)
          Reads one or more raw frames from the CD.
 int readTOC(int[] anValues, int[] anStartFrame, int[] anLength, int[] anType, boolean[] abAudio, boolean[] abCopy, boolean[] abPre, int[] anChannels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cdparanoia

public Cdparanoia(String strDevice)
Method Detail

open

public int open()
Opens and initializes the device. Calls cdda_open(), paranoia_init() and paranoia_modeset().

Returns:
0 on success, negative values on error.

close

public void close()
Closes the device. Calls cdda_close().


readTOC

public int readTOC(int[] anValues,
                   int[] anStartFrame,
                   int[] anLength,
                   int[] anType,
                   boolean[] abAudio,
                   boolean[] abCopy,
                   boolean[] abPre,
                   int[] anChannels)

prepareTrack

public int prepareTrack(int nTrack)

readNextFrame

public int readNextFrame(int nCount,
                         byte[] abData)
Reads one or more raw frames from the CD. This call reads nCount frames from the track that has been set by prepareTrack(). abData has to be big enough to hold the amount of data requested (2352 * nCount bytes).


getCddaErrors

public String getCddaErrors()
Gets error messages for the CDROM drive.