Changeset 5162:85c55ccd12a9 in roaraudio
- Timestamp:
- 10/16/11 20:12:40 (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/clients.c
r5155 r5162 570 570 event = ROAR_NOTIFY_CMD2EVENT(m.cmd); 571 571 572 roar_debug_message_print(&m);573 574 572 oldcmd = m.cmd; 575 573 -
roard/codecfilter_flac.c
r5131 r5162 147 147 continue; 148 148 149 stream_meta_add(ROAR_STREAM(self->ss)->id, type, "", value); 149 if ( stream_meta_add(ROAR_STREAM(self->ss)->id, type, "", value) == -1 ) { 150 ROAR_WARN("cf_flac_cb_metadata(..., client_data=%p{ROAR_STREAM(.ss)->id=%i}): Can not add meta data: %s", 151 ROAR_STREAM(self->ss)->id, roar_error2str(roar_error)); 152 } 150 153 151 154 if ( strcmp(keycopy, "REPLAYGAIN_TRACK_PEAK") == 0 ) { … … 252 255 stats.bytes = 0; 253 256 } else { 254 roar_buffer_ring_stats(self->decoder.written, &stats); 257 if ( roar_buffer_ring_stats(self->decoder.written, &stats) == -1 ) 258 return -1; 255 259 } 256 260 … … 275 279 stats.bytes = 0; 276 280 } else { 277 roar_buffer_ring_stats(self->decoder.written, &stats); 281 if ( roar_buffer_ring_stats(self->decoder.written, &stats) == -1 ) 282 return -1; 278 283 } 279 284 } -
roard/driver_dstr.c
r4708 r5162 49 49 50 50 if ( sstream != NULL ) 51 roar_vio_ctl(inst, ROAR_VIO_CTL_SET_SSTREAM, sstream);51 _LIBROAR_IGNORE_RET(roar_vio_ctl(inst, ROAR_VIO_CTL_SET_SSTREAM, sstream)); 52 52 53 53 return 0; -
roard/driver_esd.c
r4763 r5162 54 54 fh = esd_play_stream_fallback(format, info->rate, device, name); 55 55 56 roar_vio_set_fh(inst, fh);57 56 58 57 // test for error. 59 58 if ( fh == -1 ) 60 59 return -1; 60 61 roar_vio_open_fh_socket(inst, fh); 61 62 62 63 roar_vio_shutdown(inst, ROAR_VIO_SHUTDOWN_READ); -
roard/driver_raw.c
r4708 r5162 36 36 37 37 if ( fh == -1 ) { 38 if ( (fh = open(device, O_CREAT|O_TRUNC|O_WRONLY, 0644)) == -1 ) {38 if ( roar_vio_open_file(inst, device, O_CREAT|O_TRUNC|O_WRONLY, 0644) == -1 ) 39 39 return -1; 40 } 40 } else { 41 if ( roar_vio_open_fh(inst, fh) == -1 ) 42 return -1; 41 43 } 42 43 roar_vio_set_fh(inst, fh);44 44 45 45 return 0; -
roard/driver_roar.c
r5056 r5162 48 48 if ( roar_vio_simple_stream(inst, info->rate, info->channels, info->bits, info->codec, device, dir, "roard") == -1 ) { 49 49 if ( streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF) ) { 50 roar_profile2info(info, "default"); 50 if ( roar_profile2info(info, "default") == -1 ) 51 return -1; 52 51 53 if ( roar_vio_simple_stream(inst, info->rate, info->channels, info->bits, info->codec, device, dir, "roard") == -1 ) { 52 54 return -1; -
roard/hwmixer_dstr.c
r4752 r5162 27 27 28 28 #ifndef ROAR_WITHOUT_DCOMP_MIXER 29 30 /* 31 * This driver ignores errors on seeks: 32 * The writes ensure that if the seek back to begin of file 33 * does not work the records keep seperate and parsable. 34 * So it basically enters some kind of streaming mode. 35 */ 29 36 30 37 //#define TEST_HWMIXER_SUBSTREAMS … … 63 70 64 71 roar_vio_printf(vio, "No data yet.\n"); 65 roar_vio_lseek(vio, 0, SEEK_SET);72 _LIBROAR_IGNORE_RET(roar_vio_lseek(vio, 0, SEEK_SET)); 66 73 roar_vio_sync(vio); 67 74 … … 113 120 } 114 121 115 roar_vio_lseek(vio, 0, SEEK_SET);122 _LIBROAR_IGNORE_RET(roar_vio_lseek(vio, 0, SEEK_SET)); 116 123 roar_vio_sync(vio); 117 124 return 0; -
roard/include/meta.h
r4708 r5162 30 30 31 31 #ifdef ROAR_SUPPORT_META 32 int stream_meta_set (int id, int type, c har * name,char * val);33 int stream_meta_add (int id, int type, c har * name,char * val);34 int stream_meta_get (int id, int type, c har * name, char * val, size_t len);32 int stream_meta_set (int id, int type, const char * name, const char * val); 33 int stream_meta_add (int id, int type, const char * name, const char * val); 34 int stream_meta_get (int id, int type, const char * name, char * val, size_t len); 35 35 int stream_meta_list (int id, int * types, size_t len); 36 36 int stream_meta_clear (int id); -
roard/meta.c
r5135 r5162 28 28 #ifdef ROAR_SUPPORT_META 29 29 30 int stream_meta_set (int id, int type, c har * name,char * val) {30 int stream_meta_set (int id, int type, const char * name, const char * val) { 31 31 int i; 32 32 struct roar_stream_server * s = g_streams[id]; … … 48 48 } 49 49 50 int stream_meta_add (int id, int type, c har * name,char * val) {50 int stream_meta_add (int id, int type, const char * name, const char * val) { 51 51 int i; 52 52 char * c; … … 85 85 } 86 86 87 int stream_meta_get (int id, int type, c har * name, char * val, size_t len) {87 int stream_meta_get (int id, int type, const char * name, char * val, size_t len) { 88 88 int i, vallen; 89 89 struct roar_stream_server * s = g_streams[id]; -
roard/midi.c
r5090 r5162 158 158 159 159 if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, &buf) == -1 ) { 160 ROAR_ERR("midi_check_stream( *): Can not alloc buffer space!");161 ROAR_DBG("midi_check_stream( *) = -1");160 ROAR_ERR("midi_check_stream(id=%i): Can not alloc buffer space!", id); 161 ROAR_DBG("midi_check_stream(id=%i) = -1", id); 162 162 return -1; 163 163 } … … 169 169 } 170 170 171 roar_buffer_set_len(b, len); 171 if ( roar_buffer_set_len(b, len) == -1 ) { 172 ROAR_WARN("midi_check_stream(id=%i): Can not set buffer size. BAD.", id); 173 roar_buffer_free(b); 174 streams_delete(id); 175 return -1; 176 } 172 177 173 178 if ( stream_add_buffer(id, b) == -1 ) { … … 348 353 } 349 354 350 roar_buffer_next(&(ss->buffer)); 355 if ( roar_buffer_next(&(ss->buffer)) == -1 ) { 356 ROAR_WARN("midi_conv_midi2mes(id=%i): Can not move to next buffer segment. BAD.", id); 357 break; 358 } 351 359 } 352 360 … … 672 680 673 681 int midi_add_buf (int id, struct roar_buffer * buf) { 682 #ifdef DEBUG 674 683 struct midi_message * mes; 675 684 void * bufdata; 685 #endif 676 686 677 687 if ( id == -1 || buf == NULL ) 678 688 return -1; 679 689 690 #ifdef DEBUG 680 691 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) 681 692 return -1; … … 688 699 ROAR_DBG("midi_add_buf(*): flags=0x%.2X", mes->flags); 689 700 ROAR_DBG("midi_add_buf(*): kk=0x%.2X, vv=0x%.2X", mes->kk, mes->vv); 701 #endif 690 702 691 703 if ( g_midi_mess.buf == NULL ) { 692 704 g_midi_mess.buf = buf; 693 705 } else { 694 roar_buffer_add(g_midi_mess.buf, buf); 706 if ( roar_buffer_add(g_midi_mess.buf, buf) == -1 ) { 707 ROAR_DBG("midi_add_buf(*) = -1"); 708 return -1; 709 } 695 710 } 696 711 -
roard/output.c
r5063 r5162 454 454 } 455 455 456 roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAMID, &stream); // ignore errors here457 roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAM, s); // ignore errors here456 _LIBROAR_IGNORE_RET(roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAMID, &stream)); // ignore errors here 457 _LIBROAR_IGNORE_RET(roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAM, s)); // ignore errors here 458 458 459 459 if ( blocks != -1 ) -
roard/sample.c
r4975 r5162 100 100 struct roar_buffer * new; 101 101 struct roar_sample * c = g_samples[id]; 102 int save_err; 102 103 103 104 if ( c == NULL ) … … 110 111 c->data = new; 111 112 } else { 112 roar_buffer_add(c->data, new); 113 if ( roar_buffer_add(c->data, new) == -1 ) { 114 save_err = roar_error; 115 roar_buffer_free(new); 116 roar_err_set(save_err); 117 return -1; 118 } 113 119 } 114 120 -
roard/sources.c
r4964 r5162 233 233 } 234 234 235 roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAMID, &stream); // ignore errors here236 roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAM, s); // ignore errors here235 _LIBROAR_IGNORE_RET(roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAMID, &stream)); // ignore errors here 236 _LIBROAR_IGNORE_RET(roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAM, s)); // ignore errors here 237 237 238 238 if ( f_sync ) { … … 251 251 struct roar_stream_server * ss; 252 252 253 if ( fh > -1 )254 return streams_set_fh(stream, fh);255 256 253 streams_get(stream, &ss); 257 254 258 if ( roar_vio_open_file(&(ss->vio), device, O_RDONLY, 0644) == -1 ) 259 return -1; 255 if ( fh > -1 ) { 256 if ( roar_vio_open_fh(&(ss->vio), fh) == -1 ) 257 return -1; 258 } else { 259 if ( roar_vio_open_file(&(ss->vio), device, O_RDONLY, 0644) == -1 ) 260 return -1; 261 } 260 262 261 263 return streams_set_fh(stream, -2);
Note: See TracChangeset
for help on using the changeset viewer.