Urho.Audio.SoundSource Class

Sound source component with stereo position.

See Also: SoundSource

Syntax

public class SoundSource : Component

Remarks

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.

Requirements

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

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.
[read-only]
PlayingBoolean. Return whether is playing.
[read-only]
PlayPositionSByte*. Return playback position.
PositionAttrInt32. Return sound position attribute. Or Set sound position attribute.
[read-only]
SoundSound. Return sound.
[read-only]
SoundAttrResourceRef. Return sound attribute.
[read-only]
SoundTypeString. Return sound type, determines the master gain group.
[read-only]
TimePositionSingle. Return playback time position.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
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(Sound)
Play a sound.
Play(SoundStream)
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.
static
RegisterObject(Context)
Register object factory.
SetPlayingAttr(Boolean)
Set sound playing attribute
SetPlayPosition(SByte*)
Set new playback position.
SetSoundType(String)
Set sound type, determines the master gain group.
Stop()
Stop playback.
Update(Single)
Update the sound source. Perform subclass specific operations. Called by Audio.
UpdateMasterGain()
Update the effective master gain. Called internally and by Audio when the master gain changes.