diff options
author | David Robillard <d@drobilla.net> | 2008-10-18 21:33:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-18 21:33:59 +0000 |
commit | 2d0f699e5ddaab31e936d3c76cbc59cef487987d (patch) | |
tree | d718003782ab00dc89249eed6d370f86aa782796 /src/engine/EventBuffer.cpp | |
parent | a4876d30d938322a48537be2d29e73fb64174c0a (diff) | |
download | ingen-2d0f699e5ddaab31e936d3c76cbc59cef487987d.tar.gz ingen-2d0f699e5ddaab31e936d3c76cbc59cef487987d.tar.bz2 ingen-2d0f699e5ddaab31e936d3c76cbc59cef487987d.zip |
Lower glib/glibmm dependency to 2.14.
Fix optional parameters all over the palce because waf is retarded and sets failed check variables to ##some#stupid#name#like#this instead of false.
Portability fixes (Ingen (except GUI) and all dependencies builds on OSX).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1681 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/EventBuffer.cpp')
-rw-r--r-- | src/engine/EventBuffer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp index e57312ad..45ef47f0 100644 --- a/src/engine/EventBuffer.cpp +++ b/src/engine/EventBuffer.cpp @@ -40,7 +40,13 @@ EventBuffer::EventBuffer(size_t capacity) throw std::bad_alloc(); } +#ifdef HAVE_POSIX_MEMALIGN int ret = posix_memalign((void**)&_local_buf, 16, sizeof(LV2_Event_Buffer) + capacity); +#else + _local_buf = (LV2_Event_Buffer*)malloc(sizeof(LV2_Event_Buffer) + capacity); + int ret = (_local_buf == NULL); +#endif + if (ret) { cerr << "Failed to allocate event buffer. Aborting." << endl; exit(EXIT_FAILURE); |