Changed hard-coded 8 to sizeof(double)

This commit is contained in:
Anne de Jong 2023-06-18 21:05:47 +02:00
parent 1a22a33c0f
commit 3681e7adac

View File

@ -26,7 +26,9 @@ DaqData::DaqData(const us nframes, const us nchannels,
DEBUGTRACE_PRINT(sw);
assert(sw > 0 && sw <= 8);
_data = reinterpret_cast<byte_t*>(new double[(sw * nchannels * nframes)/8 + 1]);
_data = reinterpret_cast<byte_t *>(
new double[(sw * nchannels * nframes) / sizeof(double) + 1]);
if (!_data) {
throw rte("Could not allocate memory for DaqData!");
}