Changeset 1844:5454eaa259aa in roaraudio for roard
- Timestamp:
- 05/23/09 05:39:54 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/light.c
r1838 r1844 111 111 struct roar_stream_server * ss; 112 112 char buf[512]; 113 register char * bufptr; 113 114 114 115 if ( g_streams[id] == NULL ) … … 126 127 chans = 512; 127 128 128 if ( stream_vio_s_write(ss, g_light_state.state, chans) != chans ) { 129 if ( chans == 512 ) { 130 bufptr = g_light_state.state; 131 } else { 132 memset(buf, 0, 512); 133 memcpy(buf, g_light_state.state, chans); 134 bufptr = buf; 135 } 136 137 if ( stream_vio_s_write(ss, bufptr, 512) != 512 ) { 129 138 streams_delete(id); 130 139 return -1; 131 }132 133 if ( chans < 512 ) {134 chans = 512 - chans;135 memset(buf, 0, chans);136 if ( stream_vio_s_write(ss, g_light_state.state, chans) != chans ) {137 streams_delete(id);138 return -1;139 }140 140 } 141 141
Note: See TracChangeset
for help on using the changeset viewer.