Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Side by Side Diff: webrtc/modules/audio_coding/neteq/comfort_noise.h

Issue 1868143002: Convert CNG into C++ and remove it from AudioDecoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Implicit conversion to ArrayView in TestSidErroneous Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 kInternalError, 31 kInternalError,
32 kMultiChannelNotSupported 32 kMultiChannelNotSupported
33 }; 33 };
34 34
35 ComfortNoise(int fs_hz, DecoderDatabase* decoder_database, 35 ComfortNoise(int fs_hz, DecoderDatabase* decoder_database,
36 SyncBuffer* sync_buffer) 36 SyncBuffer* sync_buffer)
37 : fs_hz_(fs_hz), 37 : fs_hz_(fs_hz),
38 first_call_(true), 38 first_call_(true),
39 overlap_length_(5 * fs_hz_ / 8000), 39 overlap_length_(5 * fs_hz_ / 8000),
40 decoder_database_(decoder_database), 40 decoder_database_(decoder_database),
41 sync_buffer_(sync_buffer), 41 sync_buffer_(sync_buffer) {
42 internal_error_code_(0) {
43 } 42 }
44 43
45 // Resets the state. Should be called before each new comfort noise period. 44 // Resets the state. Should be called before each new comfort noise period.
46 void Reset(); 45 void Reset();
47 46
48 // Update the comfort noise generator with the parameters in |packet|. 47 // Update the comfort noise generator with the parameters in |packet|.
49 // Will delete the packet. 48 // Will delete the packet.
50 int UpdateParameters(Packet* packet); 49 int UpdateParameters(Packet* packet);
51 50
52 // Generates |requested_length| samples of comfort noise and writes to 51 // Generates |requested_length| samples of comfort noise and writes to
(...skipping 11 matching lines...) Expand all
64 bool first_call_; 63 bool first_call_;
65 size_t overlap_length_; 64 size_t overlap_length_;
66 DecoderDatabase* decoder_database_; 65 DecoderDatabase* decoder_database_;
67 SyncBuffer* sync_buffer_; 66 SyncBuffer* sync_buffer_;
68 int internal_error_code_; 67 int internal_error_code_;
69 RTC_DISALLOW_COPY_AND_ASSIGN(ComfortNoise); 68 RTC_DISALLOW_COPY_AND_ASSIGN(ComfortNoise);
70 }; 69 };
71 70
72 } // namespace webrtc 71 } // namespace webrtc
73 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_COMFORT_NOISE_H_ 72 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_COMFORT_NOISE_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc ('k') | webrtc/modules/audio_coding/neteq/comfort_noise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698