1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

linux midi and audio fixes

This commit is contained in:
jules 2007-07-24 14:07:57 +00:00
parent ff4812cd09
commit dbb3b223bf
4 changed files with 8 additions and 7 deletions

View file

@ -863,7 +863,7 @@ public:
if (cardNum < 0)
break;
if (snd_ctl_open (&handle, T("hw:") + String (cardNum), 0) >= 0)
if (snd_ctl_open (&handle, T("hw:") + String (cardNum), SND_CTL_NONBLOCK) >= 0)
{
if (snd_ctl_card_info (handle, info) >= 0)
{

View file

@ -131,6 +131,8 @@ static snd_seq_t* iterateDevices (const bool forInput,
snd_seq_close (seqHandle);
}
deviceNamesFound.appendNumbersToDuplicates (true, true);
return returnedHandle;
}
@ -325,7 +327,7 @@ public:
while (! threadShouldExit())
{
if (poll (pfd, numPfds, 100000) > 0)
if (poll (pfd, numPfds, 500) > 0)
{
snd_seq_event_t* inputEvent = 0;
@ -393,7 +395,7 @@ void MidiInput::start()
void MidiInput::stop()
{
((MidiInputThread*) internal)->stopThread (2000);
((MidiInputThread*) internal)->stopThread (3000);
}
int MidiInput::getDefaultDeviceIndex()