home *** CD-ROM | disk | FTP | other *** search
- <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
- <!-- available at http://polyglotman.sourceforge.net/ -->
-
- <html>
- <head>
- <title>"SDL_CDPlayTracks"("3") manual page</title>
- </head>
- <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
- <a href='#toc'>Table of Contents</a><p>
-
- <h2><a name='sect0' href='#toc0'>Name</a></h2>
- SDL_CDPlayTracks- Play the given CD track(s)
- <h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
- <p>
- <b>#include "SDL.h"
- <p>
- </b><b>int <b>SDL_CDPlayTracks</b></b>(<b>SDL_CD *cdrom, int start_track, int start_frame, int
- ntracks, int nframes)</b>);
- <h2><a name='sect2' href='#toc2'>Description</a></h2>
- <p>
- <b>SDL_CDPlayTracks</b> plays the given CD
- starting at track <b>start_track</b>, for <b>ntracks</b> tracks. <p>
- <b>start_frame</b> is the frame
- offset, from the beginning of the <b>start_track</b>, at which to start. <b>nframes</b>
- is the frame offset, from the beginning of the last track (<b>start_track</b>+<b>ntracks</b>),
- at which to end playing. <p>
- <b>SDL_CDPlayTracks</b> should only be called after calling
- <i><b>SDL_CDStatus</b></i> to get track information about the CD. <p>
- <blockquote><b>Note: <p>
- Data tracks
- are ignored. </blockquote>
-
- <h2><a name='sect3' href='#toc3'></b>Return Value</a></h2>
- <p>
- Returns <b>0</b>, or <b>-1</b> if there was an error.
- <h2><a name='sect4' href='#toc4'>Examples</a></h2>
- <p>
- <p>
- <br>
- <pre>CW/* assuming cdrom is a previously opened device */
- /* Play the entire CD */
- if(CD_INDRIVE(SDL_CDStatus(cdrom)))
- SDL_CDPlayTracks(cdrom, 0, 0, 0, 0);
- /* Play the first track */
- if(CD_INDRIVE(SDL_CDStatus(cdrom)))
- SDL_CDPlayTracks(cdrom, 0, 0, 1, 0);
- /* Play first 15 seconds of the 2nd track */
- if(CD_INDRIVE(SDL_CDStatus(cdrom)))
- SDL_CDPlayTracks(cdrom, 1, 0, 0, CD_FPS*15);
- </pre><p>
- <br>
-
- <h2><a name='sect5' href='#toc5'>See Also</a></h2>
- <p>
- <i><b>SDL_CDPlay</b></i>, <i><b>SDL_CDStatus</b></i>, <i><b>SDL_CD</b></i>
- <!--
-
- <p>
-
- <hr><p>
- <a name='toc'><b>Table of Contents</b></a><p>
- <ul>
- <li><a name='toc0' href='#sect0'>Name</a></li>
- <li><a name='toc1' href='#sect1'>Synopsis</a></li>
- <li><a name='toc2' href='#sect2'>Description</a></li>
- <li><a name='toc3' href='#sect3'>Return Value</a></li>
- <li><a name='toc4' href='#sect4'>Examples</a></li>
- <li><a name='toc5' href='#sect5'>See Also</a></li>
- </ul>
- </body>
- </html>
-