src/cdrom/osf/SDL_syscdrom.c
changeset 874 9719e7f51a3a
parent 873 89666943c598
child 1019 e3b3130f3af8
equal deleted inserted replaced
873:89666943c598 874:9719e7f51a3a
   391  */
   391  */
   392     struct cd_play_audio_msf msf;
   392     struct cd_play_audio_msf msf;
   393     int end;
   393     int end;
   394 
   394 
   395     bzero(&msf, sizeof(msf));
   395     bzero(&msf, sizeof(msf));
   396     start += 150; /* Some CD-ROM drives cannot play the first 150 frames. */
       
   397     end = start +length;
   396     end = start +length;
   398     FRAMES_TO_MSF(start,
   397     FRAMES_TO_MSF(start + 150, /* LBA = 4500*M + 75*S + F - 150 */
   399 		  &msf.msf_starting_M_unit,
   398 		  &msf.msf_starting_M_unit,
   400 		  &msf.msf_starting_S_unit,
   399 		  &msf.msf_starting_S_unit,
   401 		  &msf.msf_starting_F_unit);
   400 		  &msf.msf_starting_F_unit);
   402     FRAMES_TO_MSF(end,
   401     FRAMES_TO_MSF(end + 150, /* LBA = 4500*M + 75*S + F - 150 */
   403 		  &msf.msf_ending_M_unit,
   402 		  &msf.msf_ending_M_unit,
   404 		  &msf.msf_ending_S_unit,
   403 		  &msf.msf_ending_S_unit,
   405 		  &msf.msf_ending_F_unit);
   404 		  &msf.msf_ending_F_unit);
   406 
   405 
   407     return(ioctl(cdrom->id, CDROM_PLAY_AUDIO_MSF, &msf));
   406     return(ioctl(cdrom->id, CDROM_PLAY_AUDIO_MSF, &msf));
   447 	}
   446 	}
   448 	SDL_numcds = 0;
   447 	SDL_numcds = 0;
   449     }
   448     }
   450 }
   449 }
   451 
   450 
       
   451