Seite 1 von 1

[Done] 5.20/5.21b2: GetSoundPosition #PB_Sound_Milliseconds

Verfasst: 17.11.2013 23:09
von Kurzer
Hallo,
ich bin mir nicht sicher, ob das ein Fehler ist oder nicht, aber GetSoundPosition (#Sound, #PB_Sound_Milliseconds) gibt nur alle 1000 Millisekunden einen anderen Wert zurück.
- 0
- 1000
- 2000
usw.

Und das auch, wenn man den Befehl jede Millisekunde ausführt
Mit dem Parameter #PB_Sound_Frame gibt die Funktion einen viel höher aufgelösten Wert aus.

Ist das die Standardfunktionalität?
(Fehler ist im engl. Bugforum bereits gepostet)

Code: Alles auswählen

Code:
EnableExplicit

If OpenWindow(0, #PB_Ignore, #PB_Ignore, 170, 50, "GetSoundPosition", #PB_Window_SystemMenu) ; | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
   TextGadget(1, 10, 10, 100, 20, "")
   TextGadget(2, 10, 30, 100, 20, "")
   
   InitSound()
   LoadSound(0,  "C:\Windows\Media\Windows XP-Startvorgang.wav")
   If IsSound(0)
      PlaySound(0, #PB_Sound_Loop)
         
      Repeat
         SetGadgetText(1, "MSecs: " + Str(GetSoundPosition(0, #PB_Sound_Millisecond)))
         SetGadgetText(2, "Frame: " + Str(GetSoundPosition(0, #PB_Sound_Frame)))
      Until WaitWindowEvent(1) = #PB_Event_CloseWindow
   
      StopSound(0)   
      FreeSound(0)
   EndIf
   
EndIf

[Done] 5.20/5.21b2: GetSoundPosition #PB_Sound_Milliseconds

Verfasst: 17.11.2013 23:29
von Kurzer