{{newin|[[0.10.0]]|100|type=function}}
Gets the duration of the sound file. It may not always be sample-accurate, and it may return -1 if the duration cannot be determined at all.
== Function ==
=== Synopsis ===
<source lang="lua">
duration = Decoder:getDuration( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|duration|The duration of the sound file in seconds, or -1 if it cannot be determined.}}
== See Also ==
* [[parent::Decoder]]
* [[Source:getDuration]]
* [[SoundData:getDuration]]
[[Category:Functions]]
{{#set:Description=Gets the duration of the sound file.}}
== Other Languages ==
{{i18n|Decoder:getDuration}}