add last backwards-compatible version

This commit is contained in:
2021-12-14 00:33:46 -07:00
parent 68b10d413b
commit b0dd3f07f3
335 changed files with 4746 additions and 19627 deletions

View File

@@ -1,8 +1,5 @@
#pragma once
#include <SDK/dsp.h>
#include <pfc/map.h>
//! Duration counter class - accumulates duration using sample values, without any kind of rounding error accumulation.
class duration_counter {
public:
@@ -40,14 +37,6 @@ public:
void add(const audio_chunk & c) {
add(c.get_sample_count(), c.get_sample_rate());
}
#ifdef FOOBAR2000_HAVE_DSP
void add(dsp_chunk_list const & c) {
const size_t num = c.get_count();
for (size_t walk = 0; walk < num; ++walk) {
add(*c.get_item(walk));
}
}
#endif
void add(t_uint64 sampleCount, t_uint32 sampleRate) {
PFC_ASSERT(sampleRate > 0);
if (sampleRate > 0 && sampleCount > 0) {