History

Fix read and write return types: now st_size_t, like the size inputs.

To support this change, turn on lots more compiler warnings, and fix all the warnings generated.

rrt committed 19 years ago

Commit 4d743c41 parent ce1f8f393 files · +875 −1236Browse files

Showing the changes to src/echos.c (1 of 93 files). Show all

Unified · Split

src/echos.c+7−7
@@ -52,7 +52,7 @@ · 51 unmodified lines
52 52
53static st_effect_t st_echos_effect;53static st_effect_t st_echos_effect;
54 54
55#define DELAY_BUFSIZ ( 50L * ST_MAXRATE )55#define DELAY_BUFSIZ ( 50 * ST_MAXRATE )
56#define MAX_ECHOS 7 /* 24 bit x ( 1 + MAX_ECHOS ) = */56#define MAX_ECHOS 7 /* 24 bit x ( 1 + MAX_ECHOS ) = */
57 /* 24 bit x 8 = 32 bit !!! */57 /* 24 bit x 8 = 32 bit !!! */
58 58
@@ -72,7 +72,7 @@ typedef struct echosstuff { · 13 unmodified lines
72/*72/*
73 * Process options73 * Process options
74 */74 */
75int st_echos_getopts(eff_t effp, int n, char **argv) 75static int st_echos_getopts(eff_t effp, int n, char **argv)
76{76{
77 echos_t echos = (echos_t) effp->priv;77 echos_t echos = (echos_t) effp->priv;
78 int i;78 int i;
@@ -107,7 +107,7 @@ int st_echos_getopts(eff_t effp, int n, char **argv) · 28 unmodified lines
107/*107/*
108 * Prepare for processing.108 * Prepare for processing.
109 */109 */
110int st_echos_start(eff_t effp)110static int st_echos_start(eff_t effp)
111{111{
112 echos_t echos = (echos_t) effp->priv;112 echos_t echos = (echos_t) effp->priv;
113 int i;113 int i;
@@ -136,7 +136,7 @@ int st_echos_start(eff_t effp) · 22 unmodified lines
136 st_fail("echos: delay must be positive!");136 st_fail("echos: delay must be positive!");
137 return (ST_EOF);137 return (ST_EOF);
138 }138 }
139 if ( echos->samples[i] > DELAY_BUFSIZ )139 if ( echos->samples[i] > (st_ssize_t)DELAY_BUFSIZ )
140 {140 {
141 st_fail("echos: delay must be less than %g seconds!",141 st_fail("echos: delay must be less than %g seconds!",
142 DELAY_BUFSIZ / (float) effp->ininfo.rate );142 DELAY_BUFSIZ / (float) effp->ininfo.rate );
@@ -177,7 +177,7 @@ int st_echos_start(eff_t effp) · 34 unmodified lines
177 * Processed signed long samples from ibuf to obuf.177 * Processed signed long samples from ibuf to obuf.
178 * Return number of samples processed.178 * Return number of samples processed.
179 */179 */
180int st_echos_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, 180static int st_echos_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
181 st_size_t *isamp, st_size_t *osamp)181 st_size_t *isamp, st_size_t *osamp)
182{182{
183 echos_t echos = (echos_t) effp->priv;183 echos_t echos = (echos_t) effp->priv;
@@ -220,7 +220,7 @@ int st_echos_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 36 unmodified lines
220/*220/*
221 * Drain out reverb lines. 221 * Drain out reverb lines.
222 */222 */
223int st_echos_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)223static int st_echos_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)
224{224{
225 echos_t echos = (echos_t) effp->priv;225 echos_t echos = (echos_t) effp->priv;
226 double d_in, d_out;226 double d_in, d_out;
@@ -266,7 +266,7 @@ int st_echos_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 39 unmodified lines
266/*266/*
267 * Clean up echos effect.267 * Clean up echos effect.
268 */268 */
269int st_echos_stop(eff_t effp)269static int st_echos_stop(eff_t effp)
270{270{
271 echos_t echos = (echos_t) effp->priv;271 echos_t echos = (echos_t) effp->priv;
272 272

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t