midioss: Use unbuffered I/O to access the device node. (#6276)

This fixes problems reading from MIDI devices on NetBSD - the
input blocked until a certain number of notes have been read
rather than returning immediately when a single note is received.
This commit is contained in:
nia
2022-01-29 05:59:48 +00:00
committed by GitHub
parent 17b4863a76
commit 31aac6265c

View File

@@ -39,8 +39,10 @@ MidiOss::MidiOss() :
{
// only start thread, if opening of MIDI-device is successful,
// otherwise isRunning()==false indicates error
if( m_midiDev.open( QIODevice::ReadWrite ) ||
m_midiDev.open( QIODevice::ReadOnly ) )
if( m_midiDev.open( QIODevice::ReadWrite |
QIODevice::Unbuffered ) ) ||
m_midiDev.open( QIODevice::ReadOnly |
QIODevice::Unbuffered ) )
{
start( QThread::LowPriority );
}