Changeset 5270:e25346c13638 in roaraudio
- Timestamp:
- 11/17/11 18:20:12 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 96 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/basic.h
r5240 r5270 58 58 unsigned int stream; 59 59 uint32_t pos; 60 int datalen;60 size_t datalen; 61 61 char data[LIBROAR_BUFFER_MSGDATA]; 62 62 int16_t seq; -
include/libroar/config.h
r5202 r5270 70 70 71 71 struct roar_libroar_config_codec { 72 u nsigned int codec; // Codec ID72 uint32_t codec; // Codec ID 73 73 74 74 // parameters which are set: -
include/libroar/ltm.h
r4708 r5270 140 140 * result set was collected in the server. 141 141 */ 142 int roar_ltm_get_numchans(struct roar_ltm_result * res, int streamidx);142 int roar_ltm_get_numchans(struct roar_ltm_result * res, size_t streamidx); 143 143 144 144 /* Extract a single value from the result. … … 160 160 * (channels are counted from zero to N-1, not from 1 to N) 161 161 */ 162 int64_t roar_ltm_extract(struct roar_ltm_result * res, int mt, int streamidx, int channel);162 int64_t roar_ltm_extract(struct roar_ltm_result * res, int mt, size_t streamidx, int channel); 163 163 164 164 #endif -
include/libroar/stream.h
r5238 r5270 96 96 int roar_stream_m2s (struct roar_stream * s, struct roar_message * m); 97 97 98 int roar_str2codec (const char* codec) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE;99 const char * roar_codec2str (const intcodec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE;98 int32_t roar_str2codec (const char * codec) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 99 const char * roar_codec2str (const uint32_t codec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 100 100 101 int roar_mime2codec (const char* mime) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE;102 const char * roar_codec2mime (const intcodec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE;101 int32_t roar_mime2codec (const char * mime) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; 102 const char * roar_codec2mime (const uint32_t codec) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_PURE; 103 103 104 104 int32_t roar_str2rate(const char * rate) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_PURE; -
include/libroardsp/amp.h
r4708 r5270 42 42 int roar_amp_pcm_8bit (int8_t * output, int8_t * input, int samples, int channels, struct roar_mixer_settings * set); 43 43 int roar_amp_pcm_16bit (int16_t * output, int16_t * input, int samples, int channels, struct roar_mixer_settings * set); 44 int roar_amp_pcm_24bit (void * output, void * input, int samples, int channels, struct roar_mixer_settings * set);45 44 int roar_amp_pcm_32bit (int32_t * output, int32_t * input, int samples, int channels, struct roar_mixer_settings * set); 46 45 -
include/libroardsp/fader.h
r4708 r5270 43 43 struct roar_fader_state { 44 44 int rate; 45 s ize_tpcmoffset;45 ssize_t pcmoffset; 46 46 ssize_t start; 47 47 ssize_t stop; -
include/libroardsp/mixer.h
r4708 r5270 42 42 int roar_mix_pcm_8bit (int8_t * output, int8_t ** input, int samples); 43 43 int roar_mix_pcm_16bit (int16_t * output, int16_t ** input, int samples); 44 int roar_mix_pcm_24bit (void * output, void ** input, int samples);45 44 int roar_mix_pcm_32bit (int32_t * output, int32_t ** input, int samples); 46 45 -
libroar/Makefile
r5220 r5270 17 17 INCLUDE = -I../include -I../include/libroar 18 18 CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 19 LDFLAGS+= -g $(SHARED) $(LDPATH)19 LDFLAGS+= -g -Wall $(SHARED) $(LDPATH) 20 20 LIBS = $(LIBROAR_NS) 21 21 -
libroar/acl.c
r4708 r5270 44 44 return 0; 45 45 46 if ( rule->addr && !addr)46 if ( rule->addr && addr != NULL ) 47 47 return 0; 48 48 -
libroar/authfile.c
r4973 r5270 223 223 if ( roar_vio_lseek(&(authfile->vio), 0, SEEK_SET) != 0 ) 224 224 return -1; 225 if ( roar_vio_write(&(authfile->vio), key->data, key->len) != key->len )225 if ( roar_vio_write(&(authfile->vio), key->data, key->len) != (ssize_t)key->len ) 226 226 return -1; 227 227 if ( roar_authfile_unlock(authfile) == -1 ) -
libroar/config.c
r5202 r5270 37 37 38 38 static struct roar_libroar_config_codec * 39 roar_libroar_config_codec_get_conf( int codec, int create, struct roar_libroar_config * config);39 roar_libroar_config_codec_get_conf(uint32_t codec, int create, struct roar_libroar_config * config); 40 40 41 41 … … 318 318 319 319 static struct roar_libroar_config_codec * 320 roar_libroar_config_codec_get_conf( int codec, int create, struct roar_libroar_config * config) {321 int i;320 roar_libroar_config_codec_get_conf(uint32_t codec, int create, struct roar_libroar_config * config) { 321 size_t i; 322 322 int need_new = 1; 323 323 … … 337 337 if ( config->codecs.codec[i].codec == codec ) 338 338 return &(config->codecs.codec[i]); 339 if ( config->codecs.codec[i].codec == -1 )339 if ( config->codecs.codec[i].codec == (uint32_t)-1 ) 340 340 need_new = 0; 341 341 } … … 349 349 if ( !need_new ) { 350 350 for (i = 0; i < config->codecs.num; i++) { 351 if ( config->codecs.codec[i].codec == -1 ) {351 if ( config->codecs.codec[i].codec == (uint32_t)-1 ) { 352 352 memset(&(config->codecs.codec[i]), 0, sizeof(struct roar_libroar_config_codec)); 353 353 config->codecs.codec[i].codec = codec; … … 368 368 memset(&(config->codecs.codec[config->codecs.num]), 0, 16); 369 369 for (i = config->codecs.num; i < (config->codecs.num+16); i++) { 370 config->codecs.codec[i].codec = -1;370 config->codecs.codec[i].codec = (uint32_t)-1; 371 371 } 372 372 -
libroar/debug.c
r5201 r5270 184 184 ret = snprintf(buf, sizeof(buf), "(%s: %s:%lu): %s: ", prefix, file, line, typename); 185 185 186 if ( ret > 0 && ret < sizeof(buf) ) {186 if ( ret > 0 && ret < (int)sizeof(buf) ) { 187 187 bufp += ret; 188 188 } else { -
libroar/enumdev.c
r5238 r5270 101 101 int i; 102 102 #endif 103 104 (void)flags, (void)dir, (void)socktype; 103 105 104 106 if ( maxlen < 10 ) … … 207 209 }; 208 210 211 (void)flags, (void)dir, (void)socktype; 212 209 213 for (f = &(files[0]); f->file != NULL; f++) { 210 214 if ( (inp = fopen(f->file, "r")) == NULL ) -
libroar/env.c
r5008 r5270 60 60 const char * roar_env_get_home(int level) { 61 61 const char * home = getenv("HOME"); 62 63 (void)level; 62 64 63 65 return home; -
libroar/error.c
r5252 r5270 918 918 static char buf[1024] = ""; 919 919 int num[8]; 920 int i;920 size_t i; 921 921 int _ra_err = roar_error; 922 922 int _sys_err = errno; -
libroar/hash.c
r5188 r5270 146 146 int i; 147 147 148 for (i = 0; _libroar_hashes[i].id != -1; i++)148 for (i = 0; _libroar_hashes[i].id != (uint_least32_t)-1; i++) 149 149 if ( _libroar_hashes[i].id == ht ) 150 150 return _libroar_hashes[i].name; … … 157 157 int i; 158 158 159 for (i = 0; _libroar_hashes[i].id != -1; i++)159 for (i = 0; _libroar_hashes[i].id != (uint_least32_t)-1; i++) 160 160 if ( !strcasecmp(_libroar_hashes[i].name, ht) ) 161 161 return _libroar_hashes[i].id; … … 168 168 int i; 169 169 170 for (i = 0; _libroar_hashes[i].id != -1; i++)170 for (i = 0; _libroar_hashes[i].id != (uint_least32_t)-1; i++) 171 171 if ( _libroar_hashes[i].id == ht ) 172 172 return _libroar_hashes[i].dlen; -
libroar/hash_tiger.c
r4721 r5270 580 580 581 581 int roar_hash_tiger_uninit(struct roar_hash_tiger * state) { 582 (void)state; 582 583 return 0; 583 584 } … … 667 668 668 669 ssize_t roar_hash_tiger_statelen(struct roar_hash_tiger * state) { 670 (void)state; 669 671 return PSTATE_LEN; 670 672 } … … 827 829 828 830 ssize_t roar_hash_tiger_blocklen(struct roar_hash_tiger * state) { 831 (void)state; 829 832 return BLOCK_LEN; 830 833 } -
libroar/libroar.c
r5020 r5270 216 216 //#define ROAR_ERR(format, args...) roar_debug_msg(ROAR_DEBUG_TYPE_ERROR, __LINE__, __FILE__, ROAR_DBG_PREFIX, format, ## args) 217 217 218 // we do not support info-text at the moment. 219 (void)info; 220 218 221 if ( func == NULL ) 219 222 func = "<unknown>"; -
libroar/ltm.c
r5145 r5270 175 175 char * buf = NULL; 176 176 int ret; 177 inti;177 size_t i; 178 178 179 179 if ( con == NULL ) { … … 260 260 } 261 261 262 static int64_t * roar_ltm_get_streamptr(struct roar_ltm_result * res, int streamidx) {262 static int64_t * roar_ltm_get_streamptr(struct roar_ltm_result * res, size_t streamidx) { 263 263 int64_t * ptr; 264 264 int numchans; 265 int i;265 size_t i; 266 266 267 267 ROAR_DBG("roar_ltm_get_streamptr(res=%p, streamidx=%i) = ?", res, streamidx); … … 289 289 } 290 290 291 int roar_ltm_get_numchans(struct roar_ltm_result * res, int streamidx) {291 int roar_ltm_get_numchans(struct roar_ltm_result * res, size_t streamidx) { 292 292 int64_t * ptr = roar_ltm_get_streamptr(res, streamidx); 293 293 … … 298 298 } 299 299 300 int64_t roar_ltm_extract(struct roar_ltm_result * res, int mt, int streamidx, int channel) {300 int64_t roar_ltm_extract(struct roar_ltm_result * res, int mt, size_t streamidx, int channel) { 301 301 int64_t * ptr = roar_ltm_get_streamptr(res, streamidx); 302 302 int numchans; -
libroar/memmgr.c
r5010 r5270 366 366 memcpy(dst+dlen, src, slen); 367 367 dst[dlen+slen] = 0; 368 } else if ( dlen != size ) {368 } else if ( dlen != (ssize_t)size ) { 369 369 memcpy(dst+dlen, src, size-dlen-1); 370 370 dst[size-1] = 0; -
libroar/meta.c
r5054 r5270 520 520 521 521 int roar_stream_meta_list (struct roar_connection * con, struct roar_stream * s, int * types, size_t len) { 522 int i;522 size_t i; 523 523 struct roar_message m; 524 524 -
libroar/pinentry.c
r5016 r5270 177 177 len = strlen(cmd); 178 178 179 if ( write(pe->out, cmd, len) != len )179 if ( write(pe->out, cmd, len) != (ssize_t)len ) 180 180 return -1; 181 181 … … 186 186 len = strlen(args); 187 187 188 if ( write(pe->out, args, len) != len )188 if ( write(pe->out, args, len) != (ssize_t)len ) 189 189 return -1; 190 190 } -
libroar/proto.c
r5216 r5270 111 111 } 112 112 113 if ( roar_vio_write(vio, buf, headerlen) != headerlen ) {113 if ( roar_vio_write(vio, buf, headerlen) != (ssize_t)headerlen ) { 114 114 return -1; 115 115 } 116 116 117 117 if ( mes->datalen != 0 ) { 118 if ( roar_vio_write(vio, data == NULL ? mes->data : data, mes->datalen) != mes->datalen ) {118 if ( roar_vio_write(vio, data == NULL ? mes->data : data, mes->datalen) != (ssize_t)mes->datalen ) { 119 119 return -1; 120 120 } … … 122 122 123 123 if ( crclen != 0 ) { 124 if ( roar_vio_write(vio, crc, crclen) != crclen ) {124 if ( roar_vio_write(vio, crc, crclen) != (ssize_t)crclen ) { 125 125 return -1; 126 126 } … … 253 253 254 254 if ( mes->datalen <= LIBROAR_BUFFER_MSGDATA ) { 255 if ( roar_vio_read(vio, mes->data, mes->datalen) == mes->datalen ) {255 if ( roar_vio_read(vio, mes->data, mes->datalen) == (ssize_t)mes->datalen ) { 256 256 ROAR_DBG("roar_vrecv_message2(*): Got data!"); 257 257 roar_err_clear(); … … 285 285 } 286 286 287 if ( roar_vio_read(vio, *data, mes->datalen) == mes->datalen ) {287 if ( roar_vio_read(vio, *data, mes->datalen) == (ssize_t)mes->datalen ) { 288 288 ROAR_DBG("roar_vrecv_message2(*): Got data!"); 289 289 -
libroar/roardl.c
r5008 r5270 119 119 void * ret = dlsym(_roardl2ldl(lhandle), sym); 120 120 121 (void)type; 122 121 123 ROAR_DBG("roar_dl_getsym(lhandle=%p, sym='%s', type=%i) = %p", lhandle, sym, type, ret); 122 124 … … 181 183 char * roar_dl_errstr(struct roar_dl_lhandle * lhandle) { 182 184 #if defined(ROAR_HAVE_LIBDL) 185 (void)lhandle; 183 186 return dlerror(); 184 187 #else -
libroar/serverinfo.c
r4708 r5270 155 155 struct roar_server_info * ret = NULL; 156 156 uint16_t * d16, * dptr; 157 int idx;158 int i;157 size_t idx; 158 size_t i; 159 159 size_t needlen = 4; 160 160 char * textpart; -
libroar/slp.c
r4805 r5270 48 48 struct roar_slp_cookie * self = cookie; 49 49 50 (void)hslp; 51 50 52 ROAR_DBG("roar_slp_url_callback(*) = ?"); 51 53 -
libroar/socket.c
r5261 r5270 1088 1088 1089 1089 if ( app_len > 0 ) 1090 if ( write(fh, app, app_len) != app_len )1090 if ( write(fh, app, app_len) != (ssize_t)app_len ) 1091 1091 return -1; 1092 1092 -
libroar/stream.c
r5240 r5270 510 510 } 511 511 512 if ( data[1] != ROAR_STREAM_PARA_NAME ) {512 if ( data[1] != (uint16_t)ROAR_STREAM_PARA_NAME ) { 513 513 roar_err_set(ROAR_ERROR_TYPEMM); 514 514 return -1; … … 815 815 */ 816 816 817 static struct {817 static const struct { 818 818 int dir; 819 819 const char * name; … … 870 870 */ 871 871 872 static struct {873 intcodec;874 const char * name;875 const char * mime;872 static const struct { 873 const uint32_t codec; 874 const char * name; 875 const char * mime; 876 876 } _libroar_codec[] = { 877 877 // PCM: … … 975 975 }; 976 976 977 int roar_str2codec(const char * codec) {978 int i;977 int32_t roar_str2codec(const char * codec) { 978 size_t i; 979 979 int guess; 980 980 … … 985 985 return guess; 986 986 987 for (i = 0; _libroar_codec[i].codec != -1; i++)987 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 988 988 if ( strcasecmp(_libroar_codec[i].name, codec) == 0 ) 989 989 return _libroar_codec[i].codec; … … 994 994 995 995 996 const char * roar_codec2str (const int codec) {996 const char * roar_codec2str (const uint32_t codec) { 997 997 int i; 998 998 999 for (i = 0; _libroar_codec[i].codec != -1; i++)999 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1000 1000 if ( _libroar_codec[i].codec == codec ) 1001 1001 return _libroar_codec[i].name; … … 1004 1004 } 1005 1005 1006 int 1007 int i;1006 int32_t roar_mime2codec (const char * mime) { 1007 size_t i; 1008 1008 1009 1009 if ( mime == NULL ) { … … 1017 1017 } 1018 1018 1019 for (i = 0; _libroar_codec[i].codec != -1; i++)1019 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1020 1020 if ( _libroar_codec[i].mime != NULL ) 1021 1021 if ( strcasecmp(_libroar_codec[i].mime, mime) == 0 ) … … 1026 1026 } 1027 1027 1028 const char * roar_codec2mime (const intcodec) {1029 int i;1030 1031 for (i = 0; _libroar_codec[i].codec != -1; i++)1028 const char * roar_codec2mime (const uint32_t codec) { 1029 size_t i; 1030 1031 for (i = 0; _libroar_codec[i].codec != (uint32_t)-1; i++) 1032 1032 if ( _libroar_codec[i].codec == codec ) 1033 1033 return _libroar_codec[i].mime; … … 1110 1110 } 1111 1111 1112 static struct {1112 static const struct { 1113 1113 int role; 1114 1114 const char * name; … … 1209 1209 } 1210 1210 1211 static struct {1211 static const struct { 1212 1212 const char * name; 1213 1213 struct roar_audio_info info; -
libroar/trap.c
r4784 r5270 54 54 size_t i; 55 55 56 for (i = 0; i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != -1; i++); 56 for (i = 0; 57 i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != (unsigned int)-1; 58 i++); 57 59 if ( i == (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) ) 58 60 return -1; … … 68 70 size_t i; 69 71 70 for (i = 0; i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != -1; i++) { 72 for (i = 0; 73 i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != (unsigned int)-1; 74 i++) { 71 75 if ( _libroar_trap_groups[i].id == group ) 72 76 return _libroar_trap_groups[i].name; … … 79 83 size_t i; 80 84 81 for (i = 0; i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != -1; i++) { 85 for (i = 0; 86 i < (sizeof(_libroar_trap_groups)/sizeof(*_libroar_trap_groups)) && _libroar_trap_groups[i].id != (unsigned int)-1; 87 i++) { 82 88 if ( !strcasecmp(_libroar_trap_groups[i].name, name) ) 83 89 return _libroar_trap_groups[i].id; … … 128 134 } 129 135 #else 136 (void)group, (void)name, (void)line, (void)file, (void)prefix; 130 137 return; 131 138 #endif -
libroar/vio.c
r5260 r5270 686 686 // null 687 687 ssize_t roar_vio_null_rw (struct roar_vio_calls * vio, void *buf, size_t count) { 688 (void)count; 689 688 690 if ( vio == NULL || buf == NULL ) { 689 691 roar_err_set(ROAR_ERROR_FAULT); … … 695 697 696 698 int roar_vio_null_sync (struct roar_vio_calls * vio) { 699 (void)vio; 697 700 return 0; 698 701 } -
libroar/vio_dstr.c
r5257 r5270 37 37 38 38 #ifndef ROAR_WITHOUT_VIO_DSTR 39 st ruct _roar_vio_dstr_type {39 static struct _roar_vio_dstr_type { 40 40 const int id; 41 41 const char * name; -
libroar/vio_jumbo.c
r4708 r5270 147 147 148 148 // TODO: do this a bit more intelergent (RE?) 149 if ( roar_vio_write(self->backend, data, self->pos) != self->pos )149 if ( roar_vio_write(self->backend, data, self->pos) != (ssize_t)self->pos ) 150 150 return -1; 151 151 -
libroar/vio_misc.c
r4876 r5270 55 55 56 56 static off_t roar_vio_misc_lseek (struct roar_vio_calls * vio, off_t offset, int whence) { 57 (void)vio, (void)offset, (void)whence; 57 58 return 0; 58 59 } … … 71 72 72 73 static int roar_vio_misc_sync (struct roar_vio_calls * vio) { 74 (void)vio; 73 75 return 0; 74 76 } … … 98 100 99 101 static int roar_vio_misc_close (struct roar_vio_calls * vio) { 102 (void)vio; 100 103 return 0; 101 104 } … … 119 122 120 123 static ssize_t roar_vio_misc_op_return_len (void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) { 124 (void)buf, (void)vio, (void)callbacks; 121 125 return len; 122 126 } 123 127 124 128 static ssize_t roar_vio_misc_op_return_zero(void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) { 129 (void)buf, (void)len, (void)vio, (void)callbacks; 125 130 return 0; 126 131 } 127 132 128 133 static ssize_t roar_vio_misc_op_zero(void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) { 134 (void)vio, (void)callbacks; 129 135 memset(buf, 0, len); 130 136 return len; … … 133 139 static ssize_t roar_vio_misc_op_full(void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) 134 140 { 141 (void)buf, (void)len, (void)vio, (void)callbacks; 135 142 roar_err_set(ROAR_ERROR_NOSPC); 136 143 return -1; … … 138 145 139 146 static ssize_t roar_vio_misc_op_random_nonce(void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) { 147 (void)vio, (void)callbacks; 148 140 149 if ( roar_random_gen_nonce(buf, len) == -1 ) 141 150 return -1; … … 145 154 146 155 static ssize_t roar_vio_misc_op_random_salt_nonce(void * buf, size_t len, struct roar_vio_calls * vio, struct roar_vio_misc * callbacks) { 156 (void)vio, (void)callbacks; 157 147 158 if ( roar_random_salt_nonce(buf, len) == -1 ) 148 159 return -1; -
libroar/vio_pipe.c
r4708 r5270 215 215 // we may add fdatasync() calls here depending on the type 216 216 // but in general they should not be needed on pipes. 217 (void)vio; 217 218 return 0; 218 219 } -
libroar/vio_stdio.c
r5088 r5270 62 62 #endif 63 63 64 // (void)flags is the the individual sections because later added APIs 65 // may require those flags. 66 64 67 if ( calls == NULL ) 65 68 return NULL; 66 69 67 70 #if defined(ROAR_HAVE_FOPENCOOKIE) 71 (void)flags; 72 68 73 memset(&foc_funcs, 0, sizeof(cookie_io_functions_t)); 69 74 … … 74 79 return fopencookie((void*) calls, "rw", foc_funcs); 75 80 #elif defined(ROAR_HAVE_FUNOPEN) 81 (void)flags; 82 76 83 return funopen((void*) calls, roar_vio_to_stdio_read, roar_vio_to_stdio_write, 77 84 roar_vio_to_stdio_lseek, roar_vio_to_stdio_close); -
libroar/vio_tantalos.c
r5028 r5270 62 62 time_t now = time(NULL); 63 63 64 (void)dst; 65 64 66 if ( (cookie = roar_vio_open_get_cookie(0)) == NULL ) 65 67 return -1; -
libroar/vio_zlib.c
r4956 r5270 51 51 52 52 static void * _zalloc(voidpf opaque, uInt items, uInt size) { 53 (void)opaque; 53 54 return roar_mm_calloc(items, size); 54 55 } 55 56 56 57 static void _zfree(voidpf opaque, voidpf address) { 58 (void)opaque; 57 59 roar_mm_free(address); 58 60 } … … 220 222 count -= len; 221 223 222 if ( len == buflen ) {224 if ( len == (ssize_t)buflen ) { 223 225 ret = roar_buffer_next(&(self->inbuf)); 224 226 } else { … … 342 344 if ( len == -1 ) { 343 345 return -1; 344 } else if ( len == buflen ) {346 } else if ( len == (ssize_t)buflen ) { 345 347 if ( roar_buffer_next(&(self->outbuf)) == -1 ) { 346 348 roar_err_set((self->compressor_error = ROAR_ERROR_LOSTSYNC)); … … 389 391 len = roar_vio_write(self->next, outbuf, outlen); 390 392 391 if ( len < outlen ) {393 if ( len < (ssize_t)outlen ) { 392 394 if ( roar_buffer_new_data(&leftbuf, outlen - len, &leftbufdata) == -1 ) { 393 395 roar_err_set((self->compressor_error = ROAR_ERROR_LOSTSYNC)); … … 428 430 429 431 static off_t roar_vio_zlib_lseek (struct roar_vio_calls * vio, off_t offset, int whence) { 432 (void)vio, (void)offset, (void)whence; 430 433 roar_err_set(ROAR_ERROR_NOSYS); 431 434 return (off_t)-1; -
libroar/vs.c
r5262 r5270 160 160 ssize_t offset; 161 161 int cmd, subcmd; 162 int i;162 size_t i; 163 163 164 164 if ( roar_recv_message(vss->con, &mes, &data) == -1 ) { … … 1154 1154 } 1155 1155 1156 if ( channels != oldchannels )1156 if ( channels != (size_t)oldchannels ) 1157 1157 mode = ROAR_SET_VOL_UNMAPPED; 1158 1158 -
libroararts/Makefile
r4748 r5270 8 8 #DEFINES = -DDEBUG 9 9 INCLUDE = -I../include -I../include/libroarpulse 10 CFLAGS += -g -Wall $( OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)11 LDFLAGS+= -g $(LDPATH) -L../lib/10 CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 11 LDFLAGS+= -g -Wall $(Wextra) $(LDPATH) -L../lib/ 12 12 LIBS = $(LIBROAR) 13 13 -
libroardsp/Makefile
r5269 r5270 17 17 INCLUDE = -I../include -I../include/libroardsp 18 18 CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 19 LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)19 LDFLAGS+= -g -Wall $(SHARED) -L../lib/ $(LDPATH) 20 20 21 21 LIBS = $(LIBROARDSP_NS) -
libroardsp/alaw.c
r5210 r5270 58 58 59 59 #ifdef ROAR_SUPPORT_ALAW 60 int16_t _roardsp_alaw2pcm16[] = {60 static const int16_t _roardsp_alaw2pcm16[] = { 61 61 /* -------- SUN -------- */ 62 62 -5504, -5248, -6016, -5760, -4480, -4224, -4992, … … 101 101 102 102 #ifdef ROAR_SUPPORT_ALAW_RW 103 int8_t _roardsp_pcm132alaw[] = {103 static const int8_t _roardsp_pcm132alaw[] = { 104 104 /* -------- SUN -------- */ 105 105 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, -
libroardsp/amp.c
r4708 r5270 30 30 case 8: return roar_amp_pcm_8bit (output, input, samples, channels, set); break; 31 31 case 16: return roar_amp_pcm_16bit(output, input, samples, channels, set); break; 32 case 24: return roar_amp_pcm_24bit(output, input, samples, channels, set); break;33 32 case 32: return roar_amp_pcm_32bit(output, input, samples, channels, set); break; 34 33 default: return -1; … … 88 87 } 89 88 90 int roar_amp_pcm_24bit (void * output, void * input, int samples, int channels, struct roar_mixer_settings * set) {91 return -1;92 }93 94 89 int roar_amp_pcm_32bit (int32_t * output, int32_t * input, int samples, int channels, struct roar_mixer_settings * set) { 95 90 #ifdef ROAR_NATIVE_INT64 -
libroardsp/channels.c
r4708 r5270 93 93 94 94 int roardsp_chanlist2str(char * list, size_t len, char * str, size_t strlen) { 95 size_t i; 95 96 char * name; 96 int i;97 97 98 98 if ( list == NULL && len > 0 ) -
libroardsp/filter.c
r5269 r5270 26 26 #include "libroardsp.h" 27 27 28 st ruct _roardsp_filterlist {28 static struct _roardsp_filterlist { 29 29 int id; 30 30 char * name; -
libroardsp/filter_agc.c
r4708 r5270 28 28 int roardsp_agc_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 29 29 struct roardsp_agc * self = roar_mm_malloc(sizeof(struct roardsp_agc)); 30 31 (void)id; 30 32 31 33 if ( self == NULL ) -
libroardsp/filter_amp.c
r5181 r5270 28 28 int roardsp_amp_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 29 29 struct roardsp_amp * self = roar_mm_malloc(sizeof(struct roardsp_amp)); 30 31 (void)stream, (void)id; 30 32 31 33 if ( self == NULL ) -
libroardsp/filter_clip.c
r5177 r5270 27 27 28 28 int roardsp_clip_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 29 (void)stream, (void)id; 30 29 31 if ( (filter->inst = roar_mm_malloc(sizeof(struct roardsp_clip))) == NULL ) 30 32 return -1; -
libroardsp/filter_dcblock.c
r4708 r5270 29 29 struct roardsp_dcblock * inst = roar_mm_malloc(sizeof(struct roardsp_dcblock)); 30 30 // roardsp_downmix_ctl(filter, ROARDSP_FCTL_MODE, &mode); 31 32 (void)stream, (void)id; 31 33 32 34 if ( inst == NULL ) { -
libroardsp/filter_highp.c
r5181 r5270 31 31 struct roardsp_highp * self = roar_mm_malloc(sizeof(struct roardsp_highp)); 32 32 33 (void)stream, (void)id; 34 33 35 if ( self == NULL ) 34 36 return -1; … … 52 54 int##bits##_t * samp = (int##bits##_t *) data; \ 53 55 register int##twobits##_t s, h; \ 54 int i, c; \55 int channels = filter->channels; \56 size_t i, c; \ 57 size_t channels = filter->channels; \ 56 58 \ 57 59 if ( channels > ROAR_MAX_CHANNELS ) \ -
libroardsp/filter_lowp.c
r5181 r5270 31 31 struct roardsp_lowp * self = roar_mm_malloc(sizeof(struct roardsp_lowp)); 32 32 33 (void)stream, (void)id; 34 33 35 ROAR_DBG("roardsp_lowp_init(*): self=%p", self); 34 36 … … 53 55 int##bits##_t * samp = (int##bits##_t *) data; \ 54 56 register int##twobits##_t s; \ 55 int i, c; \56 int channels = filter->channels; \57 size_t i, c; \ 58 size_t channels = filter->channels; \ 57 59 \ 58 60 if ( channels > ROAR_MAX_CHANNELS ) \ -
libroardsp/filter_quantify.c
r5181 r5270 27 27 28 28 int roardsp_quantify_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 29 30 (void)stream, (void)id; 29 31 30 32 roardsp_filter_reset(filter, ROARDSP_RESET_FULL); -
libroardsp/filter_responsecurve.c
r5269 r5270 29 29 struct roardsp_responsecurve * self = roar_mm_malloc(sizeof(struct roardsp_responsecurve)); 30 30 31 (void)stream, (void)id; 32 31 33 ROAR_DBG("roardsp_responsecurve_init(filter=%p, stream=%p, id=%i) = ?", filter, stream, id); 32 34 … … 50 52 51 53 static double __func_pass(double i, double N) { 54 (void)N; 52 55 return i; 53 56 } … … 70 73 71 74 static double __func_cos(double i, double N) { 75 (void)N; 72 76 return 0.5 - cos(i * M_PI)/2.; 73 77 } 74 78 75 79 static double __func_icos(double i, double N) { 80 (void)N; 76 81 return 2.*i - 0.5 + cos(i * M_PI)/2.; 77 82 } -
libroardsp/filter_swap.c
r5181 r5270 28 28 int roardsp_swap_init (struct roardsp_filter * filter, struct roar_stream * stream, int id) { 29 29 struct roardsp_swap * inst = roar_mm_malloc(sizeof(struct roardsp_swap)); 30 31 (void)stream, (void)id; 30 32 31 33 ROAR_DBG("roardsp_swap_init(*): inst=%p", inst); … … 60 62 size_t i; \ 61 63 \ 64 (void)filter; \ 65 \ 62 66 for (i = 0; i < samples; i += 2) { \ 63 67 ROAR_DBG("roardsp_swap_calc*2(*): d[i]=%i, d[i+1]=%i", d[i], d[i+1]); \ … … 75 79 76 80 int roardsp_swap_ctl (struct roardsp_filter * filter, int cmd, void * data) { 81 (void)filter, (void)cmd, (void)data; 82 roar_err_set(ROAR_ERROR_NOSYS); 77 83 return -1; 78 84 } -
libroardsp/interleave.c
r4708 r5270 27 27 28 28 int roar_interl_init (struct roar_interleave * state, size_t channels, size_t bits) { 29 if ( state == NULL ) 29 if ( state == NULL ) { 30 roar_err_set(ROAR_ERROR_FAULT); 30 31 return -1; 32 } 31 33 32 34 // we can currently only hanle full bytes: … … 35 37 36 38 // currently we have a channel limit 37 if ( channels > ROAR_INTERLEAVE_MAX_CHANNELS ) 39 if ( channels > ROAR_INTERLEAVE_MAX_CHANNELS ) { 40 roar_err_set(ROAR_ERROR_RANGE); 38 41 return -1; 42 } 39 43 40 44 memset(state, 0, sizeof(struct roar_interleave)); … … 47 51 48 52 int roar_interl_uninit(struct roar_interleave * state) { 49 if ( state == NULL ) 53 if ( state == NULL ) { 54 roar_err_set(ROAR_ERROR_FAULT); 50 55 return -1; 56 } 51 57 52 58 memset(state, 0, sizeof(struct roar_interleave)); … … 56 62 57 63 int roar_interl_ctl (struct roar_interleave * state, int cmd, void * data) { 58 if ( state == NULL ) 64 if ( state == NULL ) { 65 roar_err_set(ROAR_ERROR_FAULT); 59 66 return -1; 67 } 60 68 69 (void)state, (void)cmd, (void)data; 70 71 roar_err_set(ROAR_ERROR_NOSYS); 61 72 return -1; 62 73 } … … 68 79 char * ip[ROAR_INTERLEAVE_MAX_CHANNELS]; // output pointer 69 80 70 if ( state == NULL ) 81 if ( state == NULL ) { 82 roar_err_set(ROAR_ERROR_FAULT); 71 83 return -1; 84 } 72 85 73 if ( in == NULL || out == NULL ) 86 if ( in == NULL || out == NULL ) { 87 roar_err_set(ROAR_ERROR_FAULT); 74 88 return -1; 89 } 75 90 76 91 if ( len == 0 ) -
libroardsp/mixer.c
r4708 r5270 30 30 case 8: return roar_mix_pcm_8bit (output, (int8_t **)input, samples); break; 31 31 case 16: return roar_mix_pcm_16bit(output, (int16_t **)input, samples); break; 32 case 24: return roar_mix_pcm_24bit(output, input, samples); break;33 32 case 32: return roar_mix_pcm_32bit(output, (int32_t **)input, samples); break; 34 33 default: return -1; … … 82 81 } 83 82 84 int roar_mix_pcm_24bit (void * output, void ** input, int samples) {85 return -1;86 }87 88 83 int roar_mix_pcm_32bit (int32_t * output, int32_t ** input, int samples) { 89 84 #ifdef ROAR_NATIVE_INT64 -
libroardsp/mulaw.c
r4708 r5270 58 58 59 59 #ifdef ROAR_SUPPORT_MULAW 60 int16_t _roardsp_mulaw2pcm16[] = {60 static const int16_t _roardsp_mulaw2pcm16[] = { 61 61 /* -------- SUN -------- */ 62 62 -32124, -31100, -30076, -29052, -28028, -27004, -25980, … … 101 101 102 102 #ifdef ROAR_SUPPORT_MULAW_RW 103 int8_t _roardsp_pcm142mulaw[] = {103 static const int8_t _roardsp_pcm142mulaw[] = { 104 104 /* -------- SUN -------- */ 105 105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -
libroardsp/poly.c
r4881 r5270 102 102 103 103 int roar_math_mkpoly_5x5 (float * poly, float * data) { 104 roar_err_set(ROAR_ERROR_NOSYS); 104 105 return -1; 105 106 } -
libroardsp/synth.c
r4708 r5270 96 96 float cv0, cv1; 97 97 #endif 98 int i;98 size_t i; 99 99 100 100 _CHECK_PCMOUT(); … … 133 133 // basic SINFs: 134 134 float roar_synth_synf_rect (float t, struct roar_synth_state * state) { 135 (void)state; 136 135 137 t /= 2*M_PI; 136 138 t -= (int)t; … … 143 145 144 146 float roar_synth_synf_saw (float t, struct roar_synth_state * state) { 147 (void)state; 148 145 149 t /= 2*M_PI; 146 150 t -= (int)t; … … 150 154 151 155 float roar_synth_synf_tri (float t, struct roar_synth_state * state) { 156 (void)state; 157 152 158 t /= 2*M_PI; 153 159 t -= (int)t; … … 160 166 161 167 float roar_synth_synf_trap (float t, struct roar_synth_state * state) { 168 (void)state; 169 162 170 t /= 2*M_PI; 163 171 t -= (int)t; … … 176 184 #ifdef ROAR_HAVE_LIBM 177 185 float roar_synth_synf_s2s (float t, struct roar_synth_state * state) { 186 (void)state; 187 178 188 float sin2 = sinf(t/1.2); 179 189 -
libroardsp/transcode.c
r4708 r5270 264 264 } 265 265 266 while ( ringstats.bytes > state->packet_len ) {266 while ( (ssize_t)ringstats.bytes > state->packet_len ) { 267 267 curlen = state->packet_len; 268 268 if ( roar_buffer_shift_out(&(state->iobuffer), bufdata, &curlen) == -1 ) { … … 421 421 // dummy functions used by some de/encoders: 422 422 int roar_xcoder_dummy_inituninit(struct roar_xcoder * state) { 423 (void)state; 423 424 return 0; 424 425 } … … 426 427 int roar_xcoder_dummy_packet_size_any(struct roar_xcoder * state, int samples) { 427 428 // the case samples=-1/samples!=-1 based things are done in the general func 429 (void)state, (void)samples; 428 430 return 0; 429 431 } 430 432 431 433 int roar_xcoder_dummy_proc_header(struct roar_xcoder * state) { 434 (void)state; 432 435 return 0; 433 436 } -
libroardsp/transcode_mualaw.c
r4708 r5270 36 36 return -1; 37 37 38 #define _SEND_RETURN() if ( roar_vio_write(state->backend, iobuf, outbyte) != outbyte ) \38 #define _SEND_RETURN() if ( roar_vio_write(state->backend, iobuf, outbyte) != (ssize_t)outbyte ) \ 39 39 return -1; \ 40 40 return 0; 41 41 42 #define _READ() if ( roar_vio_read(state->backend, iobuf, outbyte) != outbyte ) \42 #define _READ() if ( roar_vio_read(state->backend, iobuf, outbyte) != (ssize_t)outbyte ) \ 43 43 return -1; 44 44 -
libroardsp/vio_transcode.c
r4708 r5270 76 76 return !ret ? count : -1; 77 77 #else 78 return !roar_xcoder_proc(vio->inst, buf, count) ? count : -1;78 return !roar_xcoder_proc(vio->inst, buf, count) ? (ssize_t)count : -1; 79 79 #endif 80 80 } … … 137 137 return -1; 138 138 139 return !roar_bixcoder_read(vio->inst, buf, count) ? count : -1;139 return !roar_bixcoder_read(vio->inst, buf, count) ? (ssize_t)count : -1; 140 140 } 141 141 … … 148 148 return -1; 149 149 150 return !roar_bixcoder_write(vio->inst, buf, count) ? count : -1;150 return !roar_bixcoder_write(vio->inst, buf, count) ? (ssize_t)count : -1; 151 151 } 152 152 -
libroareio/Makefile
r4748 r5270 11 11 #DEFINES = -DDEBUG 12 12 INCLUDE = -I../include -I../include/libroareio 13 CFLAGS += -g -Wall $( OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)14 LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)13 CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 14 LDFLAGS+= -g -Wall $(Wextra) $(SHARED) -L../lib/ $(LDPATH) 15 15 LIBS = $(LIBROAREIO_NS) 16 16 -
libroareio/driver.c
r5242 r5270 34 34 int roar_cdriver_null(struct roar_vio_calls * calls, const char * name, const char * dev, struct roar_audio_info * info, int dir) { 35 35 ROAR_DBG("roar_cdriver_null(calls=%p, name='%s', dev='%s', info=%p{...}, dir=%i(?)) = ?", calls, name, dev, info, dir); 36 37 (void)name, (void)dev, (void)info, (void)dir; 36 38 37 39 memset(calls, 0, sizeof(struct roar_vio_calls)); -
libroareio/driver_oss.c
r5250 r5270 41 41 int blocksizes[] = {11, 12, 13}; 42 42 int blocks[] = {4, 5, 6, 3, 7, 2, 8}; 43 int bs, b;43 size_t bs, b; 44 44 int tmp; 45 45 … … 63 63 struct roar_vio_sysio_ioctl ctl; 64 64 int tmp, ctmp; 65 66 (void)name; 65 67 66 68 // preinit ctl struct, we always pass ints in tmp. … … 113 115 } 114 116 115 if ( tmp != info->channels ) {117 if ( tmp != (int)info->channels ) { 116 118 _err(); 117 119 } … … 182 184 } 183 185 184 if ( tmp != info->rate ) {186 if ( tmp != (int)info->rate ) { 185 187 _err(); 186 188 } -
libroareio/driver_roar.c
r5242 r5270 28 28 29 29 int roar_cdriver_roar(struct roar_vio_calls * calls, const char * name, const char * dev, struct roar_audio_info * info, int dir) { 30 (void)name; 30 31 return roar_vio_simple_stream(calls, info->rate, info->channels, info->bits, info->codec, dev, dir, "libroareio client"); 31 32 } -
libroareio/ff_ssdp.c
r4708 r5270 92 92 return 0; 93 93 } 94 94 95 int roar_ff_ssdp_read (struct roar_vio_calls * vio, struct roar_ff_ssdp * c) { 96 roar_err_set(ROAR_ERROR_NOSYS); 95 97 return -1; 96 98 } -
libroaresd/Makefile
r4748 r5270 11 11 INCLUDE = -I../include -I../include/libroaresd 12 12 CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 13 LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/13 LDFLAGS+= -g -Wall $(SHARED) $(LDPATH) -L../lib/ 14 14 LIBS = $(LIBROAR) 15 15 -
libroaresd/esdbasic.c
r5226 r5270 66 66 /* send the authorization cookie, create one if needed */ 67 67 int esd_send_auth( int sock ) { 68 (void) sock; 68 69 return 0; 69 70 } -
libroaresd/esdctl.c
r5236 r5270 45 45 // so always return -1 46 46 int esd_lock( int esd ) { 47 (void)esd; 48 errno = ENOSYS; 47 49 return -1; 48 50 } 49 51 int esd_unlock( int esd ) { 52 (void)esd; 53 errno = ENOSYS; 50 54 return -1; 51 55 } … … 66 70 67 71 return roar_set_standby(&con, ROAR_STANDBY_INACTIVE); 72 } 73 74 static void _format2str(char * buf, size_t len, esd_format_t format) { 75 76 if ( (format & ESD_BITS16) == ESD_BITS16 ) { 77 roar_mm_strlcat(buf, "16 bit ", len); 78 } else { 79 roar_mm_strlcat(buf, "8 bit ", len); 80 } 81 82 if ( (format & ESD_STEREO) == ESD_STEREO ) { 83 roar_mm_strlcat(buf, "stereo ", len); 84 } else { 85 roar_mm_strlcat(buf, "mono ", len); 86 } 68 87 } 69 88 … … 72 91 char buf[80] = ""; 73 92 74 if ( server_info->format & ESD_BITS16 ) 75 strcat(buf, "16 bit "); 76 else 77 strcat(buf, "8 bit "); 78 79 if ( server_info->format & ESD_STEREO ) 80 strcat(buf, "stereo "); 81 else 82 strcat(buf, "mono "); 93 _format2str(buf, sizeof(buf), server_info->format); 83 94 84 95 printf("server version = %i\n", server_info->version); … … 87 98 } 88 99 89 90 100 void esd_print_player_info( esd_player_info_t *player_info ) { 91 101 char buf[80] = ""; 92 102 93 if ( (player_info->format & ESD_BITS16) == ESD_BITS16 ) 94 strcat(buf, "16 bit "); 95 else 96 strcat(buf, "8 bit "); 97 98 if ( (player_info->format & ESD_STEREO) == ESD_STEREO ) 99 strcat(buf, "stereo "); 100 else 101 strcat(buf, "mono "); 103 _format2str(buf, sizeof(buf), player_info->format); 102 104 103 105 printf("player %i name = %s\n", player_info->source_id, player_info->name); … … 109 111 110 112 void esd_print_sample_info( esd_sample_info_t *sample_info ) { 113 char buf[80] = ""; 114 115 _format2str(buf, sizeof(buf), sample_info->format); 116 117 printf("sample %i name = %s\n", sample_info->sample_id, sample_info->name); 118 printf("sample %i format = 0x%08x %s\n", sample_info->sample_id, sample_info->format, buf); 119 printf("sample %i rate = %i\n", sample_info->sample_id, sample_info->rate); 120 printf("sample %i left = %i\n", sample_info->sample_id, sample_info->left_vol_scale); 121 printf("sample %i right = %i\n", sample_info->sample_id, sample_info->right_vol_scale); 122 printf("sample %i length = %i\n", sample_info->sample_id, sample_info->length); 111 123 } 112 124 … … 282 294 /* retrieve all information from server, and update until unsubsribed or closed */ 283 295 esd_info_t *esd_subscribe_all_info( int esd ) { 296 (void)esd; 297 errno = ENOSYS; 284 298 return NULL; // Not yet implemented in upstream esd 285 299 } … … 288 302 esd_info_t *esd_update_info( int esd, esd_info_t *info, 289 303 esd_update_info_callbacks_t *callbacks ) { 304 (void)esd, (void)info, (void)callbacks; 305 errno = ENOSYS; 290 306 return NULL; // Not yet implemented in upstream esd 291 307 } 292 308 293 309 esd_info_t *esd_unsubscribe_info( int esd ) { 310 (void)esd; 311 errno = ENOSYS; 294 312 return NULL; // Not yet implemented in upstream esd 295 313 } … … 362 380 int esd_set_default_sample_pan( int esd, int sample_id, 363 381 int left_scale, int right_scale ) { 382 // this is not yet implemented by the RA protocol. 383 (void)esd, (void)sample_id, (void)left_scale, (void)right_scale; 384 errno = ENOSYS; 364 385 return -1; 365 386 } -
libroaresd/esdfile.c
r4708 r5270 47 47 } 48 48 int esd_play_file( const char *name_prefix, const char *filename, int fallback ) { 49 // TODO: add support for fallback 50 return roar_simple_play_file((char*)filename, NULL, (char*)name_prefix) == -1 ? -1 : 0; 49 int ret = roar_simple_play_file(filename, NULL, name_prefix); 50 51 if ( ret != -1 ) 52 return 0; 53 54 if ( !fallback ) 55 return -1; 56 57 return roar_simple_play_file(filename, "+fork", name_prefix) == -1 ? -1 : 0; 51 58 } 52 59 int esd_file_cache( int esd, const char *name_prefix, const char *filename ) { -
libroarpulse/Makefile
r4748 r5270 14 14 #DEFINES = -DDEBUG 15 15 INCLUDE = -I../include -I../include/libroarpulse 16 CFLAGS += -g -Wall $( OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)17 LDFLAGS+= -g $(LDPATH) -L../lib/ -L.16 CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 17 LDFLAGS+= -g -Wall $(Wextra) $(LDPATH) -L../lib/ -L. 18 18 LIBS = $(LIBROAR) 19 19 -
libroarpulse/context.c
r4708 r5270 221 221 /** Return non-zero if some data is pending to be written to the connection */ 222 222 int pa_context_is_pending(pa_context *c) { 223 (void)c; 223 224 return 0; 224 225 } … … 334 335 /** Return the protocol version of the library. \since 0.8 */ 335 336 uint32_t pa_context_get_protocol_version(pa_context *c) { 337 (void)c; 336 338 return 0; 337 339 } … … 339 341 /** Return the protocol version of the connected server. \since 0.8 */ 340 342 uint32_t pa_context_get_server_protocol_version(pa_context *c) { 343 (void)c; 341 344 return 0; 342 345 } -
libroarpulse/mainloop-signal.c
r4708 r5270 77 77 int sig; 78 78 size_t ret; 79 #endif 79 80 81 (void)a, (void)e, (void)f, (void)userdata; 82 83 #ifdef ROAR_HAVE_PIPE 80 84 ret = read(fd, &sig, sizeof(sig)); 81 85 -
libroarpulse/mainloop.c
r4708 r5270 273 273 pa_io_event_flags_t events; 274 274 int count = 0; 275 int i, h; 275 int h; 276 nfds_t i; 276 277 277 278 ROAR_DBG("pa_mainloop_dispatch(m=%p) = ?", m); -
libroarpulse/operation.c
r4708 r5270 89 89 void pa_operation_cancel(pa_operation *o) { 90 90 // we ignore this 91 (void)o; 91 92 } 92 93 -
libroarpulse/simple.c
r5239 r5270 59 59 int roar_dir; 60 60 int err = ROAR_ERROR_NONE; 61 62 if ( dev != NULL || map != NULL || attr != NULL ) 63 return NULL; 61 64 62 65 if ( dir == PA_STREAM_PLAYBACK ) { -
libroarpulse/stream.c
r5243 r5270 177 177 /** Return the device (sink input or source output) index this stream is connected to */ 178 178 uint32_t pa_stream_get_index(pa_stream *s) { 179 (void)s; 179 180 return 0; 180 181 } … … 189 190 void * data; 190 191 size_t len; 191 s ize_t ret;192 ssize_t ret; 192 193 int bufret; 194 195 (void)fd, (void)events; 193 196 194 197 ROAR_DBG("_roar_pa_stream_ioecb(*) = ?"); … … 209 212 210 213 // TODO: handle errors 211 if ( ret == len ) {214 if ( ret == (ssize_t)len ) { 212 215 bufret = roar_buffer_next(&(s->iobuffer)); 213 216 } else { … … 289 292 volume = NULL; 290 293 291 if ( attr != NULL || flags != 0 || volume != NULL || sync_stream != NULL ) {294 if ( dev != NULL || attr != NULL || flags != 0 || volume != NULL || sync_stream != NULL ) { 292 295 pa_stream_set_state(s, PA_STREAM_FAILED); 293 296 return -1; -
libroarpulse/timeval.c
r4708 r5270 69 69 tv->tv_usec += v; 70 70 71 while ( tv->tv_usec > 1000000LL U) {72 tv->tv_usec -= 1000000LL U;71 while ( tv->tv_usec > 1000000LL ) { 72 tv->tv_usec -= 1000000LL; 73 73 tv->tv_sec += 1; 74 74 } -
libroarpulse/volume.c
r4708 r5270 62 62 /** Set the volume of all channels to the specified parameter */ 63 63 pa_cvolume* pa_cvolume_set(pa_cvolume *a, unsigned channels, pa_volume_t v) { 64 int i;64 unsigned int i; 65 65 66 66 if ( a == NULL ) -
libroaryiff/Makefile
r4748 r5270 7 7 #DEFINES = -DDEBUG 8 8 INCLUDE = -I../include -I../include/libroaryiff 9 CFLAGS += -g -Wall $( OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)10 LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/9 CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) 10 LDFLAGS+= -g -Wall $(Wextra) $(SHARED) $(LDPATH) -L../lib/ 11 11 LIBS = $(LIBROAR) 12 12 -
libroaryiff/connection.c
r5247 r5270 39 39 YConnection * ycon = roar_mm_malloc(sizeof(YConnection)); 40 40 struct roar_connection con; 41 c har * server = (char *)con_arg;42 c har * name = "libroaryiff client";41 const char * server = (char *)con_arg; 42 const char * name = "libroaryiff client"; 43 43 44 44 memset(ycon, 0, sizeof(YConnection)); … … 75 75 struct roar_vio_calls vio; 76 76 77 // in case we started the server by using +fork we can not keep it running 78 // as it will terminate anyway. If there are any other clients (I guess 79 // this is what this option is about) it will keep running. 80 (void)no_shutdown; 81 77 82 if ( connection == NULL ) 78 83 return; -
libroaryiff/events.c
r5035 r5270 37 37 38 38 // RoarAudio isn't event based, so we need to trick a lot here 39 // Maybe this can be overcome with the notify API 39 40 40 41 int YGetNextEvent (YConnection *con, YEvent *event, Boolean block) { 41 42 struct roar_connection rcon; 42 43 struct roar_stream s; 44 45 (void)block; 43 46 44 47 if ( con == NULL || event == NULL ) -
libroaryiff/file.c
r4708 r5270 37 37 38 38 int YGetSoundObjectAttributes (YConnection *con, const char *path, YEventSoundObjectAttributes *buf) { 39 (void)con; 40 39 41 if ( buf == NULL ) 40 42 return -1; -
libroaryiff/stub.c
r4708 r5270 38 38 // in here only some stub functions are delcared 39 39 40 extern void YSyncAll(YConnection *con, Boolean block) { 40 void YSyncAll(YConnection *con, Boolean block) { 41 (void)con, (void)block; 41 42 } 42 43 -
roard/Makefile
r5242 r5270 19 19 INCLUDE = -I../include -I./include 20 20 CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(PKGDEFINES) $(INCLUDE) $(INCPATH) 21 LDFLAGS += -g - rdynamic -L../lib/ $(LDPATH)21 LDFLAGS += -g -Wall -rdynamic -L../lib/ $(LDPATH) 22 22 DRVLIBS = $(lib_esd) $(lib_ossaudio) $(lib_ao) $(lib_shout) $(lib_sndio) $(lib_rsound) $(lib_portaudio) $(lib_pablio) $(lib_asound) $(lib_winmm) $(lib_pulse_simple) $(lib_pulse) $(lib_jack) $(lib_artsc) 23 23 CODEC_CELT= $(lib_celt) $(lib_celt0) -
roard/codecfilter_alaw.c
r4957 r5270 38 38 struct roar_stream * s = ROAR_STREAM(info); 39 39 40 (void)codec, (void)filter; 40 41 41 42 *inst = (CODECFILTER_USERDATA_T) info; … … 48 49 49 50 int cf_alaw_close(CODECFILTER_USERDATA_T inst) { 51 (void)inst; 50 52 return 0; 51 53 } -
roard/codecfilter_au.c
r5210 r5270 34 34 struct roar_stream * s = ROAR_STREAM(info); 35 35 36 if ( !self ) 36 (void)codec, (void)filter; 37 38 if ( self == NULL ) 37 39 return -1; 38 40 … … 99 101 return -1; 100 102 101 if ( stream_vio_s_read(self->stream, extra_header, header[1]) != header[1] ) {103 if ( stream_vio_s_read(self->stream, extra_header, header[1]) != (ssize_t)header[1] ) { 102 104 roar_mm_free(extra_header); 103 105 return -1; … … 275 277 int_least32_t type = cmd & ROAR_STREAM_CTL_TYPEMASK; 276 278 279 (void)data; 280 277 281 cmd -= type; 278 282 -
roard/codecfilter_celt.c
r4957 r5270 37 37 struct roar_stream * s = ROAR_STREAM(info); 38 38 39 if ( !self ) 39 (void)codec, (void)filter; 40 41 if ( self == NULL ) 40 42 return -1; 41 43 -
roard/codecfilter_mulaw.c
r4957 r5270 38 38 struct roar_stream * s = ROAR_STREAM(info); 39 39 40 (void)codec, (void)filter; 40 41 41 42 *inst = (CODECFILTER_USERDATA_T) info; … … 48 49 49 50 int cf_mulaw_close(CODECFILTER_USERDATA_T inst) { 51 (void)inst; 50 52 return 0; 51 53 } -
roard/codecfilter_sndfile.c
r4957 r5270 32 32 struct roar_codecfilter * filter) { 33 33 struct codecfilter_sndfile_inst * obj; 34 35 (void)codec, (void)filter; 34 36 35 37 if ( (obj = (struct codecfilter_sndfile_inst *) roar_mm_malloc(sizeof(struct codecfilter_sndfile_inst))) == NULL ) -
roard/codecfilter_vorbis.c
r5218 r5270 71 71 struct roar_stream * s = ROAR_STREAM(info); 72 72 73 if ( !self ) 73 (void)codec, (void)filter; 74 75 if ( self == NULL ) 74 76 return -1; 75 77 -
roard/emul_rsound.c
r4739 r5270 39 39 char c[16]; 40 40 } buf; 41 42 (void)lsock; 41 43 42 44 // TODO: add error handling -
roard/signals.c
r4708 r5270 38 38 39 39 void on_sig_term (int signum) { 40 (void)signum; 41 40 42 ROAR_INFO("got SIGTERM (or called by SIGINT handler)", ROAR_DBG_INFO_NOTICE); 41 43 … … 45 47 46 48 void on_sig_chld (int signum) { 49 (void)signum; 50 47 51 ROAR_INFO("got SIGCHLD", ROAR_DBG_INFO_NOTICE); 48 52 … … 53 57 54 58 void on_sig_usr1 (int signum) { 59 (void)signum; 60 55 61 ROAR_INFO("got SIGUSR1", ROAR_DBG_INFO_NOTICE); 56 62 -
roarfish/Makefile
r4804 r5270 8 8 #DEFINES = -DDEBUG 9 9 INCLUDE = -I../include -I./include 10 CFLAGS += -g -Wall $( OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH)11 LDFLAGS+= -g - L../lib/ $(LDPATH)10 CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) 11 LDFLAGS+= -g -Wall $(Wextra) -L../lib/ $(LDPATH) 12 12 LIBS = $(LIBROAR) $(lib_fishsound) $(lib_oggz) 13 13 -
roarfish/include/roarfish.h
r4708 r5270 42 42 #include <sndfile.h> 43 43 44 int play (c har * file, char ** opts);44 int play (const char * file, char ** opts); 45 45 46 46 #ifdef __USE_SVID -
roarfish/play.c
r4908 r5270 63 63 64 64 65 roar_vs_write(inst->vss, (char*)data, frames * 2, NULL); 65 if ( roar_vs_write(inst->vss, (char*)data, frames * 2, NULL) != (ssize_t)(frames * 2) ) { 66 return -1; 67 } 66 68 67 69 … … 74 76 FishSound * fsound = (FishSound *)user_data; 75 77 76 fish_sound_prepare_truncation (fsound, op->granulepos, op->e_o_s); 77 fish_sound_decode (fsound, op->packet, op->bytes); 78 (void)oggz, (void)serialno; 79 80 fish_sound_prepare_truncation(fsound, op->granulepos, op->e_o_s); 81 fish_sound_decode(fsound, op->packet, op->bytes); 78 82 79 83 return 0; 80 84 } 81 85 82 int play (c har * file, char ** opts) {86 int play (const char * file, char ** opts) { 83 87 OGGZ * oggz; 84 88 struct roarfish_play_inst inst; 89 90 (void)opts; 85 91 86 92 inst.vss = NULL;
Note: See TracChangeset
for help on using the changeset viewer.