public PushPullObject(IAudioSource source, IAudioSink sink) { AudioSource = source; AudioSink = sink; SourceExcludeList.Add(AudioSource); }
/// <summary> /// Adds a source/sink combination to this muxer /// </summary> /// <param name="source"></param> /// <param name="sink"></param> public PushPullObject AddInputOutputSource(IAudioSource source, IAudioSink sink) { PushPullObject member = new PushPullObject(source, sink); lock (MemberLock) { Members.Add(member); } return member; }
public void RemoveSink(IAudioSink sink) { if (sink != null) { MasterWaveProvider.RemoveSink(sink); } System.Diagnostics.Debug.WriteLine("Sink Removed: " + sink.GetType()); }
/// <summary> /// Adds a source/sink combination to this muxer /// </summary> /// <param name="source"></param> /// <param name="sink"></param> public PushPullObject AddInputOutputSource(IAudioSource source, IAudioSink sink) { PushPullObject member = new PushPullObject(source, sink); lock (MemberLock) { Members.Add(member); } return(member); }
public void RemoveSink(IAudioSink sink) { lock (FSourceLock) { FSinks.Remove(sink); var notifyProcess = sink as INotifyProcess; if (notifyProcess != null) { FNotifys.Remove(notifyProcess); } } }
//add/remove sinks public void AddSink(IAudioSink sink) { lock (FSourceLock) { if (!FSinks.Contains(sink)) { FSinks.Add(sink); var notifyProcess = sink as INotifyProcess; if (notifyProcess != null) { FNotifys.Add(notifyProcess); } } System.Diagnostics.Debug.WriteLine("Sink Count: " + FSinks.Count); System.Diagnostics.Debug.WriteLine("Notify Process Count: " + FNotifys.Count); } }
//add/remove sinks public void AddSink(IAudioSink sink) { lock(FSourceLock) { if(!FSinks.Contains(sink)) { FSinks.Add(sink); var notifyProcess = sink as INotifyProcess; if(notifyProcess != null) { FNotifys.Add(notifyProcess); } } System.Diagnostics.Debug.WriteLine("Sink Count: " + FSinks.Count); System.Diagnostics.Debug.WriteLine("Notify Process Count: " + FNotifys.Count); } }
public void RemoveInputOutputSource(IAudioSource source, IAudioSink sink) { lock (MemberLock) { PushPullObject removeobject = null; foreach (PushPullObject ppo in Members) { if ((ppo.AudioSource == source) && (ppo.AudioSink == sink)) { removeobject = ppo; break; } } if (removeobject != null) { Members.Remove(removeobject); } } }
public void RemoveSink(IAudioSink sink) { lock(FSourceLock) { FSinks.Remove(sink); var notifyProcess = sink as INotifyProcess; if(notifyProcess != null) { FNotifys.Remove(notifyProcess); } } }
public static void RemoveSink(IAudioSink sink) { FAudioEngine.RemoveSink(sink); }
public static void AddSink(IAudioSink sink) { FAudioEngine.AddSink(sink); }