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