package mz700_tape_wav_gen type MachineType uint8 const ( MACHINE_MZ_700 MachineType = iota MACHINE_MZ_80K MachineType = iota MACHINE_MZ_80A MachineType = iota MACHINE_MZ_80B MachineType = iota MACHINE_MZ_800 MachineType = iota ) type machineRelatedConfig struct { Unsupported bool ShortPulseSampleHigh int ShortPulseSampleTotal int LongPulseSampleHigh int LongPulseSampleTotal int LongGapSize int ShortGapSize int ShortTapemarkSize int LongTapemarkSize int TapemarkEndLongPulse int } func getMachineRelatedConfigByType(mt MachineType) machineRelatedConfig { switch mt { case MACHINE_MZ_700: return machineRelatedConfig{ Unsupported: false, ShortPulseSampleHigh: 10, ShortPulseSampleTotal: 21, LongPulseSampleHigh: 20, LongPulseSampleTotal: 42, LongGapSize: 22000, ShortGapSize: 11000, ShortTapemarkSize: 20, LongTapemarkSize: 40, TapemarkEndLongPulse: 1, } case MACHINE_MZ_80K: return machineRelatedConfig{ Unsupported: false, ShortPulseSampleHigh: 10, ShortPulseSampleTotal: 21, LongPulseSampleHigh: 20, LongPulseSampleTotal: 42, LongGapSize: 22000, ShortGapSize: 11000, ShortTapemarkSize: 20, LongTapemarkSize: 40, TapemarkEndLongPulse: 1, } case MACHINE_MZ_80A: return machineRelatedConfig{ Unsupported: false, ShortPulseSampleHigh: 10, ShortPulseSampleTotal: 21, LongPulseSampleHigh: 20, LongPulseSampleTotal: 42, LongGapSize: 22000, ShortGapSize: 11000, ShortTapemarkSize: 20, LongTapemarkSize: 40, TapemarkEndLongPulse: 1, } case MACHINE_MZ_80B: return machineRelatedConfig{ Unsupported: false, ShortPulseSampleHigh: 7, ShortPulseSampleTotal: 14, LongPulseSampleHigh: 15, LongPulseSampleTotal: 30, LongGapSize: 10000, ShortGapSize: 5000, ShortTapemarkSize: 20, LongTapemarkSize: 40, TapemarkEndLongPulse: 1, } case MACHINE_MZ_800: return machineRelatedConfig{ Unsupported: false, ShortPulseSampleHigh: 11, ShortPulseSampleTotal: 23, LongPulseSampleHigh: 21, LongPulseSampleTotal: 43, LongGapSize: 22000, ShortGapSize: 11000, ShortTapemarkSize: 20, LongTapemarkSize: 40, TapemarkEndLongPulse: 1, } default: return machineRelatedConfig{ Unsupported: true, } } }