コード例 #1
0
ファイル: FrameContentCodec.cs プロジェクト: MRoc/puremp3
 public FrameContentCodecGeneric(CodecDescription codec)
 {
     this.codecItems         = codec.Entries;
     this.state.TextCodecSet = codec.TextCodecSet;
     this.supportedVersions  = codec.SupportedVersions;
     this.type = codec.Type;
 }
コード例 #2
0
ファイル: FrameContentCodec.cs プロジェクト: MRoc/puremp3
        public void Add(CodecDescription c)
        {
            foreach (Version v in c.SupportedVersions)
            {
                if (!codecRepository.ContainsKey(v))
                {
                    codecRepository.Add(v, new Dictionary <FrameDescription.FrameType, CodecDescription>());
                }

                if (!codecRepository[v].ContainsKey(c.Type))
                {
                    codecRepository[v].Add(c.Type, c);
                }
                else
                {
                    throw new Exception("Codec already added");
                }
            }
        }