Sometimes in the digital domain, audio and video fall out of sync due to buffering, latency, etc.
Point a camera at the display and a microphone at the speaker. The white disk should appear simultaneously with the audible "beep". You may need to record this and examine audio and video closely in an editing program.
Code: Select all
InitSound()
LoadSound(1,"Sine1000Hz.wav")
SoundVolume(1,20)
Procedure DrawDisk()
Circle(640,360,100,#White)
PlaySound(1)
Delay(100)
StopSound(1)
Delay(900)
Box(0,0,1280,640,#Black)
EndProcedure
OpenWindow(1, 0, 0, 1280, 640, "", #PB_Window_SystemMenu)
StartDrawing(WindowOutput(1))
Box(0,0,1280,640,#Black)
AddWindowTimer(1, 1, 2000)
Repeat
event = WaitWindowEvent()
If event = #PB_Event_Timer And EventTimer() = 1
DrawDisk()
ElseIf event = #PB_Event_CloseWindow
StopDrawing()
End
EndIf
ForEver