Changeset 5210:8eb738dee9d4 in roaraudio for roard
- Timestamp:
- 11/01/11 12:23:05 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/caps.c
r4708 r5210 71 71 version = ROAR_STD_VERSION(cap); 72 72 if ( version == 0 ) { 73 snpret = snprintf(ret+off, len-off, "%i-%i,", ROAR_STD_VENDOR(cap),ROAR_STD_STD(cap));73 snpret = snprintf(ret+off, len-off, "%i-%i,", (int)ROAR_STD_VENDOR(cap), (int)ROAR_STD_STD(cap)); 74 74 } else { 75 snpret = snprintf(ret+off, len-off, "%i-%i-%i,", ROAR_STD_VENDOR(cap), ROAR_STD_STD(cap),version);75 snpret = snprintf(ret+off, len-off, "%i-%i-%i,", (int)ROAR_STD_VENDOR(cap), (int)ROAR_STD_STD(cap), (int)version); 76 76 } 77 77 if ( snpret > 0 ) { -
roard/codecfilter.c
r4708 r5210 269 269 strcpy(delay, "dyn"); 270 270 } else { 271 snprintf(delay, 5, "%ims", d/1000);271 snprintf(delay, 5, "%ims", (int)(d/(uint_least32_t)1000)); 272 272 } 273 273 } -
roard/codecfilter_au.c
r4708 r5210 93 93 header[1] -= ROAR_AU_MIN_HEADER_LEN; 94 94 95 if ( header[1] > 32*1024) // do not allow more than 32KiB header...95 if ( header[1] > (uint32_t)32768U ) // do not allow more than 32KiB header... 96 96 return -1; 97 97 -
roard/hwmixer.c
r4852 r5210 238 238 int ret; 239 239 int error = 0; 240 char * strtok_store; 240 241 //int hwmixer_open(int basestream, char * drv, char * dev, int fh, char * basename, char * subnames) { 241 242 … … 248 249 k = NULL; 249 250 } else { 250 k = strtok(opts, ",");251 k = roar_mm_strtok_r(opts, ",", &strtok_store); 251 252 } 252 253 … … 281 282 } 282 283 283 k = strtok(NULL, ",");284 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 284 285 } 285 286 -
roard/include/light.h
r5194 r5210 43 43 } g_light_mixer; 44 44 45 int light_init (u nsigned int channels);45 int light_init (uint32_t channels); 46 46 int light_free (void); 47 47 -
roard/light.c
r5194 r5210 33 33 // // 34 34 35 int light_init (u nsigned int channels) {35 int light_init (uint32_t channels) { 36 36 struct roar_stream_server * ss; 37 37 int i; … … 39 39 g_light_state.channels = 0; 40 40 41 if ( channels == 0 || channels > ( 512*512) ) /* unrealstic values */41 if ( channels == 0 || channels > ((uint32_t)512UL*(uint32_t)512UL) ) /* unrealstic values */ 42 42 return -1; 43 43 -
roard/midi.c
r5208 r5210 282 282 switch (mes->kk) { 283 283 case MIDI_CCE_MAIN_VOL: 284 if ( (516 *mes->vv) > 65100 ) { // max volume284 if ( (516U * (unsigned int)mes->vv) > 65100 ) { // max volume 285 285 ss->mixer.mixer[mes->channel] = 65535; 286 286 } else { … … 611 611 switch (mes->kk) { 612 612 case MIDI_CCE_MAIN_VOL: 613 if ( 516 *mes->vv > 65100 ) { // max volume613 if ( 516U * (unsigned int)mes->vv > 65100 ) { // max volume 614 614 ss->mixer.mixer[mes->channel] = 65535; 615 615 } else { -
roard/output.c
r5192 r5210 189 189 uint16_t tu16; 190 190 float q = -32e6; 191 char * strtok_store; 191 192 192 193 ROAR_INFO("add_output(drv='%s', dev='%s', opts='%s', prim=%i, count=%i): trying to add output driver", ROAR_DBG_INFO_INFO, drv, dev, opts, prim, count); … … 244 245 k = NULL; 245 246 } else { 246 k = strtok(opts, ",");247 k = roar_mm_strtok_r(opts, ",", &strtok_store); 247 248 } 248 249 … … 375 376 } 376 377 377 k = strtok(NULL, ",");378 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 378 379 } 379 380 -
roard/roard.c
r5194 r5210 119 119 } else if ( ROAR_NOTIFY_IS_CMD(ev) ) { 120 120 if ( command_get_name(ROAR_NOTIFY_EVENT2CMD(ev), &ttname) == -1 ) { 121 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(% i) */",ROAR_NOTIFY_EVENT2CMD(ev));121 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2CMD(ev)); 122 122 } else { 123 123 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(ROAR_CMD_%s) */", ttname); … … 127 127 } 128 128 } else if ( ROAR_NOTIFY_IS_EGRP(ev) ) { 129 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_EGRP2EVENT(% i) */",ROAR_NOTIFY_EVENT2EGRP(ev));129 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_EGRP2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2EGRP(ev)); 130 130 } else if ( ROAR_NOTIFY_IS_OE(ev) ) { 131 131 switch (ev) { … … 155 155 // OE Default: 156 156 default: 157 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_OE2EVENT(% i) */",ROAR_NOTIFY_EVENT2OE(ev));157 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_OE2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2OE(ev)); 158 158 break; 159 159 } 160 160 } else if ( ROAR_NOTIFY_IS_USER(ev) ) { 161 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_USER2EVENT(% i) */",ROAR_NOTIFY_EVENT2USER(ev));161 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_USER2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2USER(ev)); 162 162 } 163 163 … … 959 959 #endif 960 960 961 #ifdef ROAR_HAVE_MAIN_ARGS 961 962 static void list_aiprofiles (void) { 962 963 struct roar_audio_info info; … … 990 991 } 991 992 } 993 #endif 992 994 993 995 int update_stream_flags (char * str) { … … 1365 1367 char * k; 1366 1368 enum output_format print_format = FORMAT_NATIVE; 1369 const struct rolestack * rolestack; 1367 1370 #endif 1368 1371 #if defined(ROAR_SUPPORT_LISTEN) && defined(ROAR_HAVE_GETUID) … … 1371 1374 struct roar_audio_info sa, max_sa; 1372 1375 struct roard_config config; 1373 const struct rolestack * rolestack;1374 1376 #if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 1375 1377 int daemon = 0; … … 1412 1414 enum roard_client_acclev af_acclev = ACCLEV_ALL; 1413 1415 #ifndef ROAR_WITHOUT_DCOMP_LIGHT 1414 intlight_channels = LIGHT_CHANNELS_DEFAULT;1416 uint32_t light_channels = LIGHT_CHANNELS_DEFAULT; 1415 1417 #endif 1416 1418 #ifdef ROAR_DEFAULT_SOCKGRP … … 2606 2608 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2607 2609 2610 #ifdef ROAR_HAVE_SYSTEM 2608 2611 if ( g_config->scripts.post_shutdown != NULL ) 2609 2612 system(g_config->scripts.post_shutdown); 2613 #endif 2610 2614 2611 2615 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); … … 2698 2702 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2699 2703 2704 #ifdef ROAR_HAVE_SYSTEM 2700 2705 if ( g_config->scripts.post_shutdown != NULL ) 2701 2706 system(g_config->scripts.post_shutdown); 2707 #endif 2702 2708 2703 2709 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); -
roard/sources.c
r5194 r5210 140 140 int f_sync = 0, f_mmap = 0; 141 141 int codec; 142 char * strtok_store; 142 143 143 144 if ( source == NULL ) … … 166 167 s->pos_rel_id = -1; 167 168 168 k = strtok(options, ",");169 k = roar_mm_strtok_r(options, ",", &strtok_store); 169 170 while (k != NULL) { 170 171 if ( (v = strstr(k, "=")) != NULL ) { … … 214 215 } 215 216 216 k = strtok(NULL, ",");217 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 217 218 } 218 219
Note: See TracChangeset
for help on using the changeset viewer.