Changeset 1106:b71671032077 in roaraudio for plugins
- Timestamp:
- 01/11/09 05:45:50 (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- plugins/xmms
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/xmms/Makefile
r1056 r1106 1 1 TARGET=libroar.so 2 2 3 OBJ=roar.o 3 OBJ=roar.o gui.o 4 4 5 5 include Makefile.conf -
plugins/xmms/roar.c
r1039 r1106 87 87 88 88 struct xmms_roar_out { 89 int state;90 char * server;89 int state; 90 char * server; 91 91 struct roar_connection con; 92 92 struct roar_stream stream; 93 int data_fh; 94 long unsigned int written; 95 long unsigned int bps; 96 int session; 97 int pause; 93 int data_fh; 94 long unsigned int written; 95 long unsigned int bps; 96 int session; 97 int pause; 98 struct { 99 int server_type; 100 int port; 101 int * proxy_type; 102 char * proxy; 103 char * player_name; 104 } cfg; 98 105 } g_inst; 99 106 … … 103 110 104 111 void roar_init(void) { 112 ConfigFile * cfgfile; 113 114 cfgfile = xmms_cfg_open_default_file(); 115 105 116 g_inst.state = 0; 106 117 g_inst.server = NULL; 107 118 g_inst.session = ctrlsocket_get_session_id(); 119 120 xmms_cfg_read_string(cfgfile, "ROAR", "server", &g_inst.server); 121 122 xmms_cfg_read_string(cfgfile, "ROAR", "player_name", &g_inst.cfg.player_name); 123 124 xmms_cfg_free(cfgfile); 125 126 if ( g_inst.cfg.player_name == NULL ) 127 g_inst.cfg.player_name = "XMMS"; 128 108 129 ROAR_DBG("roar_init(*) = (void)"); 109 130 } … … 137 158 138 159 if ( !(g_inst.state & STATE_CONNECTED) ) { 139 if ( roar_simple_connect(&(g_inst.con), g_inst.server, "XMMS") == -1 ) {160 if ( roar_simple_connect(&(g_inst.con), g_inst.server, g_inst.cfg.player_name) == -1 ) { 140 161 return FALSE; 141 162 }
Note: See TracChangeset
for help on using the changeset viewer.