diff --git a/Cpp/lib/waveform.cpp b/Cpp/lib/waveform.cpp index 2162a7e8777d5e4a1dc3ba6aae93758cca31db76..1bfabc70abb01440e15fd72f17389b9bb9924cec 100644 --- a/Cpp/lib/waveform.cpp +++ b/Cpp/lib/waveform.cpp @@ -199,7 +199,7 @@ void ArrayWaveform::bindBuffer(int64_t bytes) { void ArrayWaveform::unbindBuffer() { if (this->dataLen != 0 and this->pDataBuffer != nullptr) { - munmap(this->pDataBuffer, this->dataLen); + munmap(this->pDataBuffer, this->dataLen * 2); this->pDataBuffer = nullptr; this->dataLen = 0; } diff --git a/Cpp/src/example.cpp b/Cpp/src/example.cpp index 73856e58cce5a703e15401905bfa9427796e1c7a..c7b89e0d14ac26aba6b814fa077b4dfc200651f5 100644 --- a/Cpp/src/example.cpp +++ b/Cpp/src/example.cpp @@ -51,7 +51,7 @@ int main() { awg.writeSeqModeSegment( 1, wfmData.first, - wfmData.second + wfmData.second * 2 ); // load wfms onto both memory segements for simplicity, // a memory segment needs only be initialized with data // if it is configured as part of the step sequence below