public override uint Start(byte ChipID, uint clock, uint FMClockValue, params object[] option) { reverb[ChipID] = new reverb((int)clock, MaxCh); distortion[ChipID] = new distortion((int)clock, MaxCh); chorus[ChipID] = new chorus((int)clock, MaxCh); ep3band[ChipID] = new fmvgen.effect.eq3band((int)clock); hpflpf[ChipID] = new fmvgen.effect.HPFLPF((int)clock, MaxCh); reversePhase[ChipID] = new fmvgen.effect.ReversePhase(); compressor[ChipID] = new fmvgen.effect.Compressor((int)clock, MaxCh); chip[ChipID] = new fmvgen.OPNA2(reverb[ChipID], distortion[ChipID], chorus[ChipID], ep3band[ChipID], hpflpf[ChipID], reversePhase[ChipID], compressor[ChipID]); if (option != null && option.Length > 0 && option[0] is Func <string, Stream> ) { if (option[0] is Func <string, Stream> ) { chip[ChipID].Init(FMClockValue, clock, false, (Func <string, Stream>)option[0]); } else if (option[0] is string) { chip[ChipID].Init(FMClockValue, clock, false, (string)option[0]); } } else { chip[ChipID].Init(FMClockValue, clock); } return(clock); }
public override uint Start(byte ChipID, uint clock) { reverb[ChipID] = new reverb((int)clock, MaxCh); distortion[ChipID] = new distortion((int)clock, MaxCh); chorus[ChipID] = new chorus((int)clock, MaxCh); ep3band[ChipID] = new fmvgen.effect.eq3band((int)clock); hpflpf[ChipID] = new fmvgen.effect.HPFLPF((int)clock, MaxCh); reversePhase[ChipID] = new fmvgen.effect.ReversePhase(); compressor[ChipID] = new fmvgen.effect.Compressor((int)clock, MaxCh); chip[ChipID] = new fmvgen.OPNA2(reverb[ChipID], distortion[ChipID], chorus[ChipID], ep3band[ChipID], hpflpf[ChipID], reversePhase[ChipID], compressor[ChipID]); chip[ChipID].Init(DefaultYM2609ClockValue, clock); return(clock); }