티스토리 뷰
http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioPlayer/peakPowerForChannel:
peakPowerForChannel:
Returns the peak power for a given channel, in decibels, for the sound being played.
- (float)peakPowerForChannel:(NSUInteger)channelNumber
Parameters
- channelNumber
The audio channel whose peak power value you want to obtain. Channel numbers are zero-indexed. A monaural signal, or the left channel of a stereo signal, has channel number
0
.
Return Value
A floating-point representation, in decibels, of a given audio channel’s current peak power. A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).
If the signal provided to the audio player exceeds ±full scale, then the return value may exceed 0 (that is, it may enter the positive range).
Discussion
To obtain a current peak power value, you must call the updateMeters
method before calling this method.
Availability
- Available in iPhone OS 2.2 and later.
See Also
Declared In
AVAudioPlayer.h
#define XMAX 30.0f [self.player updateMeters]; // updateMeters 를 호출해줘야 각각의 Power 값이 업데이트됨. float avg = -1.0f * [self.player averagePowerForChannel:0]; float peak = -1.0f * [self.player peakPowerForChannel:0]; meter1.progress = (XMAX - avg) / XMAX; meter2.progress = (XMAX - peak) / XMAX;
'my Programing > iPhone' 카테고리의 다른 글
iPhone SDK 구버젼 받기 ... (0) | 2010.07.03 |
---|---|
drawSolidPoly (0) | 2010.01.27 |
UIAcceleration (0) | 2010.01.20 |
아이폰에 어플 올리기!! 성공! (0) | 2010.01.20 |
아이폰 개발자 등록없이 앱 올리기 ...펌 (0) | 2010.01.18 |
- Total
- Today
- Yesterday
- Lee Chung Yong
- ALC888
- ubuntu
- 한글2008
- kext
- J2ME
- kext helper
- 10.5.8
- euro2008
- awn
- java
- VirtualBox
- java vm
- 기어스오브워2
- Mac
- LockInfo
- 우분투
- MaskFilterEffect
- XBOX360
- 청용
- theme
- iPhone
- 두바이
- WeatherWidget
- suave
- Cydia
- iOS4.0
- 아이폰
- 테일즈 오브 베스페리아
- BigbusTour
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |