meter

How to measure noise or sound and displays in dB(A) in iphone?

不想你离开。 提交于 2019-11-27 00:58:57
问题 I want to measure sound in dB(A) in iPhone. How can I do it? Is there any example or tutorial? 回答1: If you use AVAudioPlayer, you can use this method AVAudioPlayer *avPlayer = ... [avPlayer play...]; [avPlayer averagePowerForChannel:0]; [avPlayer averagePowerForChannel:1]; From Apple's doc - (float)averagePowerForChannel:(NSUInteger)channelNumber Description Returns the average power for a given channel, in decibels, for the sound being played. 来源: https://stackoverflow.com/questions/6183599

How to style HTML5 <meter> tag

假装没事ソ 提交于 2019-11-26 20:25:39
问题 I am wondering how I could style the new <meter> tag. <meter value=80 min=0 max=100> 80/100 </meter> I just want to change the background color and the value color, but I can't find the right CSS properties. For webkit-based browsers I've found these: meter::-webkit-meter-horizontal-bar { -webkit-appearance: meter; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), color-stop(0.2, #EEE), color-stop(0.45, #CCC), color-stop(0.55, #CCC), to(#DDD)); } Pseudo element meter::-webkit