OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 packet_buffer_->DiscardAllOldPackets(timestamp_); | 1867 packet_buffer_->DiscardAllOldPackets(timestamp_); |
1868 } | 1868 } |
1869 | 1869 |
1870 return extracted_samples; | 1870 return extracted_samples; |
1871 } | 1871 } |
1872 | 1872 |
1873 void NetEqImpl::UpdatePlcComponents(int fs_hz, size_t channels) { | 1873 void NetEqImpl::UpdatePlcComponents(int fs_hz, size_t channels) { |
1874 // Delete objects and create new ones. | 1874 // Delete objects and create new ones. |
1875 expand_.reset(expand_factory_->Create(background_noise_.get(), | 1875 expand_.reset(expand_factory_->Create(background_noise_.get(), |
1876 sync_buffer_.get(), &random_vector_, | 1876 sync_buffer_.get(), &random_vector_, |
1877 fs_hz, channels)); | 1877 &stats_, fs_hz, channels)); |
1878 merge_.reset(new Merge(fs_hz, channels, expand_.get(), sync_buffer_.get())); | 1878 merge_.reset(new Merge(fs_hz, channels, expand_.get(), sync_buffer_.get())); |
1879 } | 1879 } |
1880 | 1880 |
1881 void NetEqImpl::SetSampleRateAndChannels(int fs_hz, size_t channels) { | 1881 void NetEqImpl::SetSampleRateAndChannels(int fs_hz, size_t channels) { |
1882 LOG(LS_VERBOSE) << "SetSampleRateAndChannels " << fs_hz << " " << channels; | 1882 LOG(LS_VERBOSE) << "SetSampleRateAndChannels " << fs_hz << " " << channels; |
1883 // TODO(hlundin): Change to an enumerator and skip assert. | 1883 // TODO(hlundin): Change to an enumerator and skip assert. |
1884 assert(fs_hz == 8000 || fs_hz == 16000 || fs_hz == 32000 || fs_hz == 48000); | 1884 assert(fs_hz == 8000 || fs_hz == 16000 || fs_hz == 32000 || fs_hz == 48000); |
1885 assert(channels > 0); | 1885 assert(channels > 0); |
1886 | 1886 |
1887 fs_hz_ = fs_hz; | 1887 fs_hz_ = fs_hz; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1973 | 1973 |
1974 void NetEqImpl::CreateDecisionLogic() { | 1974 void NetEqImpl::CreateDecisionLogic() { |
1975 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, | 1975 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, |
1976 playout_mode_, | 1976 playout_mode_, |
1977 decoder_database_.get(), | 1977 decoder_database_.get(), |
1978 *packet_buffer_.get(), | 1978 *packet_buffer_.get(), |
1979 delay_manager_.get(), | 1979 delay_manager_.get(), |
1980 buffer_level_filter_.get())); | 1980 buffer_level_filter_.get())); |
1981 } | 1981 } |
1982 } // namespace webrtc | 1982 } // namespace webrtc |
OLD | NEW |