Changeset 3622:21fc206e6ea0 in roaraudio for plugins/xmms
- Timestamp:
- 03/02/10 21:24:17 (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- plugins/xmms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/xmms/all.h
r3621 r3622 76 76 struct roar_connection con; 77 77 struct roar_stream stream; 78 int data_fh;78 struct roar_vio_calls vio; 79 79 long unsigned int written; 80 80 long unsigned int bps; -
plugins/xmms/roar.c
r3620 r3622 78 78 79 79 void roar_write(void *ptr, int length) { 80 int r;80 ssize_t r; 81 81 82 82 if ( g_inst.pause ) … … 86 86 87 87 while (length) { 88 if ( (r = write(g_inst.data_fh, ptr, length >= 17640 ? 17640: length)) != -1 ) {88 if ( (r = roar_vio_write(&(g_inst.vio), ptr, length >= 1764*2 ? 1764*2 : length)) != -1 ) { 89 89 g_inst.written += r; 90 90 ptr += r; … … 147 147 roar_close(); 148 148 149 if ( (g_inst.data_fh = roar_simple_new_stream_obj(&(g_inst.con), &(g_inst.stream),150 rate, nch, bits, codec, ROAR_DIR_PLAY)) == -1) {149 if ( roar_vio_simple_new_stream_obj(&(g_inst.vio), &(g_inst.con), &(g_inst.stream), 150 rate, nch, bits, codec, ROAR_DIR_PLAY) == -1 ) { 151 151 roar_disconnect(&(g_inst.con)); 152 152 g_inst.state |= STATE_CONNECTED; … … 173 173 174 174 void roar_close(void) { 175 if ( g_inst.data_fh != -1 ) 176 close(g_inst.data_fh); 177 g_inst.data_fh = -1; 175 int was_playing = g_inst.state & STATE_PLAYING; 176 178 177 g_inst.state |= STATE_PLAYING; 179 178 g_inst.state -= STATE_PLAYING; 179 180 if ( was_playing ) 181 roar_vio_close(&(g_inst.vio)); 182 180 183 g_inst.written = 0; 181 184 ROAR_DBG("roar_close(void) = (void)");
Note: See TracChangeset
for help on using the changeset viewer.