| @@ -863,7 +863,7 @@ public: | |||||
| if (cardNum < 0) | if (cardNum < 0) | ||||
| break; | 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) | if (snd_ctl_card_info (handle, info) >= 0) | ||||
| { | { | ||||
| @@ -131,6 +131,8 @@ static snd_seq_t* iterateDevices (const bool forInput, | |||||
| snd_seq_close (seqHandle); | snd_seq_close (seqHandle); | ||||
| } | } | ||||
| deviceNamesFound.appendNumbersToDuplicates (true, true); | |||||
| return returnedHandle; | return returnedHandle; | ||||
| } | } | ||||
| @@ -325,7 +327,7 @@ public: | |||||
| while (! threadShouldExit()) | while (! threadShouldExit()) | ||||
| { | { | ||||
| if (poll (pfd, numPfds, 100000) > 0) | |||||
| if (poll (pfd, numPfds, 500) > 0) | |||||
| { | { | ||||
| snd_seq_event_t* inputEvent = 0; | snd_seq_event_t* inputEvent = 0; | ||||
| @@ -393,7 +395,7 @@ void MidiInput::start() | |||||
| void MidiInput::stop() | void MidiInput::stop() | ||||
| { | { | ||||
| ((MidiInputThread*) internal)->stopThread (2000); | |||||
| ((MidiInputThread*) internal)->stopThread (3000); | |||||
| } | } | ||||
| int MidiInput::getDefaultDeviceIndex() | int MidiInput::getDefaultDeviceIndex() | ||||
| @@ -129,10 +129,7 @@ const StringArray AudioDeviceManager::getAvailableAudioDeviceNames() const | |||||
| StringArray names; | StringArray names; | ||||
| for (int i = 0; i < availableDeviceTypes.size(); ++i) | for (int i = 0; i < availableDeviceTypes.size(); ++i) | ||||
| { | |||||
| availableDeviceTypes[i]->scanForDevices(); | |||||
| names.addArray (availableDeviceTypes[i]->getDeviceNames (useInputNames)); | names.addArray (availableDeviceTypes[i]->getDeviceNames (useInputNames)); | ||||
| } | |||||
| return names; | return names; | ||||
| } | } | ||||
| @@ -528,9 +528,11 @@ void StringArray::removeDuplicates (const bool ignoreCase) throw() | |||||
| { | { | ||||
| const String& s = *(String*) strings.getUnchecked(i); | const String& s = *(String*) strings.getUnchecked(i); | ||||
| int nextIndex = i + 1; | |||||
| for (;;) | for (;;) | ||||
| { | { | ||||
| const int nextIndex = indexOf (s, ignoreCase, i + 1); | |||||
| nextIndex = indexOf (s, ignoreCase, nextIndex); | |||||
| if (nextIndex < 0) | if (nextIndex < 0) | ||||
| break; | break; | ||||