History

--guard, & associated changes

robs committed 17 years ago

Commit 1f70a301 parent bd403cd74 files · +628 −719Browse files

Showing the changes to src/spectrogram.c (1 of 74 files). Show all

Unified · Split

src/spectrogram.c+3−4
@@ -186,21 +186,20 @@ static int flow(sox_effect_t * effp, · 185 unmodified lines
186186 size_t * isamp, size_t * osamp)
187187 {
188188 priv_t * p = (priv_t *)effp->priv;
189− size_t len = min(*isamp, *osamp), dummy = 0; /* No need to clip count */
189+ size_t len = min(*isamp, *osamp);
190190 int i;
191191
192192 memcpy(obuf, ibuf, len * sizeof(*obuf)); /* Pass on audio unaffected */
193193 *isamp = *osamp = len;
194194
195195 while (sox_true) {
196− SOX_SAMPLE_LOCALS;
197196 if (p->read == p->step_size) {
198197 memmove(p->buf, p->buf + p->step_size,
199198 (p->dft_size - p->step_size) * sizeof(*p->buf));
200199 p->read = 0;
201200 }
202201 for (; len && p->read < p->step_size; --len, ++p->read, --p->end)
203− p->buf[p->dft_size - p->step_size + p->read] = FROM_SOX(*ibuf++, dummy);
202+ p->buf[p->dft_size - p->step_size + p->read] = FROM_SOX(*ibuf++);
204203 if (p->read != p->step_size)
205204 break;
206205
@@ -494,7 +493,7 @@ static int stop(sox_effect_t * effp) · 287 unmodified lines
494493 sox_effect_handler_t const * sox_spectrogram_effect_fn(void)
495494 {
496495 static sox_effect_handler_t handler = {
497− "spectrogram", 0, 0, getopts, start, flow, drain, stop, 0, sizeof(priv_t)};
496+ "spectrogram", 0, SOX_EFF_MODIFY, getopts, start, flow, drain, stop, 0, sizeof(priv_t)};
498497 static char const * lines[] = {
499498 "[options]",
500499 "\t-x num\tX-axis pixels/second, default 100",

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