Skip to main content
guest
Join | Help | Sign In
Liberty BASIC Community Wiki Home
guest| Join | Help | Sign In
Liberty BASIC Community Wiki
  • Wiki Home
  • Recent Changes
  • Pages and Files
  • Members
  • Home
    • Liberty BASIC FAQ
    • Contests
    • Tutorials
    • Science
    • Shared Code
    • Tips
    • DLLs
    • PublicDomainSprites
    • Member Pages
    • Links
    • Sandbox

Get the Length of a WAVE File

Edit 0 3 …
  • 0 Tags
    • No tags
  • Notify
  • RSS
  • Backlinks
  • Source
  • Print
  • Export (PDF)
Older Version Newer Version

BillW BillW May 25, 2006

Sometimes it is useful to know the length of a wave file without having to manually check it. Since LB has no native function for determining the length of a wave file, it is useful to have a custom function for this purpose. [[code]] FUNCTION WaveLength(wave$) if wave$ = "" then exit function starttime = time$("ms") playwave wave$, sync endtime = time$("ms") time = starttime - endtime END FUNCTION [[code]] It is important to note that this function will not report the correct time if the date changes while the wave is being played.
Help · About · Pricing · Privacy · Terms · Support · Upgrade
Contributions to https://basic.wikispaces.com/ are licensed under a Creative Commons Attribution Share-Alike 2.5 License. Creative Commons Attribution Share-Alike 2.5 License
Portions not contributed by visitors are Copyright 2018 Tangient LLC
TES: The largest network of teachers in the world
Turn off "Getting Started"
  1. Home
  2. ...
Loading...