mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
added empty operator
This commit is contained in:
parent
8e4fd040f9
commit
419256d348
1 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ public:
|
||||||
for (int i = 0; i < 2*NUM; ++i)
|
for (int i = 0; i < 2*NUM; ++i)
|
||||||
buf[i] = 0;
|
buf[i] = 0;
|
||||||
}
|
}
|
||||||
|
const TYPE *operator () ()
|
||||||
|
{
|
||||||
|
return buf + min(pos0, pos1);
|
||||||
|
}
|
||||||
const TYPE *operator () (TYPE input)
|
const TYPE *operator () (TYPE input)
|
||||||
{
|
{
|
||||||
buf[pos0] = buf[pos1] = input;
|
buf[pos0] = buf[pos1] = input;
|
||||||
|
|
@ -26,7 +30,7 @@ public:
|
||||||
pos0 = 0;
|
pos0 = 0;
|
||||||
if (++pos1 >= 2*NUM)
|
if (++pos1 >= 2*NUM)
|
||||||
pos1 = 0;
|
pos1 = 0;
|
||||||
return buf + min(pos0, pos1);
|
return operator () ();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue