This seems to prevent windows from going to sleep, and I was wondering if anyone would have a solution to this ..
Code: Select all
InitSound()
UseOGGSoundDecoder()
OpenWindow(1, 200, 200, 200, 200, "Test")
If LoadSound(0, #PB_Compiler_Home +"Examples/3D/Data/Siren.ogg")
AddWindowTimer(1, 2, 3000)
PlaySound(0)
EndIf
Repeat
Define Event = WaitWindowEvent()
If Event = #PB_Event_Timer And EventTimer() = 2
PlaySound(0)
EndIf
Until Event = #PB_Event_CloseWindow

