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

Side by Side Diff: webrtc/voice_engine/dtmf_inband.h

Issue 1607353002: Swap use of CriticalSectionWrapper with rtc::CriticalSection in voice_engine/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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
11 #ifndef WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_ 11 #ifndef WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_
12 #define WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_ 12 #define WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_
13 13
14 #include "webrtc/typedefs.h" 14 #include "webrtc/typedefs.h"
15 #include "webrtc/voice_engine/voice_engine_defines.h" 15 #include "webrtc/voice_engine/voice_engine_defines.h"
16 #include "webrtc/base/criticalsection.h"
16 17
17 namespace webrtc { 18 namespace webrtc {
18 class CriticalSectionWrapper;
19 19
20 class DtmfInband 20 class DtmfInband
21 { 21 {
22 public: 22 public:
23 DtmfInband(int32_t id); 23 DtmfInband(int32_t id);
24 24
25 virtual ~DtmfInband(); 25 virtual ~DtmfInband();
26 26
27 void Init(); 27 void Init();
28 28
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 enum {kDtmfAmpHigh = 32768}; 60 enum {kDtmfAmpHigh = 32768};
61 enum {kDtmfAmpLow = 23171}; // 3 dB lower than the high frequency 61 enum {kDtmfAmpLow = 23171}; // 3 dB lower than the high frequency
62 62
63 int16_t DtmfFix_generateSignal(int16_t a1_times2, 63 int16_t DtmfFix_generateSignal(int16_t a1_times2,
64 int16_t a2_times2, 64 int16_t a2_times2,
65 int16_t volume, 65 int16_t volume,
66 int16_t* signal, 66 int16_t* signal,
67 int16_t length); 67 int16_t length);
68 68
69 private: 69 private:
70 CriticalSectionWrapper& _critSect; 70 mutable rtc::CriticalSection _critSect;
71 int32_t _id; 71 int32_t _id;
72 uint16_t _outputFrequencyHz; // {8000, 16000, 32000} 72 uint16_t _outputFrequencyHz; // {8000, 16000, 32000}
73 int16_t _oldOutputLow[2]; // Data needed for oscillator model 73 int16_t _oldOutputLow[2]; // Data needed for oscillator model
74 int16_t _oldOutputHigh[2]; // Data needed for oscillator model 74 int16_t _oldOutputHigh[2]; // Data needed for oscillator model
75 int16_t _frameLengthSamples; // {80, 160, 320} 75 int16_t _frameLengthSamples; // {80, 160, 320}
76 int32_t _remainingSamples; 76 int32_t _remainingSamples;
77 int16_t _eventCode; // [0, 15] 77 int16_t _eventCode; // [0, 15]
78 int16_t _attenuationDb; // [0, 36] 78 int16_t _attenuationDb; // [0, 36]
79 int32_t _lengthMs; 79 int32_t _lengthMs;
80 bool _reinit; // 'true' if the oscillator should be reinit for next event 80 bool _reinit; // 'true' if the oscillator should be reinit for next event
81 bool _playing; 81 bool _playing;
82 uint32_t _delaySinceLastToneMS; // time since last generated tone [ms] 82 uint32_t _delaySinceLastToneMS; // time since last generated tone [ms]
83 }; 83 };
84 84
85 } // namespace webrtc 85 } // namespace webrtc
86 86
87 #endif // #ifndef WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_ 87 #endif // #ifndef WEBRTC_VOICE_ENGINE_DTMF_INBAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698