mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-09 02:25:24 +02:00
even more stuff
This commit is contained in:
29
core/src/dsp/taps/tap.h
Normal file
29
core/src/dsp/taps/tap.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <volk/volk.h>
|
||||
|
||||
namespace dsp {
|
||||
template<class T>
|
||||
class tap {
|
||||
public:
|
||||
T* taps = NULL;
|
||||
unsigned int size = 0;
|
||||
};
|
||||
|
||||
namespace taps {
|
||||
template<class T>
|
||||
inline tap<T> alloc(int count) {
|
||||
tap<T> taps;
|
||||
taps.size = count;
|
||||
taps.taps = buffer::alloc<T>(count);
|
||||
return taps;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline void free(tap<T>& taps) {
|
||||
if (!taps.taps) { return; }
|
||||
buffer::free(taps.taps);
|
||||
taps.taps = NULL;
|
||||
taps.size = 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user