Пример #1
0
        public PushPullObject(IAudioSource source, IAudioSink sink)
        {
            AudioSource = source;
            AudioSink   = sink;

            SourceExcludeList.Add(AudioSource);
        }
Пример #2
0
 /// <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;
 }
Пример #3
0
        public void RemoveSink(IAudioSink sink)
        {
            if (sink != null)
            {
                MasterWaveProvider.RemoveSink(sink);
            }

            System.Diagnostics.Debug.WriteLine("Sink Removed: " + sink.GetType());
        }
Пример #4
0
        /// <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);
        }
Пример #5
0
 public void RemoveSink(IAudioSink sink)
 {
     lock (FSourceLock)
     {
         FSinks.Remove(sink);
         var notifyProcess = sink as INotifyProcess;
         if (notifyProcess != null)
         {
             FNotifys.Remove(notifyProcess);
         }
     }
 }
Пример #6
0
        //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);
            }
        }
Пример #7
0
		//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);
			}
		}
Пример #8
0
        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);
                }
            }
        }
Пример #9
0
        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);
                }
            }
        }
Пример #10
0
		public void RemoveSink(IAudioSink sink)
		{
		    lock(FSourceLock)
		    {
		        FSinks.Remove(sink);
		        var notifyProcess = sink as INotifyProcess;
		        if(notifyProcess != null)
		        {
		            FNotifys.Remove(notifyProcess);
		        }
		    }
		}
Пример #11
0
        public PushPullObject(IAudioSource source, IAudioSink sink)
        {
            AudioSource = source;
            AudioSink = sink;

            SourceExcludeList.Add(AudioSource);
        }
Пример #12
0
 public static void RemoveSink(IAudioSink sink)
 {
     FAudioEngine.RemoveSink(sink);
 }
Пример #13
0
 public static void AddSink(IAudioSink sink)
 {
     FAudioEngine.AddSink(sink);
 }