当前位置: 首页>>代码示例>>C#>>正文


C# IAudioSource类代码示例

本文整理汇总了C#中IAudioSource的典型用法代码示例。如果您正苦于以下问题:C# IAudioSource类的具体用法?C# IAudioSource怎么用?C# IAudioSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAudioSource类属于命名空间,在下文中一共展示了IAudioSource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTalkTarget

        public static ITalkTarget GetTalkTarget(objectsCamera cam, IAudioSource source)
        {
            ITalkTarget talkTarget;

            switch (cam.settings.audiomodel)
            {
                default://local playback
                    talkTarget = new TalkLocal(source);
                    break;
                case "Foscam":
                    talkTarget = new TalkFoscam(cam.settings.audioip, cam.settings.audioport,
                        cam.settings.audiousername, cam.settings.audiopassword, source);
                    break;
                case "iSpyServer":
                    talkTarget = new TalkiSpyServer(cam.settings.audioip, cam.settings.audioport,
                        source);
                    break;
                case "NetworkKinect":
                    talkTarget = new TalkNetworkKinect(cam.settings.audioip, cam.settings.audioport,
                        source);
                    break;
                case "Axis":
                    talkTarget = new TalkAxis(cam.settings.audioip, cam.settings.audioport,
                        cam.settings.audiousername, cam.settings.audiopassword, source);
                    break;
                case "IP Webcam (Android)":
                    talkTarget = new TalkIPWebcamAndroid(new Uri(cam.settings.videosourcestring), source);
                    break;
            }
            return talkTarget;
        }
开发者ID:WesleyYep,项目名称:ispyconnect,代码行数:31,代码来源:TalkHelper.cs

示例2: RemoteFlacEncoder

 public RemoteFlacEncoder(IPAddress remoteAddress, IAudioSource audioSource, string targetFilename, AudioFileTag tags, int compressionLevel, TrackGain trackGain, DrMeter drMeter)
     : base(audioSource, targetFilename, tags, trackGain, drMeter)
 {
     this.AudioDest = new RemoteFlacWriter(remoteAddress, targetFilename, audioSource.PCM)
     {
         CompressionLevel = compressionLevel
     };
 }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:8,代码来源:RemoteFlacEncoder.cs

示例3: LocalMp3Encoder

 public LocalMp3Encoder(IAudioSource audioSource, string targetFilename, AudioFileTag tags, int vbrQuality, TrackGain trackGain, DrMeter drMeter)
     : base(audioSource, targetFilename, tags, trackGain, drMeter)
 {
     this.AudioDest = new LameWriter(targetFilename, audioSource.PCM)
     {
         Settings = LameWriterSettings.CreateVbr(vbrQuality)
     };
 }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:8,代码来源:LocalMp3Encoder.cs

示例4: CueToolsFlacEncoder

 public CueToolsFlacEncoder(IAudioSource audioSource, string targetFilename, AudioFileTag tags, int compressionLevel, TrackGain trackGain, DrMeter drMeter)
     : base(audioSource, targetFilename, tags, trackGain, drMeter)
 {
     this.AudioDest = new FLACWriter(targetFilename, audioSource.PCM)
     {
         CompressionLevel = compressionLevel
     };
 }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:8,代码来源:CueToolsFlacEncoder.cs

示例5: TalkAxis

 public TalkAxis(string server, int port, string username, string password, IAudioSource audioSource)
 {
     _server = server;
     _port = port;
     _audioSource = audioSource;
     _username = username;
     _password = password;
 }
开发者ID:WesleyYep,项目名称:ispyconnect,代码行数:8,代码来源:TalkAxis.cs

示例6: CreateTrackGain

 public static TrackGain CreateTrackGain(IAudioSource audioSource)
 {
     if (audioSource != null && ReplayGain.IsSupportedFormat(audioSource.PCM.SampleRate, audioSource.PCM.BitsPerSample))
     {
         return new TrackGain(audioSource.PCM.SampleRate, audioSource.PCM.BitsPerSample);
     }
     return null;
 }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:8,代码来源:DspHelper.cs

示例7: RemoteMp3VbrEncoder

 public RemoteMp3VbrEncoder(IPAddress remoteAddress, IAudioSource audioSource, string targetFilename, AudioFileTag tags, int vbrQuality, TrackGain trackGain, DrMeter drMeter)
     : base(audioSource, targetFilename, tags, trackGain, drMeter)
 {
     this.AudioDest = new RemoteMp3VbrWriter(remoteAddress, targetFilename, audioSource.PCM)
     {
         CompressionLevel = vbrQuality
     };
 }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:8,代码来源:RemoteMp3VbrEncoder.cs

示例8: AddInputOutputSource

 /// <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;
 }
开发者ID:Hitchhikrr,项目名称:Voip,代码行数:14,代码来源:AudioConferenceMixer.cs

示例9: AudioPipe

 public AudioPipe(IAudioSource source, int size, bool own, ThreadPriority priority)
     : this(source.PCM, size)
 {
     this.own = own;
     this.priority = priority;
     _source = source;
     _sampleLen = _source.Length;
     _samplePos = _source.Position;
 }
开发者ID:jeetu17,项目名称:RealTimeVoiceRecognizer,代码行数:9,代码来源:AudioPipe.cs

示例10: TestableExample

    public TestableExample(TestableGameObject parent,
        IAudioSource source,
        Sphere sphere,
        [Resource("audio/beep")] AudioClip beep)
        : base(parent)
    {
        this.source = source;
        this.beep = beep;

        this.Obj.transform.localScale = new Vector3(5, 5, 5);
    }
开发者ID:banderous,项目名称:Uniject,代码行数:11,代码来源:TestableExample.cs

示例11: FileEncoderBase

        public FileEncoderBase(IAudioSource audioSource, string targetFilename, AudioFileTag tags, TrackGain trackGain, DrMeter drMeter)
        {
            if (audioSource == null)
            {
                throw new SkipEncodingItemException("Unsupported audio source.");
            }

            this.targetFilename = targetFilename;
            this.audioSource = audioSource;
            Directory.CreateDirectory(Path.GetDirectoryName(this.targetFilename));
            this.tags = tags;
            this.trackGain = trackGain;
            this.drMeter = drMeter;
        }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:14,代码来源:FileEncoderBase.cs

示例12: LossyWAVReader

        public LossyWAVReader(IAudioSource audioSource, IAudioSource lwcdfSource)
        {
            _audioSource = audioSource;
            _lwcdfSource = lwcdfSource;

            if (_audioSource.Length != _lwcdfSource.Length)
                throw new Exception("Data not same length");
            if (_audioSource.PCM.BitsPerSample != _lwcdfSource.PCM.BitsPerSample
                || _audioSource.PCM.ChannelCount != _lwcdfSource.PCM.ChannelCount
                || _audioSource.PCM.SampleRate != _lwcdfSource.PCM.SampleRate)
                throw new Exception("FMT Data mismatch");

            scaling_factor = 1.0; // !!!! Need to read 'fact' chunks or tags here
        }
开发者ID:androidhacker,项目名称:DotNetProjs,代码行数:14,代码来源:LossyWAVReader.cs

示例13: CreateEncoderInternal

        protected override IEncoder CreateEncoderInternal(int threadNumber, FileEncodeTask task, IAudioSource audioSource)
        {
            if (threadNumber < this.localConcurrency)
            {
                return new LocalMp3Encoder(audioSource, task.TargetFilename, task.Tag, vbrQuality, task.TrackGain, task.DrMeter);
            }

            threadNumber -= Environment.ProcessorCount;

            foreach (DiscoveryServerDescriptor server in this.servers)
            {
                if (threadNumber < server.ThreadCount)
                {
                    return new RemoteMp3VbrEncoder(server.Address, audioSource, task.TargetFilename, task.Tag, this.vbrQuality, task.TrackGain, task.DrMeter);
                }
                threadNumber -= server.ThreadCount;
            }

            throw new ArgumentException("threadNumber is too large.");
        }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:20,代码来源:RemoteMp3EncoderFactory.cs

示例14: CreateEncoderInternal

        protected override IEncoder CreateEncoderInternal(int threadNumber, FileEncodeTask task, IAudioSource audioSource)
        {
            if (threadNumber < this.concurrencylevel)
            {
                return new NativeFlacEncoder(audioSource, task.TargetFilename, task.Tag, compressionLevel, task.TrackGain, task.DrMeter);
            }

            threadNumber -= this.concurrencylevel;

            foreach (DiscoveryServerDescriptor server in this.servers)
            {
                if (threadNumber < server.ThreadCount)
                {
                    return new RemoteFlacEncoder(server.Address, audioSource, task.TargetFilename, task.Tag, this.compressionLevel, task.TrackGain, task.DrMeter);
                }
                threadNumber -= server.ThreadCount;
            }

            throw new ArgumentException("threadNumber is too large.");
        }
开发者ID:karamanolev,项目名称:MusicDatabase,代码行数:20,代码来源:RemoteFlacEncoderFactory.cs

示例15: RemoveInputOutputSource

        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);
                }
            }
        }
开发者ID:Hitchhikrr,项目名称:Voip,代码行数:20,代码来源:AudioConferenceMixer.cs


注:本文中的IAudioSource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。