diff --git a/MLEM/Misc/SoundEffectInfo.cs b/MLEM/Misc/SoundEffectInfo.cs
index 1dc99a7..ad923ef 100644
--- a/MLEM/Misc/SoundEffectInfo.cs
+++ b/MLEM/Misc/SoundEffectInfo.cs
@@ -55,11 +55,12 @@ namespace MLEM.Misc {
///
/// Data about the listener
/// The position to play the sound at
+ /// Whether to loop the sound effect instance
/// The emitter's doppler scale, defaults to 1
/// The emitter's forward vector, defaults to
/// The emitter's up vector, defaults to
/// The emitter's velocity, defaults to
- public void Play3D(AudioListener listener, Vector3 pos, float? dopplerScale = null, Vector3? forward = null, Vector3? up = null, Vector3? velocity = null) {
+ public SoundEffectInstance Play3D(AudioListener listener, Vector3 pos, bool loop = false, float? dopplerScale = null, Vector3? forward = null, Vector3? up = null, Vector3? velocity = null) {
if (this.emitter == null)
this.emitter = new AudioEmitter();
this.emitter.Position = pos;
@@ -69,8 +70,10 @@ namespace MLEM.Misc {
this.emitter.Velocity = velocity ?? Vector3.Zero;
var inst = this.CreateInstance();
+ inst.IsLooped = loop;
inst.Apply3D(listener, this.emitter);
inst.Play();
+ return inst;
}
///