Browse Source

Fix in JackPortAudioDevices::GetDeviceFromFullName.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4758 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 13 years ago
parent
commit
41d8bd5b1c
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      windows/portaudio/JackPortAudioDevices.cpp

+ 7
- 5
windows/portaudio/JackPortAudioDevices.cpp View File

@@ -99,17 +99,19 @@ string PortAudioDevices::GetFullName(std::string hostname, std::string devicenam
}

PaDeviceInfo* PortAudioDevices::GetDeviceFromFullName (string fullname, PaDeviceIndex& id, bool isInput)
{
{
PaDeviceInfo* ret = NULL;
//no driver to find
if (fullname.size() == 0) {
if (fullname.size() == 0) {
return NULL;
}
//first get host and device names from fullname
string::size_type separator = fullname.find ("::", 0);
if (separator == 0) {
string::size_type separator = fullname.find("::", 0);

if (separator == string::npos) {
return NULL;
}
}
char* hostname = (char*)malloc(separator + 9);
fill_n (hostname, separator + 9, 0);
fullname.copy (hostname, separator);


Loading…
Cancel
Save