diff --git a/source/native-plugins/audio-base.hpp b/source/native-plugins/audio-base.hpp index 6c6912041..d7b8166ae 100644 --- a/source/native-plugins/audio-base.hpp +++ b/source/native-plugins/audio-base.hpp @@ -39,15 +39,19 @@ extern "C" { # pragma GCC diagnostic pop #endif -#ifdef CARLA_OS_WIN +#if defined(CARLA_OS_WIN) # include # define CARLA_MLOCK(ptr, size) VirtualLock((ptr), (size)) -#else +#elif !defined(CARLA_OS_WASM) # include # define CARLA_MLOCK(ptr, size) mlock((ptr), (size)) +#else +# define CARLA_MLOCK(ptr, size) #endif -// #define DEBUG_FILE_OPS +#ifdef CARLA_OS_WASM +# define DEBUG_FILE_OPS +#endif typedef struct adinfo ADInfo; @@ -341,6 +345,11 @@ public: ad_dump_nfo(99, &fFileNfo); + #ifdef CARLA_OS_WASM + // FIXME pool handling with seeking and partial reads is failing + fFileNfo.can_seek = 0; + #endif + // Fix for misinformation using libsndfile if (fFileNfo.frames % fFileNfo.channels) --fFileNfo.frames;