diff options
author | Tim E. Real <termtech@rogers.com> | 2012-12-16 01:56:25 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2012-12-16 01:56:25 +0000 |
commit | a2ae7e06099f1ceb38d752909e3c17055fbc59ca (patch) | |
tree | 05d72e62dc981f60876eae6be24993d336276b0f /muse2/muse/dssihost.cpp | |
parent | b776676ee0feb412a0c2aa917847231985b32563 (diff) |
Fix some Release build warnings. Several more to do.
Diffstat (limited to 'muse2/muse/dssihost.cpp')
-rw-r--r-- | muse2/muse/dssihost.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp index 4391dfd9..6b55c7e7 100644 --- a/muse2/muse/dssihost.cpp +++ b/muse2/muse/dssihost.cpp @@ -37,6 +37,7 @@ #include <signal.h> #include <dlfcn.h> #include <stdlib.h> +#include <stdio.h> #include <sys/stat.h> #include <QDir> @@ -486,13 +487,23 @@ bool DssiSynthIF::init(DssiSynth* s) int inports = synth->_inports; if(inports != 0) { - posix_memalign((void**)&audioInSilenceBuf, 16, sizeof(float) * MusEGlobal::segmentSize); + int rv = posix_memalign((void**)&audioInSilenceBuf, 16, sizeof(float) * MusEGlobal::segmentSize); + if(rv != 0) + { + fprintf(stderr, "ERROR: DssiSynthIF::init: posix_memalign returned error:%d. Aborting!\n", rv); + abort(); + } memset(audioInSilenceBuf, 0, sizeof(float) * MusEGlobal::segmentSize); audioInBuffers = new float*[inports]; for(int k = 0; k < inports; ++k) { - posix_memalign((void**)&audioInBuffers[k], 16, sizeof(float) * MusEGlobal::segmentSize); + int rv = posix_memalign((void**)&audioInBuffers[k], 16, sizeof(float) * MusEGlobal::segmentSize); + if(rv != 0) + { + fprintf(stderr, "ERROR: DssiSynthIF::init: posix_memalign returned error:%d. Aborting!\n", rv); + abort(); + } memset(audioInBuffers[k], 0, sizeof(float) * MusEGlobal::segmentSize); ld->connect_port(handle, synth->iIdx[k], audioInBuffers[k]); } @@ -504,7 +515,12 @@ bool DssiSynthIF::init(DssiSynth* s) audioOutBuffers = new float*[outports]; for(int k = 0; k < outports; ++k) { - posix_memalign((void**)&audioOutBuffers[k], 16, sizeof(float) * MusEGlobal::segmentSize); + int rv = posix_memalign((void**)&audioOutBuffers[k], 16, sizeof(float) * MusEGlobal::segmentSize); + if(rv != 0) + { + fprintf(stderr, "ERROR: DssiSynthIF::init: posix_memalign returned error:%d. Aborting!\n", rv); + abort(); + } memset(audioOutBuffers[k], 0, sizeof(float) * MusEGlobal::segmentSize); ld->connect_port(handle, synth->oIdx[k], audioOutBuffers[k]); } |