ToggleEjectCDAudio()
Posted: Thu Apr 10, 2003 12:00 am
Code updated For 5.20+
Restored from previous forum. Originally posted by GPI.
Small procedure that open the CD, if it closed and closed it, when open.
It's a small trick: EjectCDAudio() waits until the status is changed. When a CD is open and you open it again, it will return fasten that when you open to closed cd.
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Restored from previous forum. Originally posted by GPI.
Small procedure that open the CD, if it closed and closed it, when open.
It's a small trick: EjectCDAudio() waits until the status is changed. When a CD is open and you open it again, it will return fasten that when you open to closed cd.
Code: Select all
InitAudioCD()
Procedure ToggleEjectCDAudio()
timer1=GetTickCount_()
EjectAudioCD(1)
timer1= GetTickCount_()-timer1
timer2=GetTickCount_()
EjectAudioCD(1)
timer2=GetTickCount_()-timer2
timer=timer1-timer2
If timer<0:timer=-timer:EndIf
If timer<100
EjectAudioCD(0)
EndIf
EndProcedure
Debug "toogle1"
toggleejectcdaudio()
Debug "toogle2"
toggleejectcdaudio()