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/echo.c (1 of 93 files). Show all

Unified · Split

src/echo.c+6−6
@@ -82,7 +82,7 @@ typedef struct echostuff { · 81 unmodified lines
82/*82/*
83 * Process options83 * Process options
84 */84 */
85int st_echo_getopts(eff_t effp, int n, char **argv) 85static int st_echo_getopts(eff_t effp, int n, char **argv)
86{86{
87 echo_t echo = (echo_t) effp->priv;87 echo_t echo = (echo_t) effp->priv;
88 int i;88 int i;
@@ -113,7 +113,7 @@ int st_echo_getopts(eff_t effp, int n, char **argv) · 24 unmodified lines
113/*113/*
114 * Prepare for processing.114 * Prepare for processing.
115 */115 */
116int st_echo_start(eff_t effp)116static int st_echo_start(eff_t effp)
117{117{
118 echo_t echo = (echo_t) effp->priv;118 echo_t echo = (echo_t) effp->priv;
119 int i;119 int i;
@@ -143,7 +143,7 @@ int st_echo_start(eff_t effp) · 23 unmodified lines
143 st_fail("echo: delay must be positive!");143 st_fail("echo: delay must be positive!");
144 return (ST_EOF);144 return (ST_EOF);
145 }145 }
146 if ( echo->samples[i] > DELAY_BUFSIZ )146 if ( echo->samples[i] > (st_ssize_t)DELAY_BUFSIZ )
147 {147 {
148 st_fail("echo: delay must be less than %g seconds!",148 st_fail("echo: delay must be less than %g seconds!",
149 DELAY_BUFSIZ / (float) effp->ininfo.rate );149 DELAY_BUFSIZ / (float) effp->ininfo.rate );
@@ -185,7 +185,7 @@ int st_echo_start(eff_t effp) · 35 unmodified lines
185 * Processed signed long samples from ibuf to obuf.185 * Processed signed long samples from ibuf to obuf.
186 * Return number of samples processed.186 * Return number of samples processed.
187 */187 */
188int st_echo_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, 188static int st_echo_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
189 st_size_t *isamp, st_size_t *osamp)189 st_size_t *isamp, st_size_t *osamp)
190{190{
191 echo_t echo = (echo_t) effp->priv;191 echo_t echo = (echo_t) effp->priv;
@@ -222,7 +222,7 @@ int st_echo_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 30 unmodified lines
222/*222/*
223 * Drain out reverb lines. 223 * Drain out reverb lines.
224 */224 */
225int st_echo_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)225static int st_echo_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)
226{226{
227 echo_t echo = (echo_t) effp->priv;227 echo_t echo = (echo_t) effp->priv;
228 double d_in, d_out;228 double d_in, d_out;
@@ -262,7 +262,7 @@ int st_echo_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 33 unmodified lines
262/*262/*
263 * Clean up reverb effect.263 * Clean up reverb effect.
264 */264 */
265int st_echo_stop(eff_t effp)265static int st_echo_stop(eff_t effp)
266{266{
267 echo_t echo = (echo_t) effp->priv;267 echo_t echo = (echo_t) effp->priv;
268 268

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