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:
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user