Changeset 5210:8eb738dee9d4 in roaraudio for roard


Ignore:
Timestamp:
11/01/11 12:23:05 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Updated ports to minimal, win32 and avr (pr2)

Location:
roard
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • roard/caps.c

    r4708 r5210  
    7171  version = ROAR_STD_VERSION(cap); 
    7272  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)); 
    7474  } 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); 
    7676  } 
    7777  if ( snpret > 0 ) { 
  • roard/codecfilter.c

    r4708 r5210  
    269269    strcpy(delay, "dyn"); 
    270270   } else { 
    271     snprintf(delay, 5, "%ims", d/1000); 
     271    snprintf(delay, 5, "%ims", (int)(d/(uint_least32_t)1000)); 
    272272   } 
    273273  } 
  • roard/codecfilter_au.c

    r4708 r5210  
    9393   header[1] -= ROAR_AU_MIN_HEADER_LEN; 
    9494 
    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... 
    9696    return -1; 
    9797 
  • roard/hwmixer.c

    r4852 r5210  
    238238 int ret; 
    239239 int error = 0; 
     240 char * strtok_store; 
    240241//int hwmixer_open(int basestream, char * drv, char * dev, int fh, char * basename, char * subnames) { 
    241242 
     
    248249  k = NULL; 
    249250 } else { 
    250   k = strtok(opts, ","); 
     251  k = roar_mm_strtok_r(opts, ",", &strtok_store); 
    251252 } 
    252253 
     
    281282  } 
    282283 
    283   k = strtok(NULL, ","); 
     284  k = roar_mm_strtok_r(NULL, ",", &strtok_store); 
    284285 } 
    285286 
  • roard/include/light.h

    r5194 r5210  
    4343} g_light_mixer; 
    4444 
    45 int light_init  (unsigned int channels); 
     45int light_init  (uint32_t channels); 
    4646int light_free  (void); 
    4747 
  • roard/light.c

    r5194 r5210  
    3333// // 
    3434 
    35 int light_init  (unsigned int channels) { 
     35int light_init  (uint32_t channels) { 
    3636 struct roar_stream_server * ss; 
    3737 int i; 
     
    3939 g_light_state.channels = 0; 
    4040 
    41  if ( channels == 0 || channels > (512*512) ) /* unrealstic values */ 
     41 if ( channels == 0 || channels > ((uint32_t)512UL*(uint32_t)512UL) ) /* unrealstic values */ 
    4242  return -1; 
    4343 
  • roard/midi.c

    r5208 r5210  
    282282    switch (mes->kk) { 
    283283     case MIDI_CCE_MAIN_VOL: 
    284        if ( (516 * mes->vv) > 65100 ) { // max volume 
     284       if ( (516U * (unsigned int)mes->vv) > 65100 ) { // max volume 
    285285        ss->mixer.mixer[mes->channel] = 65535; 
    286286       } else { 
     
    611611      switch (mes->kk) { 
    612612       case MIDI_CCE_MAIN_VOL: 
    613          if ( 516 * mes->vv > 65100 ) { // max volume 
     613         if ( 516U * (unsigned int)mes->vv > 65100 ) { // max volume 
    614614          ss->mixer.mixer[mes->channel] = 65535; 
    615615         } else { 
  • roard/output.c

    r5192 r5210  
    189189 uint16_t tu16; 
    190190 float q = -32e6; 
     191 char * strtok_store; 
    191192 
    192193 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); 
     
    244245  k = NULL; 
    245246 } else { 
    246   k = strtok(opts, ","); 
     247  k = roar_mm_strtok_r(opts, ",", &strtok_store); 
    247248 } 
    248249 
     
    375376  } 
    376377 
    377   k = strtok(NULL, ","); 
     378  k = roar_mm_strtok_r(NULL, ",", &strtok_store); 
    378379 } 
    379380 
  • roard/roard.c

    r5194 r5210  
    119119 } else if ( ROAR_NOTIFY_IS_CMD(ev) ) { 
    120120  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)); 
    122122  } else { 
    123123   snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(ROAR_CMD_%s) */", ttname); 
     
    127127  } 
    128128 } 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)); 
    130130 } else if ( ROAR_NOTIFY_IS_OE(ev) ) { 
    131131  switch (ev) { 
     
    155155   // OE Default: 
    156156   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)); 
    158158    break; 
    159159  } 
    160160 } 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)); 
    162162 } 
    163163 
     
    959959#endif 
    960960 
     961#ifdef ROAR_HAVE_MAIN_ARGS 
    961962static void list_aiprofiles (void) { 
    962963 struct roar_audio_info info; 
     
    990991 } 
    991992} 
     993#endif 
    992994 
    993995int update_stream_flags (char * str) { 
     
    13651367 char * k; 
    13661368 enum output_format print_format = FORMAT_NATIVE; 
     1369 const struct rolestack * rolestack; 
    13671370#endif 
    13681371#if defined(ROAR_SUPPORT_LISTEN) && defined(ROAR_HAVE_GETUID) 
     
    13711374 struct roar_audio_info sa, max_sa; 
    13721375 struct roard_config config; 
    1373  const struct rolestack * rolestack; 
    13741376#if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 
    13751377 int    daemon       = 0; 
     
    14121414 enum roard_client_acclev af_acclev    = ACCLEV_ALL; 
    14131415#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    1414  int    light_channels = LIGHT_CHANNELS_DEFAULT; 
     1416 uint32_t light_channels = LIGHT_CHANNELS_DEFAULT; 
    14151417#endif 
    14161418#ifdef ROAR_DEFAULT_SOCKGRP 
     
    26062608 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 
    26072609 
     2610#ifdef ROAR_HAVE_SYSTEM 
    26082611 if ( g_config->scripts.post_shutdown != NULL ) 
    26092612  system(g_config->scripts.post_shutdown); 
     2613#endif 
    26102614 
    26112615 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 
     
    26982702 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 
    26992703 
     2704#ifdef ROAR_HAVE_SYSTEM 
    27002705 if ( g_config->scripts.post_shutdown != NULL ) 
    27012706  system(g_config->scripts.post_shutdown); 
     2707#endif 
    27022708 
    27032709 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 
  • roard/sources.c

    r5194 r5210  
    140140 int f_sync = 0, f_mmap = 0; 
    141141 int codec; 
     142 char * strtok_store; 
    142143 
    143144 if ( source == NULL ) 
     
    166167 s->pos_rel_id = -1; 
    167168 
    168  k = strtok(options, ","); 
     169 k = roar_mm_strtok_r(options, ",", &strtok_store); 
    169170 while (k != NULL) { 
    170171  if ( (v = strstr(k, "=")) != NULL ) { 
     
    214215  } 
    215216 
    216   k = strtok(NULL, ","); 
     217  k = roar_mm_strtok_r(NULL, ",", &strtok_store); 
    217218 } 
    218219 
Note: See TracChangeset for help on using the changeset viewer.