Index: webrtc/audio/conversion.h |
diff --git a/webrtc/audio/conversion.h b/webrtc/audio/conversion.h |
index c1cf9b632e87432f8d172e2edd1fa164365e5eeb..6ae32432d3820742d3ccf4b748cdca98a22d9fe6 100644 |
--- a/webrtc/audio/conversion.h |
+++ b/webrtc/audio/conversion.h |
@@ -13,8 +13,13 @@ |
namespace webrtc { |
+// Convert fixed point number with 8 bit fractional part, to floating point. |
+inline float Q8ToFloat(uint32_t v) { |
+ return static_cast<float>(v) / (1 << 8); |
+} |
+ |
// Convert fixed point number with 14 bit fractional part, to floating point. |
-inline float Q14ToFloat(uint16_t v) { |
+inline float Q14ToFloat(uint32_t v) { |
return static_cast<float>(v) / (1 << 14); |
} |
kwiberg-webrtc
2015/10/26 13:19:53
Would it make sense to just have one function, and
the sun
2015/10/26 14:44:02
Yes maybe... though I'm thinking that the internal
|
} // namespace webrtc |