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


C# IDecoder类代码示例

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


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

示例1: Deserialize

        public override void Deserialize(IDecoder inStream)
        {
            base.Deserialize(inStream);

            IsMore = inStream.ReadBoolFromInt();
            Value = inStream.ReadString();
        }
开发者ID:gyantal,项目名称:SQLab,代码行数:7,代码来源:OperatorCondition.cs

示例2: Deserialize

        public override void Deserialize(IDecoder inStream)
        {
            base.Deserialize(inStream);

            ConId = inStream.ReadInt();
            Exchange = inStream.ReadString();
        }
开发者ID:gyantal,项目名称:SQLab,代码行数:7,代码来源:ContractCondition.cs

示例3: StreamedAudioBuffer

        public StreamedAudioBuffer(IDecoder decoder)
        {
            if (decoder == null)
                throw new ArgumentNullException("decoder");

            Decoder = decoder;
        }
开发者ID:johang88,项目名称:triton,代码行数:7,代码来源:StreamedAudioBuffer.cs

示例4: Deserialize

        public override void Deserialize(IDecoder inStream)
        {
            base.Deserialize(inStream);

            SecType = inStream.ReadString();
            Exchange = inStream.ReadString();
            Symbol = inStream.ReadString();
        }
开发者ID:gyantal,项目名称:SQLab,代码行数:8,代码来源:ExecutionCondition.cs

示例5: ClassKey

		public ClassKey(IDecoder dec) {
			PackageName = dec.ReadStr8() ;
			ClassName = dec.ReadStr8() ;
			Hash[0] = dec.ReadUint32() ;
			Hash[1] = dec.ReadUint32() ;	
			Hash[2] = dec.ReadUint32() ;
			Hash[3] = dec.ReadUint32() ;
			
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:9,代码来源:ClassKey.cs

示例6: ExecutionUnitTests

        public ExecutionUnitTests()
        {
            _defaultStack = new Mock<Stack>(10).Object;

            var stopDecoderMock = new Mock<IDecoder>();
            stopDecoderMock.Setup(m => m.Decode(It.IsAny<UInt64>()))
                .Returns(new Instruction { Type = InstructionType.Stop });
            _stopDecoder = stopDecoderMock.Object;
        }
开发者ID:hkra,项目名称:Computer,代码行数:9,代码来源:ExecutionUnitTests.cs

示例7: SchemaArgument

		public SchemaArgument(IDecoder dec, bool methodArg)
		{
			Dictionary<string, Object> map = dec.ReadMap() ;	
			base.PopulateData(map) ;					
				
			if (map.ContainsKey("dir")) {
				Direction = (string) map["dir"] ;			
			}	
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:9,代码来源:SchemaArgument.cs

示例8: SchemaStatistic

		public SchemaStatistic(IDecoder dec)
		{
			Dictionary<string, Object> map = dec.ReadMap() ;							
			Name = (string)  map["name"] ;
			Type = (short) short.Parse(""+map["type"]) ;
				
			if (map.ContainsKey("unit")) {
				Unit = (string) map["unit"] ;			
			}
			if (map.ContainsKey("description")) {			
				Description = (string) map["description"] ;			
			}			
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:13,代码来源:SchemaStatistic.cs

示例9: SocketServer

 /// <summary>
 /// 使用默认配置参数的构造函数
 /// </summary>
 /// <param name="handler"></param>
 public SocketServer(IServerHandler handler,IEncoder encoder, IDecoder decoder)
     : base(DefaultConfigure.SocketBufferSize, DefaultConfigure.MessageBufferSize)
 {
     if (handler == null) throw new ArgumentNullException("handler");
     if (encoder == null) throw new ArgumentNullException("encoder");
     if (decoder == null) throw new ArgumentNullException("decoder");
     this._handler = handler;
     this._protocol = new DefaultBinaryProtocol();
     this._encoder = encoder;
     this._decoder = decoder;
     this._maxMessageSize = DefaultConfigure.MaxMessageSize;
     this._maxConnections = DefaultConfigure.MaxConnections;
 }
开发者ID:zhujunxxxxx,项目名称:FastNetwork,代码行数:17,代码来源:SocketServer.cs

示例10: QMFEvent

		public QMFEvent(Session session, IDecoder dec)
		{
			Session = session ;
			ClassKey = new ClassKey(dec) ;
			Timestamp = dec.ReadInt64() ;
			Severity = (EventSeverity) dec.ReadUint8() ;
			SchemaClass sClass = Session.GetSchema(ClassKey) ;
			Arguments = new Dictionary<string, object>() ;
			
			if (sClass != null) {
				foreach (SchemaArgument arg in sClass.Arguments) {
					Arguments[arg.Name] = Session.DecodeValue(dec, arg.Type) ;	
				}
			}	
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:15,代码来源:QMFEvent.cs

示例11: ComputeSpectrogram

        /// <summary>
        /// Computes the spectogram of an audio file.
        /// </summary>
        /// <param name="decoder">The <see cref="IDecoder"/> instance.</param>
        /// <returns>Chroma image.</returns>
        public static Image ComputeSpectrogram(IDecoder decoder)
        {
            int numBands = 72;

            var image = new Image(numBands);
            var image_builder = new ImageBuilder(image);

            var chroma = new Spectrum(numBands, MIN_FREQ, MAX_FREQ, FRAME_SIZE, SAMPLE_RATE, image_builder);

            var fft = new FFT(FRAME_SIZE, OVERLAP, chroma, new LomontFFTService());
            var processor = new AudioProcessor(SAMPLE_RATE, fft);

            processor.Reset(decoder.SampleRate, decoder.Channels);
            decoder.Decode(processor, 120);
            processor.Flush();

            return image;
        }
开发者ID:wo80,项目名称:AcoustID.NET,代码行数:23,代码来源:ImageGenerator.cs

示例12: ComputeChromagram

        /// <summary>
        /// Computes the chromagram of an audio file.
        /// </summary>
        /// <param name="decoder">The <see cref="IDecoder"/> instance.</param>
        /// <returns>Chroma image.</returns>
        public static Image ComputeChromagram(IDecoder decoder)
        {
            var image = new Image(12);
            var image_builder = new ImageBuilder(image);

            var chroma_normalizer = new ChromaNormalizer(image_builder);
            var chroma_filter = new ChromaFilter(ChromaFilterCoefficients, chroma_normalizer);
            var chroma = new Chroma(MIN_FREQ, MAX_FREQ, FRAME_SIZE, SAMPLE_RATE, chroma_filter);

            var fft = new FFT(FRAME_SIZE, OVERLAP, chroma, new LomontFFTService());
            var processor = new AudioProcessor(SAMPLE_RATE, fft);

            processor.Reset(decoder.SampleRate, decoder.Channels);
            decoder.Decode(processor, 120);
            processor.Flush();

            return image;
        }
开发者ID:wo80,项目名称:AcoustID.NET,代码行数:23,代码来源:ImageGenerator.cs

示例13: Compute

        //static int MAX_FILTER_WIDTH = 20;

        public static Image Compute(string file, IDecoder decoder)
        {
            int numBands = 72;

            Image image = new Image(numBands);
            ImageBuilder image_builder = new ImageBuilder(image);
            Spectrum chroma = new Spectrum(numBands, MIN_FREQ, MAX_FREQ, FRAME_SIZE, SAMPLE_RATE, image_builder);
            FFT fft = new FFT(FRAME_SIZE, OVERLAP, chroma);
            AudioProcessor processor = new AudioProcessor(SAMPLE_RATE, fft);

            processor.Reset(decoder.SampleRate, decoder.Channels);
            decoder.Decode(processor, 120);
            processor.Flush();

            //ExportImage(image, name, 0.5);

            return image;
        }
开发者ID:gaborp,项目名称:AcoustID.NET,代码行数:20,代码来源:Spectrogram.cs

示例14: Compute

        public static Image Compute(string file, IDecoder decoder)
        {
            Image image = new Image(12);
            ImageBuilder image_builder = new ImageBuilder(image);
            ChromaNormalizer chroma_normalizer = new ChromaNormalizer(image_builder);
            ChromaFilter chroma_filter = new ChromaFilter(ChromaFilterCoefficients, chroma_normalizer);
            //Chroma chroma = new Chroma(MIN_FREQ, MAX_FREQ, FRAME_SIZE, SAMPLE_RATE, &chroma_normalizer);
            Chroma chroma = new Chroma(MIN_FREQ, MAX_FREQ, FRAME_SIZE, SAMPLE_RATE, chroma_filter);
            FFT fft = new FFT(FRAME_SIZE, OVERLAP, chroma);
            AudioProcessor processor = new AudioProcessor(SAMPLE_RATE, fft);

            processor.Reset(decoder.SampleRate, decoder.Channels);
            decoder.Decode(processor, 120);
            processor.Flush();

            //ExportImage(image, name);

            return image;
        }
开发者ID:gaborp,项目名称:AcoustID.NET,代码行数:19,代码来源:Chromagram.cs

示例15: SchemaProperty

		public SchemaProperty(IDecoder dec)
		{
			Dictionary<string, Object> map = dec.ReadMap() ;
			base.PopulateData(map) ;
			Name = (string)  map["name"] ;
			
			if (map.ContainsKey("optional")) {
				//System.Console.WriteLine("optional") ;
				Optional = (int)map["optional"] != 0 ;		
			} 
			if (map.ContainsKey("index")) {
				//System.Console.WriteLine("index") ;			
				Index = (int)map["index"] != 0 ;		
			}
			if (map.ContainsKey("access")) {
				//System.Console.WriteLine("access") ;			
				Access = (int) map["access"] ;			
			}
		
		}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:20,代码来源:SchemaProperty.cs


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