Changeset 609:093b3891d709 in roaraudio


Ignore:
Timestamp:
08/19/08 21:10:25 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cleanup of casts

Location:
roard
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_celt.c

    r608 r609  
    88                                            struct roar_codecfilter   * filter) { 
    99 struct codecfilter_celt_inst * self = malloc(sizeof(struct codecfilter_celt_inst)); 
    10  struct roar_stream * s = (struct roar_stream *) info; 
     10 struct roar_stream * s = ROAR_STREAM(info); 
    1111 
    1212 if ( !self ) 
  • roard/codecfilter_cmd.c

    r223 r609  
    5959 } 
    6060 
    61  if ( lib_run_bg(cmd, ((struct roar_stream*)info)->fh, socks[1], ROAR_STDERR, socks, 2) == -1 ) 
     61 if ( lib_run_bg(cmd, ROAR_STREAM(info)->fh, socks[1], ROAR_STDERR, socks, 2) == -1 ) 
    6262  return -1; 
    6363 
     
    6969    g_clients[info->client]->fh = socks[0]; 
    7070   } else { 
    71     close(((struct roar_stream*)info)->fh); 
     71    close(ROAR_STREAM(info)->fh); 
    7272   } 
    7373  } else { 
    74    close(((struct roar_stream*)info)->fh); 
     74   close(ROAR_STREAM(info)->fh); 
    7575  } 
    7676 } else { 
    77   close(((struct roar_stream*)info)->fh); 
     77  close(ROAR_STREAM(info)->fh); 
    7878 } 
    7979 
    80  ((struct roar_stream*)info)->fh = socks[0]; 
    81  ((struct roar_stream*)info)->info.codec = ROAR_CODEC_DEFAULT; 
     80 ROAR_STREAM(info)->fh = socks[0]; 
     81 ROAR_STREAM(info)->info.codec = ROAR_CODEC_DEFAULT; 
    8282 close(socks[1]); 
    8383 
  • roard/codecfilter_speex.c

    r608 r609  
    88                                            struct roar_codecfilter   * filter) { 
    99 struct codecfilter_speex_inst * self = malloc(sizeof(struct codecfilter_speex_inst)); 
    10  struct roar_stream * s = (struct roar_stream *) info; 
     10 struct roar_stream * s = ROAR_STREAM(info); 
    1111 
    1212 *inst = NULL; 
  • roard/codecfilter_wave.c

    r606 r609  
    77                                            struct roar_codecfilter   * filter) { 
    88 struct codecfilter_wave_inst * self = malloc(sizeof(struct codecfilter_wave_inst)); 
    9  struct roar_stream * s = (struct roar_stream *) info; 
     9 struct roar_stream * s = ROAR_STREAM(info); 
    1010 
    1111 if ( !self ) 
  • roard/streams.c

    r603 r609  
    136136 ROAR_DBG("streams_set_fh(id=%i): g_streams[id]->id=%i", id, ROAR_STREAM(g_streams[id])->id); 
    137137 
    138  ((struct roar_stream *)g_streams[id])->fh = fh; 
     138 ROAR_STREAM(g_streams[id])->fh = fh; 
    139139 
    140140 if ( codecfilter_open(&(g_streams[id]->codecfilter_inst), &(g_streams[id]->codecfilter), NULL, 
     
    163163  return -1; 
    164164 
    165  return ((struct roar_stream *)g_streams[id])->fh; 
     165 return ROAR_STREAM(g_streams[id])->fh; 
    166166} 
    167167 
     
    408408*/ 
    409409 
    410  ((struct roar_stream*)g_streams[id])->pos = 
    411       ROAR_MATH_OVERFLOW_ADD(((struct roar_stream*)g_streams[id])->pos, 
     410 ROAR_STREAM(g_streams[id])->pos = 
     411      ROAR_MATH_OVERFLOW_ADD(ROAR_STREAM(g_streams[id])->pos, 
    412412          ROAR_OUTPUT_CALC_OUTBUFSAMP(info, needed-todo)); 
    413413 //ROAR_WARN("stream=%i, pos=%u", id, ((struct roar_stream*)g_streams[id])->pos); 
     
    441441 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
    442442  if ( g_streams[i] != NULL ) { 
    443    if ( ((struct roar_stream *)g_streams[i])->dir != ROAR_DIR_PLAY ) 
     443   if ( ROAR_STREAM(g_streams[i])->dir != ROAR_DIR_PLAY ) 
    444444    continue; 
    445445 
     
    538538 ROAR_DBG("streams_check(id=%i) = ?", id); 
    539539 
    540  s = (struct roar_stream *) (ss = g_streams[id]); 
     540 s = ROAR_STREAM(ss = g_streams[id]); 
    541541 
    542542 if ( (fh = s->fh) == -1 ) 
     
    675675 ROAR_DBG("streams_send_filter(id=%i) = ?", id); 
    676676 
    677  s = (struct roar_stream *) (ss = g_streams[id]); 
     677 s = ROAR_STREAM(ss = g_streams[id]); 
    678678 
    679679 if ( (fh = s->fh) == -1 ) 
Note: See TracChangeset for help on using the changeset viewer.