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

Unified · Split

src/deemphas.c+4−40
@@ -112,22 +112,6 @@ typedef struct deemphstuff { · 111 unmodified lines
112112 assert_static(sizeof(struct deemphstuff) <= ST_MAX_EFFECT_PRIVSIZE,
113113 /* else */ deemph_PRIVSIZE_too_big);
114114
115−/*
116− * Process options
117− *
118− * Don't do initialization now.
119− * The 'info' fields are not yet filled in.
120− */
121−int st_deemph_getopts(eff_t effp, int n, char **argv)
122−{
123− if (n)
124− {
125− st_fail(st_deemph_effect.usage);
126− return (ST_EOF);
127− }
128− return (ST_SUCCESS);
129−}
130−
131115 /* filter coefficients */
132116 #define a1 -0.62786881719628784282
133117 #define b0 0.45995451989513153057
@@ -137,7 +121,7 @@ int st_deemph_getopts(eff_t effp, int n, char **argv) · 3 unmodified lines
137121 * Prepare processing.
138122 * Do all initializations.
139123 */
140−int st_deemph_start(eff_t effp)
124+static int st_deemph_start(eff_t effp)
141125 {
142126 /* check the input format */
143127
@@ -188,7 +172,7 @@ int st_deemph_start(eff_t effp) · 44 unmodified lines
188172 * Return number of samples processed.
189173 */
190174
191−int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
175+static int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
192176 st_size_t *isamp, st_size_t *osamp)
193177 {
194178 deemph_t deemph = (deemph_t) effp->priv;
@@ -208,35 +192,15 @@ int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 13 unmodified lines
208192 return (ST_SUCCESS);
209193 }
210194
211−/*
212− * Drain out remaining samples if the effect generates any.
213− */
214−
215−int st_deemph_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)
216−{
217− /* nothing to do */
218− return (ST_EOF);
219−}
220−
221−/*
222− * Do anything required when you stop reading samples.
223− * (free allocated memory, etc.)
224− */
225−int st_deemph_stop(eff_t effp)
226−{
227− /* nothing to do */
228− return (ST_SUCCESS);
229−}
230−
231195 static st_effect_t st_deemph_effect = {
232196 "deemph",
233197 "Usage: Deemphasis filtering effect takes no options",
234198 0,
235− st_deemph_getopts,
199+ st_effect_nothing_getopts,
236200 st_deemph_start,
237201 st_deemph_flow,
238202 st_effect_nothing_drain,
239− st_deemph_stop
203+ st_effect_nothing
240204 };
241205
242206 const st_effect_t *st_deemph_effect_fn(void)

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