PageRenderTime 6ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/pods/SDL/CDTrack.pod

http://github.com/PerlGameDev/SDL
Unknown | 87 lines | 50 code | 37 blank | 0 comment | 0 complexity | bff4acd7ba0bada81fbee304842d721d MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. =pod
  2. =head1 NAME
  3. SDL::CDTrack -- SDL Bindings for structure SDL_CDTrack
  4. =head1 CATEGORY
  5. Core, CDROM, Structure
  6. =head1 SYNOPSIS
  7. use SDL;
  8. use SDL::CDROM;
  9. use SDL::CD ':status';
  10. use SDL::CDTrack;
  11. SDL::init( SDL_INIT_CDROM );
  12. my $drives = SDL::CDROM::num_drives();
  13. if( $drives > 0 )
  14. {
  15. my $CD = SDL::CD->new(0); #first drive's CD
  16. if($CD)
  17. {
  18. if( $CD->status != CD_TRAYEMPTY )
  19. {
  20. my $track = SDL::CD->track(0);
  21. }
  22. }
  23. }
  24. =head1 CONSTANTS
  25. The constants are exported by default. You can avoid this by doing:
  26. use SDL::CDTrack ();
  27. and access them directly:
  28. SDL::CDTrack::SDL_AUDIO_TRACK;
  29. or by choosing the export tags below:
  30. Export tag: ':type'
  31. SDL_AUDIO_TRACK
  32. SDL_DATA_TRACK
  33. =head1 METHOD
  34. =head2 id
  35. $track->id() # 0-99
  36. Track number
  37. =head2 type
  38. $track->type() # SDL_AUDIO_TRACK or SDL_DATA_TRACK
  39. Type of track
  40. =head2 length
  41. $track->length()
  42. Length, in frames, of this track
  43. =head2 offset
  44. $track->offset()
  45. Frame offset to the beginning of this track
  46. =head1 SEE ALSO
  47. L<SDL::CDROM>, L<SDL::CD>
  48. =head1 AUTHORS
  49. See L<SDL/AUTHORS>.
  50. =cut