mirror of https://github.com/ericonr/sndio.git
remove sqrtone bits
This commit is contained in:
parent
556d5f075b
commit
9c47745d49
21
sndiod/dsp.c
21
sndiod/dsp.c
|
@ -685,24 +685,3 @@ cmap_init(struct cmap *p,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* produce a square tone, for instance with:
|
||||
*
|
||||
* period = round / (220 * round / rate)
|
||||
*/
|
||||
int
|
||||
sqrtone(int ctx, adata_t *out, int period, int vol, int todo)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = todo; i > 0; i--) {
|
||||
if (ctx == 0) {
|
||||
vol = -vol;
|
||||
ctx = period / 2;
|
||||
}
|
||||
ctx--;
|
||||
*(out++) += vol;
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
|
|
@ -157,6 +157,5 @@ void dec_init(struct conv *, struct aparams *, int);
|
|||
void cmap_add(struct cmap *, void *, void *, int, int);
|
||||
void cmap_copy(struct cmap *, void *, void *, int, int);
|
||||
void cmap_init(struct cmap *, int, int, int, int, int, int, int, int);
|
||||
int sqrtone(int, adata_t *, int, int, int);
|
||||
|
||||
#endif /* !defined(DSP_H) */
|
||||
|
|
Loading…
Reference in New Issue