aboutsummaryrefslogtreecommitdiff
path: root/src/opcodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opcodes.cpp')
-rw-r--r--src/opcodes.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/opcodes.cpp b/src/opcodes.cpp
index 460aee0..2d7d8b8 100644
--- a/src/opcodes.cpp
+++ b/src/opcodes.cpp
@@ -161,8 +161,8 @@ private:
}
complete:
if (lbuffer != NULL) {
- csound->free(lbuffer); // causes segfault, WHY???????????
- lbuffer = NULL;
+ //csound->free(lbuffer); // causes segfault, WHY???????????
+ //lbuffer = NULL;
}
pmparser_free(csound, maps);
}
@@ -187,7 +187,9 @@ public:
}
~MemParser() {
- close(fd_mem);
+ if (fd_mem) {
+ close(fd_mem);
+ }
if (buffer != NULL) {
csound->free(buffer);
}
@@ -224,7 +226,6 @@ public:
iterate_memory_step(
[&](long index, MYFLT val) {
if (index < offset_position) return true;
- //std::cout << index << "-" << offset_position << "\n";
buffer[buffer_write_position] = val;
if (buffer_write_position < buffer_size) {
buffer_write_position ++;