mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-29 22:37:44 +02:00
clean up
This commit is contained in:
parent
a221e431aa
commit
87ce37df8c
5 changed files with 11 additions and 80 deletions
|
@ -22,6 +22,12 @@
|
|||
#include<deque>
|
||||
#include<algorithm>
|
||||
|
||||
|
||||
/// Size limited queue
|
||||
/**
|
||||
* Size limited queue with basic statistic functions:
|
||||
* median, mean, percentile
|
||||
*/
|
||||
template <class T>
|
||||
class DoubleBuffer
|
||||
{
|
||||
|
@ -37,6 +43,7 @@ public:
|
|||
buffer.pop_front();
|
||||
}
|
||||
|
||||
/// Median as mean over N values around the median
|
||||
T median(unsigned int mean = 1) const
|
||||
{
|
||||
if (buffer.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue