Changeset 418:f60d587b5195 in roaraudio for libroarpulse


Ignore:
Timestamp:
08/10/08 22:52:24 (11 years ago)
Author:
phi
Branch:
default
Message:

update meta data only in case of stream_name set, and accept $PULSE_SERVER

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/simple.c

    r416 r418  
    3434 codec = roar_codec_pulse2roar(ss->format); 
    3535 
     36 if ( !server ) 
     37  server = getenv("PULSE_SERVER"); 
     38 
    3639 if ( roar_simple_connect(&(s->con), (char*)server, (char*)name) == -1 ) { 
    3740  free(s); 
     
    4851 } 
    4952 
    50  meta.value  = (char*)stream_name; 
    51  meta.key[0] = 0; 
    52  meta.type   = ROAR_META_TYPE_DESCRIPTION; 
     53 if ( stream_name && stream_name[0] != 0 ) { 
     54  meta.value  = (char*)stream_name; 
     55  meta.key[0] = 0; 
     56  meta.type   = ROAR_META_TYPE_DESCRIPTION; 
    5357 
    54  roar_stream_meta_set(&(s->con), &(s->stream), ROAR_META_MODE_SET, &meta); 
     58  roar_stream_meta_set(&(s->con), &(s->stream), ROAR_META_MODE_SET, &meta); 
     59 } 
    5560 
    5661 return (pa_simple*) s; 
Note: See TracChangeset for help on using the changeset viewer.