Renaming SetOpusMaxBandwidth to SetOpusMaxPlaybackRate

This is to maintain the consistency with the Opus codec option "maxplaybackrate" defined in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03

BUG=
R=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14279004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7038 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2014-09-03 12:28:06 +00:00
parent 0a214ffa8a
commit adee8f9242
17 changed files with 91 additions and 86 deletions

View File

@ -99,19 +99,19 @@ int16_t WebRtcOpus_SetPacketLossRate(OpusEncInst* inst, int32_t loss_rate) {
}
}
int16_t WebRtcOpus_SetMaxBandwidth(OpusEncInst* inst, int32_t bandwidth) {
int16_t WebRtcOpus_SetMaxPlaybackRate(OpusEncInst* inst, int32_t frequency_hz) {
opus_int32 set_bandwidth;
if (!inst)
return -1;
if (bandwidth <= 4000) {
if (frequency_hz <= 8000) {
set_bandwidth = OPUS_BANDWIDTH_NARROWBAND;
} else if (bandwidth <= 6000) {
} else if (frequency_hz <= 12000) {
set_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND;
} else if (bandwidth <= 8000) {
} else if (frequency_hz <= 16000) {
set_bandwidth = OPUS_BANDWIDTH_WIDEBAND;
} else if (bandwidth <= 12000) {
} else if (frequency_hz <= 24000) {
set_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND;
} else {
set_bandwidth = OPUS_BANDWIDTH_FULLBAND;