static internal SoundState GetState(InternalSoundEffectInstance instance) { lock (workQueue) // TODO: it'd be nice if this wasn't synchronous { return(instance.State); } }
public WorkItem(InternalSoundEffectInstance sei, Action <InternalSoundEffectInstance, float> action, float value) { this.sei = sei; this.action = action; this.value = value; }
public void Dispose() { SoundEffectThread.Enqueue(new WorkItem(instance, WorkItem.Dispose)); instance = null; }
internal SoundEffectInstance(SoundEffect soundEffect, bool hardware) { instance = new InternalSoundEffectInstance(soundEffect, hardware); SoundEffectThread.Enqueue(new WorkItem(instance, WorkItem.Setup)); }
static internal void RestartAllRestarable() { Debug.WriteLine("SoundEffectThread.RestartAllRestartable"); // Restart on the audio queue thread Enqueue(new SoundEffectInstance.WorkItem(null, (i, v) => InternalSoundEffectInstance.RestartAllRestartable())); }
public WorkItem(InternalSoundEffectInstance sei, Action<InternalSoundEffectInstance, float> action, float value) { this.sei = sei; this.action = action; this.value = value; }
static internal SoundState GetState(InternalSoundEffectInstance instance) { lock(workQueue) // TODO: it'd be nice if this wasn't synchronous { return instance.State; } }