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
112assert_static(sizeof(struct deemphstuff) <= ST_MAX_EFFECT_PRIVSIZE, 112assert_static(sizeof(struct deemphstuff) <= ST_MAX_EFFECT_PRIVSIZE,
113 /* else */ deemph_PRIVSIZE_too_big);113 /* else */ deemph_PRIVSIZE_too_big);
114 114
115/*
116 * Process options
117 *
118 * Don't do initialization now.
119 * The 'info' fields are not yet filled in.
120 */
121int 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
131/* filter coefficients */115/* filter coefficients */
132#define a1 -0.62786881719628784282116#define a1 -0.62786881719628784282
133#define b0 0.45995451989513153057117#define b0 0.45995451989513153057
@@ -137,7 +121,7 @@ int st_deemph_getopts(eff_t effp, int n, char **argv) · 3 unmodified lines
137 * Prepare processing.121 * Prepare processing.
138 * Do all initializations.122 * Do all initializations.
139 */123 */
140int st_deemph_start(eff_t effp)124static int st_deemph_start(eff_t effp)
141{125{
142 /* check the input format */126 /* check the input format */
143 127
@@ -188,7 +172,7 @@ int st_deemph_start(eff_t effp) · 44 unmodified lines
188 * Return number of samples processed.172 * Return number of samples processed.
189 */173 */
190 174
191int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, 175static int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
192 st_size_t *isamp, st_size_t *osamp)176 st_size_t *isamp, st_size_t *osamp)
193{177{
194 deemph_t deemph = (deemph_t) effp->priv;178 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
208 return (ST_SUCCESS);192 return (ST_SUCCESS);
209}193}
210 194
211/*
212 * Drain out remaining samples if the effect generates any.
213 */
214
215int 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 */
225int st_deemph_stop(eff_t effp)
226{
227 /* nothing to do */
228 return (ST_SUCCESS);
229}
230
231static st_effect_t st_deemph_effect = {195static st_effect_t st_deemph_effect = {
232 "deemph",196 "deemph",
233 "Usage: Deemphasis filtering effect takes no options",197 "Usage: Deemphasis filtering effect takes no options",
234 0,198 0,
235 st_deemph_getopts,199 st_effect_nothing_getopts,
236 st_deemph_start,200 st_deemph_start,
237 st_deemph_flow,201 st_deemph_flow,
238 st_effect_nothing_drain,202 st_effect_nothing_drain,
239 st_deemph_stop203 st_effect_nothing
240};204};
241 205
242const st_effect_t *st_deemph_effect_fn(void)206const 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