Adding SetOpusMaxBandwidth in VoE and ACM

This is a step to solve
https://code.google.com/p/webrtc/issues/detail?id=1906

In particular, we add an API in VoE and ACM to call Opus's API of setting maximum bandwidth.

TEST = added a test in voe_cmd_test and listened to the result

BUG=
R=henrika@google.com, henrika@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6869 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2014-08-12 08:13:33 +00:00
parent c98ce3b34c
commit 6aac93bd9c
14 changed files with 136 additions and 0 deletions

View File

@ -445,6 +445,7 @@ void RunTest(std::string out_path) {
printf("%i. Remove a file-playing channel \n", option_index++);
printf("%i. Toggle Opus stereo (Opus must be selected again to apply "
"the setting) \n", option_index++);
printf("%i. Set Opus maximum audio bandwidth \n", option_index++);
printf("Select action or %i to stop the call: ", option_index);
int option_selection;
@ -757,6 +758,12 @@ void RunTest(std::string out_path) {
else
printf("\n Opus mono enabled (select Opus again to apply the "
"setting). \n");
} else if (option_selection == option_index++) {
printf("\n Input bandwidth in Hz: ");
int max_playback_rate;
ASSERT_EQ(1, scanf("%i", &max_playback_rate));
res = codec->SetOpusMaxBandwidth(chan, max_playback_rate);
VALIDATE;
} else {
break;
}