Sound.FromFile

static Sound FromFile(string filename)

Loads a sound effect from file! Currently, StereoKit supports .wav and .mp3 files. Audio is converted to mono.

   
string filename Name of the audio file! Supports .wav and .mp3 files.
RETURNS: Sound A sound object, or null if something went wrong.

Examples

Basic usage

Sound sound = Sound.FromFile("BlipNoise.wav");
sound.Play(Vec3.Zero);




Found an issue with these docs, or have some additional questions? Create an Issue on Github!