Sound System
OSL provides a comprehensive sound system for loading, playing, and manipulating audio in your applications.
Note: Sound handling requires OriginOS version 4.6.4 or later.
Basic Commands
Loading Sounds
Load a sound into RAM from a URL or data URI:
Playback Control
Sound Properties
Sound Information Methods
Multiple Sound Support
You can pass multiple sounds in an array to apply commands to multiple sounds simultaneously:
Example Usage
Basic Sound Player
Advanced Sound Control
Sound Progress Tracker
Important Notes
Always check if sounds are loaded before playing
Sound URLs can be external or data URIs
Volume values range from 0 to 1
Default playback speed is 1
Multiple sounds can be controlled simultaneously using arrays
Sound names must be unique when loading
Memory management is important - clear unused sounds
Sound availability depends on browser and system support
Last updated
Was this helpful?