NEOLearn

Audio examples

The engine's audio examples: what each one shows, whether it runs in a browser and the command that runs it.

Updated October 20, 2026

On this page

Playing sounds and music, controlling playback, and spatial audio. There are 8 examples on this page. For the concepts behind them, see Audio.

Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.

Examples#

ExampleWhat it showsWebRun
AudioShows how to load and play an audio fileYescargo run --example audio
Audio ControlShows how to load and play an audio file, and control how it's playedYescargo run --example audio_control
DecodableShows how to create and register a custom audio source by implementing the Decodable type.Yescargo run --example decodable
PitchShows how to directly play a simple pitchYescargo run --example pitch
Play Sound EffectShows how to play a sound effect in response to an eventYescargo run --example play_sound_effect
SoundtrackShows how to play different soundtracks based on game stateYescargo run --example soundtrack
Spatial Audio 2DShows how to play spatial audio, and moving the emitter in 2DYescargo run --example spatial_audio_2d
Spatial Audio 3DShows how to play spatial audio, and moving the emitter in 3DYescargo run --example spatial_audio_3d

See also#