diff --git a/src/drivers/win/oakra.h b/src/drivers/win/oakra.h index b75f64d6..75c09f4a 100644 --- a/src/drivers/win/oakra.h +++ b/src/drivers/win/oakra.h @@ -90,7 +90,7 @@ public: ptr = ::realloc(ptr,len); return ptr; } - void free(void *ptr) { + static void free(void *ptr) { ::free(ptr); } diff --git a/src/drivers/win/sound.cpp b/src/drivers/win/sound.cpp index c751c586..f47e5efe 100644 --- a/src/drivers/win/sound.cpp +++ b/src/drivers/win/sound.cpp @@ -58,7 +58,7 @@ public: Buffer(int size) { length = 0; this->size = size; data = OAKRA_Module::malloc(size); } int getRemaining() { return size-length; } void *data; - ~Buffer() { delete data; } + ~Buffer() { if (data){ OAKRA_Module::free(data); data = nullptr; } } }; std::vector liveBuffers;