Changeset 3388:0a02c6ba7c10 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/11/10 13:21:23 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

implement roar_pa_find_server(), function to search for PA server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/libroarpulse.c

    r3383 r3388  
    8383} 
    8484 
     85char * roar_pa_find_server (char * server) { 
     86 struct roar_x11_connection * x11con; 
     87 
     88 if ( server == NULL ) 
     89  server = getenv("PULSE_SERVER"); 
     90 
     91 if ( server == NULL ) { 
     92  if ( (x11con = roar_x11_connect(NULL)) != NULL ) { 
     93   server = roar_x11_get_prop(x11con, "PULSE_SERVER"); 
     94   roar_x11_disconnect(x11con); 
     95  } 
     96 } 
     97 
     98 return server; 
     99} 
     100 
    85101//ll 
Note: See TracChangeset for help on using the changeset viewer.