Changeset 1117:b7329495fc22 in roaraudio
- Timestamp:
- 01/16/09 17:32:09 (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/roard.c
r1115 r1117 130 130 char * k, * v; 131 131 int codec; 132 int sync = 0; 132 133 133 134 ROAR_DBG("add_output(drv='%s', dev='%s', opts='%s') = ?", drv, dev, opts); … … 174 175 } else if ( strcmp(k, "meta") == 0 ) { 175 176 streams_set_flag(stream, ROAR_FLAG_META); 177 } else if ( strcmp(k, "sync") == 0 ) { 178 sync = 1; 176 179 } else { 177 180 ROAR_ERR("add_output(*): unknown option '%s'", k); … … 203 206 if ( prim ) 204 207 streams_mark_primary(stream); 208 209 if ( sync ) 210 streams_set_flag(stream, ROAR_FLAG_SYNC); 205 211 206 212 return 0; -
roard/streams.c
r1116 r1117 271 271 272 272 int streams_set_sync (int id, int sync) { 273 int fh; 274 275 if ( (fh = streams_get_fh(id)) == -1 ) 276 return -1; 277 278 return roar_socket_nonblock(fh, sync ? ROAR_SOCKET_BLOCK : ROAR_SOCKET_NONBLOCK); 273 int fh = streams_get_fh(id); 274 275 if ( fh != -1 ) { 276 if ( roar_socket_nonblock(fh, sync ? ROAR_SOCKET_BLOCK : ROAR_SOCKET_NONBLOCK) == -1 ) 277 return -1; 278 279 return fdatasync(fh); 280 } else { 281 return roar_vio_nonblock(&(g_streams[id]->vio), sync); 282 } 279 283 } 280 284
Note: See TracChangeset
for help on using the changeset viewer.