openfl.media

..
ID3Info

Sound

The Sound class lets you work with sound in an application. The Sound class lets you create a Sound object, load and play an external MP3 file into that object, close the sound stream, and access data about the sound, such as information about the number of bytes in the stream and ID3 metadata. More detailed control of the sound is performed through the sound source - the SoundChannel or Microphone object for the sound - and through the properties in the SoundTransform class that control the output of the sound to the computer's speakers.

SoundChannel

The SoundChannel class controls a sound in an application. Every sound is assigned to a sound channel, and the application can have multiple sound channels that are mixed together. The SoundChannel class contains a stop() method, properties for monitoring the amplitude (volume) of the channel, and a property for assigning a SoundTransform object to the channel.

SoundLoaderContext

The SoundLoaderContext class provides security checks for files that load sound. SoundLoaderContext objects are passed as an argument to the constructor and the load() method of the Sound class.

SoundTransform

The SoundTransform class contains properties for volume and panning.

Video