Changeset 3346:18ace547edc5 in roaraudio for roarclients/roardtmf.c


Ignore:
Timestamp:
02/07/10 19:52:13 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support some spacing chars: space, ., + _

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roardtmf.c

    r3344 r3346  
    128128 size_t samples; 
    129129 size_t len; 
     130 char   c; 
    130131 
    131132 for (i = 1; i < argc; i++) { 
     
    176177 } 
    177178 
    178  while (*tones != 0 ) { 
    179   if ( calc(buf, len, rate, *tones) == -1 ) 
     179 while ( (c = *tones) != 0 ) { 
     180  tones++; 
     181 
     182  if ( c == ' ' || c == '+' || c == '.' || c == '_' ) 
     183   continue; 
     184 
     185  if ( calc(buf, len, rate, c) == -1 ) 
    180186   return 5; 
    181187  roar_vio_write(&stream, buf, len); 
    182   tones++; 
    183188 } 
    184189 
Note: See TracChangeset for help on using the changeset viewer.