コード例 #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;
			}
		}