Search Results for

    Show / Hide Table of Contents

    Class SoundEmitter3D

    This class represents a sound emitter in a 3D environment.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Behavior
    SoundEmitter3D
    Implements
    IDependencyObject
    Inherited Members
    Behavior.Family
    Behavior.UpdateOrder
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    Namespace: Evergine.Components.Sound
    Assembly: Evergine.Components.dll
    Syntax
    public class SoundEmitter3D : Behavior, IDependencyObject

    Constructors

    SoundEmitter3D()

    Initializes a new instance of the SoundEmitter3D class.

    Declaration
    public SoundEmitter3D()

    Fields

    Apply3D

    Applies sound 3D effects.

    Declaration
    public bool Apply3D
    Field Value
    Type Description
    bool

    Properties

    Audio

    Gets or sets the sound source.

    Declaration
    public AudioBuffer Audio { get; set; }
    Property Value
    Type Description
    AudioBuffer

    DistanceScaleFactor

    Gets or sets the distance scale factor of the sound emitter.

    Declaration
    public float DistanceScaleFactor { get; set; }
    Property Value
    Type Description
    float

    IsMuted

    Gets or sets a value indicating whether the sound emitter is muted.

    Declaration
    public bool IsMuted { get; set; }
    Property Value
    Type Description
    bool

    Loop

    Gets or sets a value indicating whether the current sound is looping.

    Declaration
    public bool Loop { get; set; }
    Property Value
    Type Description
    bool

    true if the sound is looping; otherwise, false.

    Pitch

    Gets or sets the pitch of the sound emitter.

    Declaration
    [RenderPropertyAsFInput(MinLimit = 0.01, MaxLimit = 1, AsSlider = true, DesiredChange = 0.01, DesiredLargeChange = 0.02)]
    public float Pitch { get; set; }
    Property Value
    Type Description
    float

    PlayAutomatically

    Gets or sets a value indicating whether the sound is played automatically when the SoundPath is refreshed.

    Declaration
    public bool PlayAutomatically { get; set; }
    Property Value
    Type Description
    bool

    true if [play automatically]; otherwise, false.

    PlayState

    Gets the play state of this emitter.

    Declaration
    public PlayState PlayState { get; }
    Property Value
    Type Description
    PlayState

    Volume

    Gets or sets the volume of the sound emitter.

    Declaration
    [RenderPropertyAsFInput(MinLimit = 0.01, MaxLimit = 1, AsSlider = true, DesiredChange = 0.01, DesiredLargeChange = 0.02)]
    public float Volume { get; set; }
    Property Value
    Type Description
    float

    Methods

    OnActivated()

    Invoked when the object is activated once it is attached.

    Declaration
    protected override void OnActivated()
    Overrides
    Component.OnActivated()

    OnAttached()

    Invoked when the object is attached to the system.

    Declaration
    protected override bool OnAttached()
    Returns
    Type Description
    bool

    True if everything is OK.

    Overrides
    Behavior.OnAttached()

    OnDeactivated()

    Invoked when the object is deactivated.

    Declaration
    protected override void OnDeactivated()
    Overrides
    Component.OnDeactivated()

    OnDestroy()

    Invoked when the object is about to be disposed.

    Declaration
    protected override void OnDestroy()
    Overrides
    Component.OnDestroy()

    OnDetach()

    Invoked when the object is detached.

    Declaration
    protected override void OnDetach()
    Overrides
    Behavior.OnDetach()

    OnLoaded()

    Invoked when the object is loaded.

    Declaration
    protected override void OnLoaded()
    Overrides
    Component.OnLoaded()

    Pause()

    Plays the current sound.

    Declaration
    public void Pause()

    Play()

    Plays the current sound.

    Declaration
    public void Play()

    Start()

    Invoked to start the object.

    Declaration
    protected override void Start()
    Overrides
    Component.Start()

    Stop()

    Plays the current sound.

    Declaration
    public void Stop()

    Update(TimeSpan)

    Updates 3D instance.

    Declaration
    protected override void Update(TimeSpan gameTime)
    Parameters
    Type Name Description
    TimeSpan gameTime

    The game time.

    Overrides
    Behavior.Update(TimeSpan)

    Events

    OnAudioEnd

    Event fired when the playing audio has finished.

    Declaration
    public event EventHandler<AudioBuffer> OnAudioEnd
    Event Type
    Type Description
    EventHandler<AudioBuffer>

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX