public outputFormatAudio(int tag, int type, ref int index, bool Force035 = false) : this(Force035){ this.componentTag = new epgAudioComponentTag(tag); this.streamType = new epgAudioStreamType(type); Debug.Assert(this.streamType.value > 0); this.componentType = new epgAudioComponentType(this.streamType.GetComponentType(index)); this.mainFlag = new epgMainFlag(0); this.quority = new epgAudioQuority(2); this.samplingRate = new epgAudioSamplingRate(5); AudioCodeClass au = new AudioCodeClass(); this.mainCode = new epgAudioCode(index, au); this.name = new epgAudioName(au.GetName(this.mainCode.value)); if (this.componentType.IsDualMono()) { this.subCode = new epgAudioCode(index + 1, au); this.name.SetSubName(au.GetName(this.subCode.value)); this.esMultiFlag = new epgAudioMultiLingul(1); } else { this.esMultiFlag = new epgAudioMultiLingul(0); this.subCode = null; // new epgAudioCode(0); } // とりあえず simul group は、なし、00、01、10、FF を回してみる。 Int32 simul = valuesOfSimulGroup[index % valuesOfSimulGroup.Count()]; this.simulGroup = new epgAudioSimulGroup(simul); // return true; }
/* * MPEG2AAC(LC) ... モノ、ステレオ、デュアルモノ、5.1 * MPEG4AAC ... ステレオ、5.1、7.1ch、22.2ch * MPEG4ALS ... ステレオ、5.1 * */ public bool makeTestDataSound(Int32 esNumber, ref Int32 counter, ref Int32 soundKindCounter, ref Int32 soundNameCounter, bool multiFlag, bool dualMonoFlag) { this.tag = new epgTag(0xc4); Int32 es = 0x10; if (esNumber != 1) { es = 0x11; } this.componentTag = new epgAudioComponentTag(es); audioComponentStruct compo = getNextComponent(ref soundKindCounter, dualMonoFlag); this.componentType = new epgAudioComponentType(compo.type); this.esMultiFlag = new epgAudioMultiLingul((this.componentType.IsDualMono() == true) ? 1 : 0); if (esNumber == 1) { this.mainFlag = new epgMainFlag(1); } else { this.mainFlag = new epgMainFlag(0); } this.quority = new epgAudioQuority(1); this.samplingRate = new epgAudioSamplingRate(((soundKindCounter % 2) == 1)?(5):(7)); Int32 code = soundNameCounter % Enum.GetValues(typeof(AUDIOCODE)).Length; this.mainCode = new epgAudioCode((Int32)(Enum.GetValues(typeof(AUDIOCODE))).GetValue(code)); this.name.main = getAudoNameFromCode(this.mainCode.value, soundNameCounter); soundNameCounter++; if (compo.existSub != true) { this.subCode = null; } else { compo = getNextComponent(ref soundKindCounter, dualMonoFlag); code = soundNameCounter % Enum.GetValues(typeof(AUDIOCODE)).Length; this.subCode = new epgAudioCode((Int32)(Enum.GetValues(typeof(AUDIOCODE))).GetValue(code)); // new epgAudioCode((epgAudioCode.AUDIOCODE)Enum.ToObject(typeof(epgAudioCode.AUDIOCODE), code)); this.name.sub = getAudoNameFromCode(this.subCode.value, soundNameCounter); soundNameCounter++; } this.streamType = new epgAudioStreamType(0x0f); return(true); }
public outputFormatAudio(bool Force035 = false) { this.bForce035 = Force035; this.paramList = new List <epgUnit>(); this.tag = new epgTag(0xc4); this.componentTag = new epgAudioComponentTag(0x10); this.componentType = new epgAudioComponentType(3); this.esMultiFlag = new epgAudioMultiLingul(0); this.mainFlag = new epgMainFlag(1); this.quority = new epgAudioQuority(2); this.samplingRate = new epgAudioSamplingRate(5); this.mainCode = new epgAudioCode(AUDIOCODE.JAPANESE); this.subCode = null; // new epgAudioCode(0); this.name = new epgAudioName("日本語"); this.streamType = new epgAudioStreamType(0x0f); this.simulGroup = new epgAudioSimulGroup(-1); }