ParelVRDocs
Player site

Scripting / Reference

Audio

Types in the ParelVR.Volt.Audio namespace.

VoltAudioClip#

ParelVR.Volt.Audio.VoltAudioClip reference extends VoltObject

A sound that is part of the world. Scripts cannot load sound from files or the web.

VoltAudioClip properties#

float Length { get; }

Length of the sound in seconds.

VoltAudioMixer#

ParelVR.Volt.Audio.VoltAudioMixer reference extends VoltObject

A mixer that is part of the world.

VoltAudioMixer methods#

bool ClearFloat(string parameter)

Gives an exposed parameter back to the mixer's snapshots.

bool GetFloat(string parameter, float value)

Reads an exposed parameter of the mixer.

bool SetFloat(string parameter, float value)

Sets an exposed parameter of the mixer. Returns false when there is no such parameter.

VoltAudioSource#

ParelVR.Volt.Audio.VoltAudioSource reference extends VoltComponent

Something in the world that plays sound.

VoltAudioSource properties#

VoltAudioClip Clip { get; set; }

The sound Play starts.

bool IsPlaying { get; }

True while the source is playing.

bool Loop { get; set; }

Whether the sound starts over when it ends.

float MaxDistance { get; set; }

Distance beyond which the sound is no longer heard or stops getting quieter.

float MinDistance { get; set; }

Distance within which the sound is at full volume.

bool Mute { get; set; }

Whether the source is silenced.

float Pitch { get; set; }

Playback speed and pitch, 1 is normal.

int Priority { get; set; }

Which sources win when too many play at once: 0 is most important, 256 least.

float Spatial { get; set; }

How much the sound comes from its position: 0 is the same everywhere, 1 is fully positional.

float Time { get; set; }

Position in the sound in seconds.

float Volume { get; set; }

Loudness, 0 to 1.

VoltAudioSource methods#

void Pause()

Pauses the sound; Play continues from the same place.

void Play()

Starts the source's sound from the beginning.

void PlayOneShot(VoltAudioClip clip, float volume)

Plays a sound once on top of whatever the source is playing.

void Stop()

Stops the sound.

void UnPause()

Continues a paused sound.