Changeset 2548:fe1b99691069 in roaraudio for libroar/ctl.c


Ignore:
Timestamp:
09/02/09 13:09:09 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_str2proto() and roar_proto2str()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/ctl.c

    r2544 r2548  
    447447} 
    448448 
     449int    roar_str2proto (char * proto) { 
     450 if ( !strcasecmp(proto, "roar") ) { 
     451  return ROAR_PROTO_ROARAUDIO; 
     452 } else if ( !strcasecmp(proto, "roaraudio") ) { 
     453  return ROAR_PROTO_ROARAUDIO; 
     454 } else if ( !strcasecmp(proto, "esd") ) { 
     455  return ROAR_PROTO_ESOUND; 
     456 } else if ( !strcasecmp(proto, "esound") ) { 
     457  return ROAR_PROTO_ESOUND; 
     458 } 
     459 
     460 return -1; 
     461} 
     462 
     463char * roar_proto2str (int    proto) { 
     464 switch (proto) { 
     465  case ROAR_PROTO_ROARAUDIO: return "RoarAudio"; break; 
     466  case ROAR_PROTO_ESOUND:    return "EsounD";    break; 
     467  default: 
     468    return "(unknown)"; 
     469 } 
     470} 
     471 
    449472//ll 
Note: See TracChangeset for help on using the changeset viewer.