Lines 1-127
Link Here
|
1 |
--- src/pipe.cpp.orig Mon Dec 8 17:20:33 2003 |
1 |
--- src/pipe.cpp.orig Sat Dec 24 18:19:31 2005 |
2 |
+++ src/pipe.cpp Fri Jun 3 16:58:02 2005 |
2 |
+++ src/pipe.cpp Fri Aug 4 11:48:06 2006 |
3 |
@@ -25,7 +25,8 @@ |
3 |
@@ -25,9 +25,9 @@ |
4 |
*/ |
4 |
*/ |
5 |
|
5 |
|
6 |
#include <iostream> |
6 |
#include <iostream> |
7 |
-#include <stdlib.h> |
7 |
-#include <stdlib.h> |
8 |
+#include <cstdlib> |
8 |
+#include <cstdlib> |
|
|
9 |
#include <math.h> |
10 |
-#include <errno.h> |
9 |
+#include <cerrno> |
11 |
+#include <cerrno> |
|
|
12 |
|
10 |
#include <audioproc.h> |
13 |
#include <audioproc.h> |
11 |
#include <pipe.h> |
14 |
#include <pipe.h> |
12 |
#include <jutils.h> |
|
|
13 |
@@ -118,9 +119,9 @@ |
14 |
} |
15 |
/* --- */ |
16 |
|
17 |
- (char*)start += currentBlockSize; |
18 |
+ start = (char*)start + currentBlockSize; |
19 |
len -= currentBlockSize; |
20 |
- (char*)pp += currentBlockSize; |
21 |
+ pp = (float*)pp + currentBlockSize; |
22 |
length -= currentBlockSize; |
23 |
if ((end!=buffer) && (start==bufferEnd)) |
24 |
start = buffer; |
25 |
@@ -146,8 +147,8 @@ |
26 |
} |
27 |
/* --- */ |
28 |
|
29 |
- (char*)pp += len; |
30 |
- (char*)start += len; |
31 |
+ pp = (float*)pp + len; |
32 |
+ start = (char*)start + len; |
33 |
length -= len; |
34 |
if ((end!=buffer) && (start==bufferEnd)) |
35 |
start = buffer; |
36 |
@@ -224,9 +225,9 @@ |
37 |
} |
38 |
/* --- */ |
39 |
|
40 |
- (char*)start += currentBlockSize; |
41 |
+ start = (char*)start + currentBlockSize; |
42 |
len -= currentBlockSize; |
43 |
- (char*)pp += currentBlockSize; |
44 |
+ pp = (float**)pp + currentBlockSize; |
45 |
length -= currentBlockSize; |
46 |
if ((end!=buffer) && (start==bufferEnd)) |
47 |
start = buffer; |
48 |
@@ -253,8 +254,8 @@ |
49 |
} |
50 |
/* --- */ |
51 |
|
52 |
- (char*)pp += len; |
53 |
- (char*)start += len; |
54 |
+ pp = (float**)pp + len; |
55 |
+ start = (char*)start + len; |
56 |
length -= len; |
57 |
if ((end!=buffer) && (start==bufferEnd)) |
58 |
start = buffer; |
59 |
@@ -309,9 +310,9 @@ |
60 |
pp[c] += (int32_t) ((IN_DATATYPE*)start)[c]; |
61 |
/* --- */ |
62 |
|
63 |
- (char*)start += currentBlockSize; |
64 |
+ start = (char*)start + currentBlockSize; |
65 |
len -= currentBlockSize; |
66 |
- (char*)pp += currentBlockSize; |
67 |
+ pp = (int32_t*)pp + currentBlockSize; |
68 |
length -= currentBlockSize; |
69 |
if ((end!=buffer) && (start==bufferEnd)) |
70 |
start = buffer; |
71 |
@@ -324,8 +325,8 @@ |
72 |
pp[c] += (int) ((IN_DATATYPE*)start)[c]; |
73 |
/* --- */ |
74 |
|
75 |
- (char*)pp += len; |
76 |
- (char*)start += len; |
77 |
+ pp = (int32_t*)pp + len; |
78 |
+ start = (char*)start + len; |
79 |
length -= len; |
80 |
if ((end!=buffer) && (start==bufferEnd)) |
81 |
start = buffer; |
82 |
@@ -372,17 +373,17 @@ |
83 |
/* fill */ |
84 |
memcpy(data, start, currentBlockSize); |
85 |
|
86 |
- (char*)start += currentBlockSize; |
87 |
+ start = (char*)start + currentBlockSize; |
88 |
len -= currentBlockSize; |
89 |
- (char*)data += currentBlockSize; |
90 |
+ data = (char*)data + currentBlockSize; |
91 |
length -= currentBlockSize; |
92 |
if ((end!=buffer) && (start==bufferEnd)) |
93 |
start = buffer; |
94 |
|
95 |
if (len) { /* short circuit */ |
96 |
memcpy(data, start, len); |
97 |
- (char*)data += len; |
98 |
- (char*)start += len; |
99 |
+ data = (char*)data + len; |
100 |
+ start = (char*)start + len; |
101 |
length -= len; |
102 |
if ((end!=buffer) && (start==bufferEnd)) |
103 |
start = buffer; |
104 |
@@ -418,19 +419,19 @@ |
105 |
currentBlockSize=MIN(currentBlockSize, len); |
106 |
::memcpy(end, data, currentBlockSize); |
107 |
|
108 |
- (char*)end += currentBlockSize; |
109 |
+ end = (char*)end + currentBlockSize; |
110 |
|
111 |
len -= currentBlockSize; |
112 |
|
113 |
- (char*)data += currentBlockSize; |
114 |
+ data = (char*)data + currentBlockSize; |
115 |
length -= currentBlockSize; |
116 |
if ((start!=buffer) && (end==bufferEnd)) |
117 |
end = buffer; |
118 |
|
119 |
if (len) { // short circuit |
120 |
::memcpy(end, data, len); |
121 |
- (char*)data += len; |
122 |
- (char*)end += len; |
123 |
+ data = (char*)data + len; |
124 |
+ end = (char*)end + len; |
125 |
length -= len; |
126 |
|
127 |
if ((start!=buffer) && (end==bufferEnd)) |