git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1652 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.68
| @@ -15,7 +15,7 @@ Tom Szilagyi | |||||
| 2007-10-25 Stephane Letz <letz@grame.fr> | 2007-10-25 Stephane Letz <letz@grame.fr> | ||||
| * Merge of Dmitry Baikov MIDI branch. | |||||
| * Merge of Dmitry Baikov MIDI branch. Correct JackGraphManager::GetPortsAux to use port type. | |||||
| 2007-10-24 Stephane Letz <letz@grame.fr> | 2007-10-24 Stephane Letz <letz@grame.fr> | ||||
| @@ -297,7 +297,7 @@ EXPORT int jack_port_flags(const jack_port_t* port) | |||||
| jack_error("jack_port_flags called with an incorrect port %ld", myport); | jack_error("jack_port_flags called with an incorrect port %ld", myport); | ||||
| return -1; | return -1; | ||||
| } else { | } else { | ||||
| return GetGraphManager()->GetPort(myport)->Flags(); | |||||
| return GetGraphManager()->GetPort(myport)->GetFlags(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -311,7 +311,7 @@ EXPORT const char* jack_port_type(const jack_port_t* port) | |||||
| jack_error("jack_port_flags called an incorrect port %ld", myport); | jack_error("jack_port_flags called an incorrect port %ld", myport); | ||||
| return NULL; | return NULL; | ||||
| } else { | } else { | ||||
| return GetGraphManager()->GetPort(myport)->Type(); | |||||
| return GetGraphManager()->GetPort(myport)->GetType(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -612,12 +612,12 @@ int JackGraphManager::CheckPorts(jack_port_id_t port_src, jack_port_id_t port_ds | |||||
| JackPort* src = GetPort(port_src); | JackPort* src = GetPort(port_src); | ||||
| JackPort* dst = GetPort(port_dst); | JackPort* dst = GetPort(port_dst); | ||||
| if ((dst->Flags() & JackPortIsInput) == 0) { | |||||
| if ((dst->fFlags & JackPortIsInput) == 0) { | |||||
| jack_error("Destination port in attempted (dis)connection of %s and %s is not an input port", src->fName, dst->fName); | jack_error("Destination port in attempted (dis)connection of %s and %s is not an input port", src->fName, dst->fName); | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| if ((src->Flags() & JackPortIsOutput) == 0) { | |||||
| if ((src->fFlags & JackPortIsOutput) == 0) { | |||||
| jack_error("Source port in attempted (dis)connection of %s and %s is not an output port", src->fName, dst->fName); | jack_error("Source port in attempted (dis)connection of %s and %s is not an output port", src->fName, dst->fName); | ||||
| return -1; | return -1; | ||||
| } | } | ||||
| @@ -736,23 +736,12 @@ const char** JackGraphManager::GetPortsAux(const char* port_name_pattern, const | |||||
| } | } | ||||
| if (matching && port_name_pattern && port_name_pattern[0]) { | if (matching && port_name_pattern && port_name_pattern[0]) { | ||||
| if (regexec(&port_regex, port->fName, 0, NULL, 0)) { | |||||
| if (regexec(&port_regex, port->GetName(), 0, NULL, 0)) { | |||||
| matching = false; | matching = false; | ||||
| } | } | ||||
| } | } | ||||
| /* | |||||
| if (matching && type_name_pattern && type_name_pattern[0]) { | |||||
| jack_port_type_id_t ptid = psp[i].ptype_id; | |||||
| if (regexec (&type_regex,engine->port_types[ptid].type_name,0, NULL, 0)) { | |||||
| matching = false; | |||||
| } | |||||
| } | |||||
| */ | |||||
| // TO BE IMPROVED | |||||
| if (matching && type_name_pattern && type_name_pattern[0]) { | |||||
| if (regexec(&type_regex, JACK_DEFAULT_AUDIO_TYPE, 0, NULL, 0)) { | |||||
| if (matching && type_name_pattern && type_name_pattern[0]) { | |||||
| if (regexec(&type_regex, port->GetType(), 0, NULL, 0)) { | |||||
| matching = false; | matching = false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -181,12 +181,12 @@ const char* JackPort::GetShortName() const | |||||
| return strchr(fName, ':') + 1; | return strchr(fName, ':') + 1; | ||||
| } | } | ||||
| int JackPort::Flags() const | |||||
| int JackPort::GetFlags() const | |||||
| { | { | ||||
| return fFlags; | return fFlags; | ||||
| } | } | ||||
| const char* JackPort::Type() const | |||||
| const char* JackPort::GetType() const | |||||
| { | { | ||||
| const JackPortType* type = GetPortType(fTypeId); | const JackPortType* type = GetPortType(fTypeId); | ||||
| return type->name; | return type->name; | ||||
| @@ -88,8 +88,8 @@ class JackPort | |||||
| int UnsetAlias(const char* alias); | int UnsetAlias(const char* alias); | ||||
| bool NameEquals(const char* target); | bool NameEquals(const char* target); | ||||
| int Flags() const; | |||||
| const char* Type() const; | |||||
| int GetFlags() const; | |||||
| const char* GetType() const; | |||||
| int Lock(); | int Lock(); | ||||
| int Unlock(); | int Unlock(); | ||||