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

Side by Side Diff: webrtc/audio/conversion.h

Issue 1390753002: Implement AudioReceiveStream::GetStats(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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_AUDIO_CONVERSION_H_
12 #define WEBRTC_AUDIO_CONVERSION_H_
13
11 namespace webrtc { 14 namespace webrtc {
12 namespace audiodevicemodule {
13 15
14 void EnsureInitialized(); 16 inline float Q14ToFloat(uint16_t v) {
hta-webrtc 2015/10/20 21:29:00 What is the derviation of Q14? Is it a well known
the sun 2015/10/20 22:44:16 https://en.wikipedia.org/wiki/Q_(number_format)
Andrew MacDonald 2015/10/20 22:59:57 Haven't looked at what you're using this for, but
the sun 2015/10/21 08:29:13 Since you had to ask, there is definitely a need f
the sun 2015/10/21 08:29:13 I looked at that but decided against, since pullin
Andrew MacDonald 2015/10/21 18:15:58 I think what you have is good. Thanks for the expl
17 return static_cast<float>(v) / (1 << 14);
18 }
19 } // namespace webrtc
15 20
16 } // namespace audiodevicemodule 21 #endif // WEBRTC_AUDIO_CONVERSION_H_
17 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698