]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/sconv.c
Revert "core: Transparently handle non-blocking sockets on Windows"
[pulseaudio] / src / pulsecore / sconv.c
index d06d69858e767aa247f3b1508acad1e76d356929..f0f154f555d39ef927f86508345141096d203845 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <math.h>
 
 #include <pulsecore/g711.h>
 #include <pulsecore/macro.h>
+#include <pulsecore/endianmacros.h>
 
-#include "endianmacros.h"
-#include "sconv-s16le.h"
-#include "sconv-s16be.h"
+#include <pulsecore/sconv-s16le.h>
+#include <pulsecore/sconv-s16be.h>
 
 #include "sconv.h"
 
@@ -52,8 +53,8 @@ static void u8_from_float32ne(unsigned n, const float *a, uint8_t *b) {
     for (; n > 0; n--, a++, b++) {
         float v;
         v = (*a * 127.0) + 128.0;
-       v = PA_CLAMP_UNLIKELY (v, 0.0, 255.0);
-       *b = rint (v);
+        v = PA_CLAMP_UNLIKELY (v, 0.0, 255.0);
+        *b = rint (v);
     }
 }