Difference between revisions of "SNDGETPOS"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Cyperium
Line 1: Line 1:
The '''_SNDGETPOS''' function returns the current playing position in seconds using a handle from [[_SNDOPEN]].
The {{KW|_SNDGETPOS}} function returns the current playing position in seconds using a handle from {{KW|_SNDOPEN}}.




''Specs:'' FUNCTION _SNDGETPOS!(handle&)
{{PageSyntax}}
:<code>{{Parameter|position}} = {{KW|_SNDGETPOS}}({{Parameter|handle&}})</code>




{{PageDescription}}
*Returns the currently playing position in seconds.
*Returns the currently playing position in seconds.
*If a sound isn't playing, it returns 0.
*If a sound isn't playing, it returns 0.
Line 11: Line 13:




''Example:'' PRINT _SNDGETPOS(h&)
{{PageExamples}}
{{CodeStart}}


{{Cl|PRINT}} {{Cl|_SNDGETPOS}}(h&)


{{CodeEnd}}


''See also:'' [[_SNDSETPOS]]






==Navigation:==
{{PageSeeAlso}}
*{{KW|_SNDSETPOS}}


[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]


[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]
{{PageNavigation}}

Revision as of 00:10, 27 February 2010

The _SNDGETPOS function returns the current playing position in seconds using a handle from _SNDOPEN.


Syntax

position = _SNDGETPOS(handle&)


Description

  • Returns the currently playing position in seconds.
  • If a sound isn't playing, it returns 0.
  • If a sound is paused, it returns the paused position.
  • For a looping sound, the value returned continues to increment and does not reset to 0 when the sound loops.


Examples

PRINT _SNDGETPOS(h&)



See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page