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

Side by Side Diff: webrtc/modules/audio_processing/logging/apm_data_dumper.h

Issue 2296693002: Fixed the clang warning for ApmDataDumper (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/logging/apm_data_dumper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 22 matching lines...) Expand all
33 // Functor used to use as a custom deleter in the map of file pointers to raw 33 // Functor used to use as a custom deleter in the map of file pointers to raw
34 // files. 34 // files.
35 struct RawFileCloseFunctor { 35 struct RawFileCloseFunctor {
36 void operator()(FILE* f) const { fclose(f); } 36 void operator()(FILE* f) const { fclose(f); }
37 }; 37 };
38 #endif 38 #endif
39 39
40 // Class that handles dumping of variables into files. 40 // Class that handles dumping of variables into files.
41 class ApmDataDumper { 41 class ApmDataDumper {
42 public: 42 public:
43 // Constructor that takes an instance index that may 43 // Constructor that takes an instance index that may
44 // be used to distinguish data dumped from different 44 // be used to distinguish data dumped from different
45 // instances of the code. 45 // instances of the code.
46 #if WEBRTC_AEC_DEBUG_DUMP == 1 46 explicit ApmDataDumper(int instance_index);
47 explicit ApmDataDumper(int instance_index) 47
48 : instance_index_(instance_index) {} 48 ~ApmDataDumper();
49 #else
50 explicit ApmDataDumper(int instance_index) {}
51 #endif
52 49
53 // Reinitializes the data dumping such that new versions 50 // Reinitializes the data dumping such that new versions
54 // of all files being dumped to are created. 51 // of all files being dumped to are created.
55 void InitiateNewSetOfRecordings() { 52 void InitiateNewSetOfRecordings() {
56 #if WEBRTC_AEC_DEBUG_DUMP == 1 53 #if WEBRTC_AEC_DEBUG_DUMP == 1
57 ++recording_set_index_; 54 ++recording_set_index_;
58 #endif 55 #endif
59 } 56 }
60 57
61 // Methods for performing dumping of data of various types into 58 // Methods for performing dumping of data of various types into
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 142
146 FILE* GetRawFile(const char* name); 143 FILE* GetRawFile(const char* name);
147 WavWriter* GetWavFile(const char* name, int sample_rate_hz, int num_channels); 144 WavWriter* GetWavFile(const char* name, int sample_rate_hz, int num_channels);
148 #endif 145 #endif
149 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ApmDataDumper); 146 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(ApmDataDumper);
150 }; 147 };
151 148
152 } // namespace webrtc 149 } // namespace webrtc
153 150
154 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_ 151 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_LOGGING_APM_DATA_DUMPER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/logging/apm_data_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698