Change return type of AudioEncoder::SetMaxPlaybackRate to void

There's no point in returning a status code, since the max playback rate
is only a suggestion that the encoder is free to disregard.

Review URL: https://codereview.webrtc.org/1332573003

Cr-Commit-Position: refs/heads/master@{#9900}
This commit is contained in:
kwiberg
2015-09-08 23:15:33 -07:00
committed by Commit bot
parent e9e7896293
commit 3f5f1c2ad3
10 changed files with 14 additions and 18 deletions

View File

@ -190,10 +190,10 @@ bool AudioEncoderOpus::SetApplication(Application application) {
return RecreateEncoderInstance(conf);
}
bool AudioEncoderOpus::SetMaxPlaybackRate(int frequency_hz) {
void AudioEncoderOpus::SetMaxPlaybackRate(int frequency_hz) {
auto conf = config_;
conf.max_playback_rate_hz = frequency_hz;
return RecreateEncoderInstance(conf);
CHECK(RecreateEncoderInstance(conf));
}
void AudioEncoderOpus::SetProjectedPacketLossRate(double fraction) {

View File

@ -76,7 +76,7 @@ class AudioEncoderOpus final : public AudioEncoder {
bool SetDtx(bool enable) override;
bool SetApplication(Application application) override;
bool SetMaxPlaybackRate(int frequency_hz) override;
void SetMaxPlaybackRate(int frequency_hz) override;
void SetProjectedPacketLossRate(double fraction) override;
void SetTargetBitrate(int target_bps) override;