EnableExplicit

Procedure.l GetDXSoundPosition(SoundID.l) 
  Protected *SoundObject,DXSndPosition.l 
  *SoundObject=IsSound(SoundID.l) 
  If *SoundObject 
    *DirectSoundBuffer.IDirectSoundBuffer=PeekL(*SoundObject) 
    *DirectSoundBuffer\GetCurrentPosition(@DXSndPosition,0) 
    ProcedureReturn DXSndPosition.l
    Else 
    ProcedureReturn 0
    EndIf
  EndProcedure 
; IDE Options = PureBasic 4.20 Beta 1 (Windows - x86)
; CursorPosition = 6
; Folding = -