comparison src/cdrom/osf/SDL_syscdrom.c @ 874:9719e7f51a3a

Date: Thu, 11 Mar 2004 18:45:17 +0900 From: Hayashi Naoyuki Subject: Re: Tru64 cdrom and pthread option fix I wrote /* Some CD-ROM drives cannot play the first 150 frames. */ in src/cdrom/osf/SDL_syscdrom.c and Some CD-ROM drives(ex. TEAC CD-532E) cannot play first 150 frames(aka gap). but this is not right. It is written in MMC that LBA = 4500*M + 75*S + F - 150.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 11 Mar 2004 12:59:41 +0000
parents 89666943c598
children e3b3130f3af8
comparison
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