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

Side by Side Diff: media/audio/audio_power_monitor.h

Issue 1535193003: Add missing macros includes in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « media/audio/audio_output_stream_sink.h ('k') | media/audio/clockless_audio_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_
6 #define MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_ 6 #define MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h"
12 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 15
15 // An audio signal power monitor. It is periodically provided an AudioBus by 16 // An audio signal power monitor. It is periodically provided an AudioBus by
16 // the native audio thread, and the audio samples in each channel are analyzed 17 // the native audio thread, and the audio samples in each channel are analyzed
17 // to determine the average power of the signal over a time period. Here 18 // to determine the average power of the signal over a time period. Here
18 // "average power" is a running average calculated by using a first-order 19 // "average power" is a running average calculated by using a first-order
19 // low-pass filter over the square of the samples scanned. Whenever reporting 20 // low-pass filter over the square of the samples scanned. Whenever reporting
20 // the power level, this running average is converted to dBFS (decibels relative 21 // the power level, this running average is converted to dBFS (decibels relative
21 // to full-scale) units. 22 // to full-scale) units.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 base::Lock reading_lock_; 79 base::Lock reading_lock_;
79 float power_reading_; 80 float power_reading_;
80 bool clipped_reading_; 81 bool clipped_reading_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(AudioPowerMonitor); 83 DISALLOW_COPY_AND_ASSIGN(AudioPowerMonitor);
83 }; 84 };
84 85
85 } // namespace media 86 } // namespace media
86 87
87 #endif // MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_ 88 #endif // MEDIA_AUDIO_AUDIO_POWER_MONITOR_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_stream_sink.h ('k') | media/audio/clockless_audio_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698