Class MyEntity3DSoundEmitter
Inheritance
System.Object
MyEntity3DSoundEmitter
Assembly: Sandbox.Game.dll
Syntax
public class MyEntity3DSoundEmitter : Object, IMy3DSoundEmitter
Constructors
MyEntity3DSoundEmitter(MyEntity, Boolean, Single)
Declaration
public MyEntity3DSoundEmitter(MyEntity entity, bool useStaticList = false, float dopplerScaler = 1F)
Parameters
Type |
Name |
Description |
MyEntity |
entity |
|
System.Boolean |
useStaticList |
|
System.Single |
dopplerScaler |
|
Fields
CanPlayLoopSounds
Declaration
public bool CanPlayLoopSounds
Field Value
Type |
Description |
System.Boolean |
|
EmitterMethods
Declaration
public Dictionary<int, ConcurrentCachingList<Delegate>> EmitterMethods
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<System.Int32, ConcurrentCachingList<System.Delegate>> |
|
Properties
CustomMaxDistance
Declaration
public Nullable<float> CustomMaxDistance { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Single> |
|
CustomVolume
Declaration
public Nullable<float> CustomVolume { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Single> |
|
DebugData
Declaration
public object DebugData { get; set; }
Property Value
Type |
Description |
System.Object |
|
DopplerScaler
Declaration
public float DopplerScaler { get; }
Property Value
Type |
Description |
System.Single |
|
Entity
Declaration
public MyEntity Entity { get; set; }
Property Value
Force2D
Declaration
public bool Force2D { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Force3D
Declaration
public bool Force3D { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsPlaying
Declaration
public bool IsPlaying { get; }
Property Value
Type |
Description |
System.Boolean |
|
LastSoundData
Declaration
public MySoundData LastSoundData { get; }
Property Value
Type |
Description |
VRage.Data.Audio.MySoundData |
|
Loop
Declaration
public bool Loop { get; }
Property Value
Type |
Description |
System.Boolean |
|
Plays2D
Declaration
public bool Plays2D { get; }
Property Value
Type |
Description |
System.Boolean |
|
Sound
Declaration
public IMySourceVoice Sound { get; }
Property Value
Type |
Description |
VRage.Audio.IMySourceVoice |
|
SoundId
Declaration
public MyCueId SoundId { get; set; }
Property Value
Type |
Description |
VRage.Audio.MyCueId |
|
SoundPair
Declaration
public MySoundPair SoundPair { get; }
Property Value
SourceChannels
Declaration
public int SourceChannels { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
SourcePosition
Declaration
public Vector3D SourcePosition { get; }
Property Value
Velocity
Declaration
public Vector3 Velocity { get; }
Property Value
VolumeMultiplier
Declaration
public float VolumeMultiplier { get; set; }
Property Value
Type |
Description |
System.Single |
|
Methods
Cleanup()
Declaration
ClearEntityEmitters()
Declaration
public static void ClearEntityEmitters()
ClearSecondaryCue()
Declaration
public void ClearSecondaryCue()
FastUpdate(Boolean)
Declaration
public bool FastUpdate(bool silenced)
Parameters
Type |
Name |
Description |
System.Boolean |
silenced |
|
Returns
Type |
Description |
System.Boolean |
|
PlaySingleSound(MySoundPair, Boolean, Boolean, Boolean, Nullable<Boolean>)
Declaration
public bool PlaySingleSound(MySoundPair soundId, bool stopPrevious = false, bool skipIntro = false, bool skipToEnd = false, Nullable<bool> force3D = null)
Parameters
Type |
Name |
Description |
MySoundPair |
soundId |
|
System.Boolean |
stopPrevious |
|
System.Boolean |
skipIntro |
|
System.Boolean |
skipToEnd |
|
System.Nullable<System.Boolean> |
force3D |
|
Returns
Type |
Description |
System.Boolean |
|
PlaySingleSound(MyCueId, Boolean, Boolean, Nullable<Boolean>)
Declaration
public void PlaySingleSound(MyCueId soundId, bool stopPrevious = false, bool skipIntro = false, Nullable<bool> force3D = null)
Parameters
Type |
Name |
Description |
VRage.Audio.MyCueId |
soundId |
|
System.Boolean |
stopPrevious |
|
System.Boolean |
skipIntro |
|
System.Nullable<System.Boolean> |
force3D |
|
PlaySound(MySoundPair, Boolean, Boolean, Boolean, Boolean, Boolean, Nullable<Boolean>, Boolean)
Declaration
public bool PlaySound(MySoundPair soundId, bool stopPrevious = false, bool skipIntro = false, bool force2D = false, bool alwaysHearOnRealistic = false, bool skipToEnd = false, Nullable<bool> force3D = null, bool forcePlaySound = false)
Parameters
Type |
Name |
Description |
MySoundPair |
soundId |
|
System.Boolean |
stopPrevious |
|
System.Boolean |
skipIntro |
|
System.Boolean |
force2D |
|
System.Boolean |
alwaysHearOnRealistic |
|
System.Boolean |
skipToEnd |
|
System.Nullable<System.Boolean> |
force3D |
|
System.Boolean |
forcePlaySound |
|
Returns
Type |
Description |
System.Boolean |
|
PlaySound(Byte[], Single, Single, MySoundDimensions)
Declaration
public void PlaySound(byte[] buffer, float volume = 1F, float maxDistance = 0F, MySoundDimensions dimension)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Single |
volume |
|
System.Single |
maxDistance |
|
VRage.Data.Audio.MySoundDimensions |
dimension |
|
PlaySoundWithDistance(MyCueId, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Nullable<Boolean>)
Declaration
public bool PlaySoundWithDistance(MyCueId soundId, bool stopPrevious = false, bool skipIntro = false, bool force2D = false, bool useDistanceCheck = true, bool alwaysHearOnRealistic = false, bool skipToEnd = false, Nullable<bool> force3D = null)
Parameters
Type |
Name |
Description |
VRage.Audio.MyCueId |
soundId |
|
System.Boolean |
stopPrevious |
|
System.Boolean |
skipIntro |
|
System.Boolean |
force2D |
|
System.Boolean |
useDistanceCheck |
|
System.Boolean |
alwaysHearOnRealistic |
|
System.Boolean |
skipToEnd |
|
System.Nullable<System.Boolean> |
force3D |
|
Returns
Type |
Description |
System.Boolean |
|
PreloadSound(MySoundPair)
Declaration
public static void PreloadSound(MySoundPair soundId)
Parameters
SetPosition(Nullable<Vector3D>)
Declaration
public void SetPosition(Nullable<Vector3D> position)
Parameters
Type |
Name |
Description |
System.Nullable<Vector3D> |
position |
|
SetSound(IMySourceVoice, String)
Declaration
public void SetSound(IMySourceVoice value, string caller = null)
Parameters
Type |
Name |
Description |
VRage.Audio.IMySourceVoice |
value |
|
System.String |
caller |
|
SetVelocity(Nullable<Vector3>)
Declaration
public void SetVelocity(Nullable<Vector3> velocity)
Parameters
Type |
Name |
Description |
System.Nullable<Vector3> |
velocity |
|
StopSound(Boolean, Boolean, Boolean)
Declaration
public void StopSound(bool forced, bool cleanUp = true, bool cleanupSound = false)
Parameters
Type |
Name |
Description |
System.Boolean |
forced |
|
System.Boolean |
cleanUp |
|
System.Boolean |
cleanupSound |
|
Update()
Declaration
UpdateEntityEmitters(Boolean, Boolean, Boolean)
Declaration
public static void UpdateEntityEmitters(bool removeUnused, bool updatePlaying, bool updateNotPlaying)
Parameters
Type |
Name |
Description |
System.Boolean |
removeUnused |
|
System.Boolean |
updatePlaying |
|
System.Boolean |
updateNotPlaying |
|
Events
StoppedPlaying
Declaration
public event Action<MyEntity3DSoundEmitter> StoppedPlaying
Event Type