zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 88afeeb027eb3af6254d771509efc71c0ff9c7a2
parent e3bc943f04e4ecf044857f33bc8407cad18ef05b
Author: Hans Petter Selasky <hps@selasky.org>
Date:   Fri, 15 Nov 2019 12:52:25 +0100

Correct use of non-blocking flag with open().

Signed-off-by: Hans Petter Selasky <hps@selasky.org>

Diffstat:
Msrc/Nio/OssEngine.cpp | 4++--
Msrc/Nio/OssMultiEngine.cpp | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Nio/OssEngine.cpp b/src/Nio/OssEngine.cpp @@ -216,7 +216,7 @@ bool OssEngine::openAudio() device = linux_oss_wave_out_dev; /* NOTE: PIPEs and FIFOs can block when opening them */ - audio.handle = open(device, O_WRONLY, O_NONBLOCK); + audio.handle = open(device, O_WRONLY | O_NONBLOCK); if(audio.handle == -1) { cerr << "ERROR - I can't open the " << device << '.' << endl; @@ -354,7 +354,7 @@ bool OssEngine::openMidi() device = linux_oss_seq_in_dev; /* NOTE: PIPEs and FIFOs can block when opening them */ - handle = open(device, O_RDONLY, O_NONBLOCK); + handle = open(device, O_RDONLY | O_NONBLOCK); if(-1 == handle) return false; diff --git a/src/Nio/OssMultiEngine.cpp b/src/Nio/OssMultiEngine.cpp @@ -86,7 +86,7 @@ OssMultiEngine :: openAudio() device = linux_oss_wave_out_dev; /* NOTE: PIPEs and FIFOs can block when opening them */ - handle = open(device, O_WRONLY, O_NONBLOCK); + handle = open(device, O_WRONLY | O_NONBLOCK); if (handle == -1) { cerr << "ERROR - I can't open the " << device << '.' << endl;