Urho.Audio.SoundSource Class

Sound source component with stereo position.

See Also: SoundSource


public class SoundSource : Component


Provides support for playing back Sound.

The SoundSource components support automatic removal from the node they belong to, once playback is finished. To use, set the SoundSource.AutoRemove property on them. This may be useful when a game object plays several "fire and forget" sound effects.


Namespace: Urho.Audio
Assembly: Urho (in Urho.dll)
Assembly Versions:

The members of Urho.Audio.SoundSource are listed below.

See Also: Component

Public Constructors

Constructs a new instance of Urho.Audio.SoundSource which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Audio.SoundSource, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Audio.SoundSource linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

AttenuationSingle. Return attenuation. Or Set attenuation. 1.0 is unaltered. Used for distance attenuated playback.
AutoRemoveModeAutoRemoveMode. Return automatic removal mode on sound playback completion. Or Set to remove either the sound source component or its owner node from the scene automatically on sound playback completion. Disabled by default.
FrequencySingle. Return frequency. Or Set frequency.
GainSingle. Return gain. Or Set gain. 0.0 is silence, 1.0 is full volume.
PanningSingle. Return stereo panning. Or Set stereo panning. -1.0 is full left and 1.0 is full right.
PlayingBoolean. Return whether is playing.
PlayPositionSByte*. Return playback position.
PositionAttrInt32. Return sound position attribute. Or Set sound position attribute.
SoundSound. Return sound.
SoundAttrResourceRef. Return sound attribute.
SoundTypeString. Return sound type, determines the master gain group.
TimePositionSingle. Return playback time position.
TypeStringHash. Urho's type system type.
TypeNameString. Urho's low-level type name.
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

Mix(Int32*, UInt32, Int32, Boolean, Boolean)
Mix sound source output to a 32-bit clipping buffer. Called by Audio.
Play a sound.
Start playing a sound stream.
Play(Sound, Single)
Play a sound with specified frequency.
Play(Sound, Single, Single)
Play a sound with specified frequency and gain.
Play(Sound, Single, Single, Single)
Play a sound with specified frequency, gain and panning.
Register object factory.
Set sound playing attribute
Set new playback position.
Set sound type, determines the master gain group.
Stop playback.
Update the sound source. Perform subclass specific operations. Called by Audio.
Update the effective master gain. Called internally and by Audio when the master gain changes.