| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsdljava.cdrom.SDLCdrom
public class SDLCdrom
Binding to the SDL Cdrom routines.
| Field Summary | |
|---|---|
(package private)  int | 
driveIndex
 | 
(package private)  SDL_CD | 
swigCdrom
 | 
| Constructor Summary | |
|---|---|
private  | 
SDLCdrom(SDL_CD swigCdrom,
         int driveIndex)
 | 
| Method Summary | |
|---|---|
 void | 
cdClose()
Close the cdrom  | 
static void | 
cdClose(SDLCdrom cdrom)
Closes a cdrom  | 
 void | 
cdEject()
Ejects a CDROM  | 
static void | 
cdEject(SDLCdrom cdrom)
Ejects a CDROM  | 
static java.lang.String | 
cdName(int drive)
Returns a human-readable, system-dependent identifier for the CD-ROM.  | 
static SDLCdrom | 
cdOpen(int drive)
Describe cdOpen method here. | 
 void | 
cdPause()
Pauses a CDROM  | 
static void | 
cdPause(SDLCdrom cdrom)
Pauses a CDROM  | 
 void | 
cdPlay(int start,
       int length)
Play a CD  | 
static void | 
cdPlay(SDLCdrom cdrom,
       int start,
       int length)
Play a CD  | 
 void | 
cdPlayTracks(int start_track,
             int start_frame,
             int ntracks,
             int nframes)
Play the given CD track(s)  | 
static void | 
cdPlayTracks(SDLCdrom cdrom,
             int start_track,
             int start_frame,
             int ntracks,
             int nframes)
Play the given CD track(s)  | 
 void | 
cdResume()
Resumes a CDROM  | 
static void | 
cdResume(SDLCdrom cdrom)
Resumes a CDROM  | 
 CDstatus | 
cdStatus()
Returns the current status of this drive.  | 
static CDstatus | 
cdStatus(SDLCdrom cdrom)
Returns the current status of the given drive.  | 
 void | 
cdStop()
Stops a CDROM  | 
static void | 
cdStop(SDLCdrom cdrom)
Stops a CDROM  | 
protected  void | 
finalize()
 | 
 int | 
getCurrentFrame()
Get the current frame offset within the track  | 
 FrameInfo | 
getCurrentFrameInfo()
 | 
 int | 
getCurrentTrack()
Get the current track  | 
 int | 
getDriveIndex()
 | 
 int | 
getId()
Get the private drive identifier  | 
 int | 
getNumTracks()
Get the number of tracks on the CD  | 
 SDL_CD | 
getSwigCdrom()
 | 
 java.util.List | 
getTracks()
Get the list of tracks  | 
static int | 
numDrives()
Returns the number of CD-ROM drives on the system.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
SDL_CD swigCdrom
int driveIndex
| Constructor Detail | 
|---|
private SDLCdrom(SDL_CD swigCdrom,
                 int driveIndex)
| Method Detail | 
|---|
public SDL_CD getSwigCdrom()
public static int numDrives()
public static java.lang.String cdName(int drive)
drive - drive is the index of the drive
public static SDLCdrom cdOpen(int drive)
                       throws SDLException
cdOpen method here.
 Opens a CD-ROM drive for access. It returns a SDL_CD structure on success, or NULL if the drive was invalid or busy. This newly opened CD-ROM becomes the default CD used when other CD functions are passed a NULL CD-ROM handle.
Drives are numbered starting with 0. Drive 0 is the system default CD-ROM.
drive - an int value
SDLCdrom value
SDLException - if an error occurspublic static CDstatus cdStatus(SDLCdrom cdrom)
If the drive has a CD in it, the table of contents of the CD and current play position of the CD will be stored in the cdrom object.
cdrom - a SDLCdrom value
CDstatus value
public static void cdPlay(SDLCdrom cdrom,
                          int start,
                          int length)
                   throws SDLException
Plays the given cdrom, starting a frame start for length frames.
cdrom - a SDLCdrom valuestart - an int valuelength - an int value
SDLException - if an error occurs
public static void cdPlayTracks(SDLCdrom cdrom,
                                int start_track,
                                int start_frame,
                                int ntracks,
                                int nframes)
                         throws SDLException
SDL_CDPlayTracks plays the given CD starting at track start_track, for ntracks tracks.
start_frame is the frame offset, from the beginning of the start_track, at which to start. nframes is the frame offset, from the beginning of the last track (start_track+ntracks), at which to end playing.
SDL_CDPlayTracks should only be called after calling SDL_CDStatus to get track information about the CD.
cdrom - a SDLCdrom valuestart_track - an int valuestart_frame - an int valuentrakcs - an int valuenframes - an int value
SDLException - if an error occurs
public static void cdPause(SDLCdrom cdrom)
                    throws SDLException
Pauses play on the given cdrom.
cdrom - a SDLCdrom value
SDLException - if an error occurs
public static void cdResume(SDLCdrom cdrom)
                     throws SDLException
Resumes play on the given cdrom.
cdrom - a SDLCdrom value
SDLException - if an error occurs
public static void cdStop(SDLCdrom cdrom)
                   throws SDLException
Stops play on the given cdrom.
cdrom - a SDLCdrom value
SDLException - if an error occurs
public static void cdEject(SDLCdrom cdrom)
                    throws SDLException
Ejects the given cdrom.
cdrom - a SDLCdrom value
SDLException - if an error occurspublic static void cdClose(SDLCdrom cdrom)
cdrom - a SDLCdrom valuepublic CDstatus cdStatus()
If the drive has a CD in it, the table of contents of the CD and current play position of the CD will be stored in the cdrom object.
cdrom - a SDLCdrom value
CDstatus value
public void cdPlay(int start,
                   int length)
            throws SDLException
Plays starting a frame start for length frames.
start - an int valuelength - an int value
SDLException - if an error occurs
public void cdPlayTracks(int start_track,
                         int start_frame,
                         int ntracks,
                         int nframes)
                  throws SDLException
SDL_CDPlayTracks plays the given CD starting at track start_track, for ntracks tracks.
start_frame is the frame offset, from the beginning of the start_track, at which to start. nframes is the frame offset, from the beginning of the last track (start_track+ntracks), at which to end playing.
SDL_CDPlayTracks should only be called after calling SDL_CDStatus to get track information about the CD.
cdrom - a SDLCdrom valuestart_track - an int valuestart_frame - an int valuentrakcs - an int valuenframes - an int value
SDLException - if an error occurs
public void cdPause()
             throws SDLException
Pauses play
cdrom - a SDLCdrom value
SDLException - if an error occurs
public void cdResume()
              throws SDLException
Resumes play
cdrom - a SDLCdrom value
SDLException - if an error occurs
public void cdStop()
            throws SDLException
Stops play
cdrom - a SDLCdrom value
SDLException - if an error occurs
public void cdEject()
             throws SDLException
Ejects the cdrom.
cdrom - a SDLCdrom value
SDLException - if an error occurspublic void cdClose()
public int getId()
public int getNumTracks()
public int getCurrentTrack()
public int getCurrentFrame()
public java.util.List getTracks()
public int getDriveIndex()
public FrameInfo getCurrentFrameInfo()
protected void finalize()
finalize in class java.lang.Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||