草庐IT

maxInputLevelForAllChannels

全部标签

ios - 快速输入属性?

在类型属性的Apple文档中,给出了以下代码:structAudioChannel{staticletthresholdLevel=10staticvarmaxInputLevelForAllChannels=0varcurrentLevel:Int=0{didSet{ifcurrentLevel>AudioChannel.thresholdLevel{//capthenewaudioleveltothethresholdlevelcurrentLevel=AudioChannel.thresholdLevel}ifcurrentLevel>AudioChannel.maxInputL