Changeset 3833:fc0909593cea in roaraudio


Ignore:
Timestamp:
05/16/10 21:59:01 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use roar_mm_*()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libroararts/libartsc.c

    r3811 r3833  
    4040#include <kde/artsc/artsc.h> 
    4141 
    42 struct roar_connection _libroarartsc_connection[1]; 
     42static struct roar_connection _libroarartsc_connection[1]; 
    4343 
    4444struct _libroarartsc_stream { 
     
    9797 */ 
    9898arts_stream_t arts_play_stream(int rate, int bits, int channels, const char *name) { 
    99  struct _libroarartsc_stream * s = malloc(sizeof(struct _libroarartsc_stream)); 
     99 struct _libroarartsc_stream * s = roar_mm_malloc(sizeof(struct _libroarartsc_stream)); 
    100100 struct roar_meta meta; 
    101101 struct roar_stream_info info; 
     
    106106 if ( (s->fh = roar_simple_new_stream_obj(_libroarartsc_connection, &(s->stream), 
    107107                                 rate, channels, bits, ROAR_CODEC_DEFAULT, ROAR_DIR_PLAY)) == -1 ) { 
    108   free(s); 
     108  roar_mm_free(s); 
    109109  return NULL; 
    110110 } 
     
    118118 } else { 
    119119  close(s->fh); 
    120   free(s); 
     120  roar_mm_free(s); 
    121121  return NULL; 
    122122 } 
     
    145145 */ 
    146146arts_stream_t arts_record_stream(int rate, int bits, int channels, const char *name) { 
    147  struct _libroarartsc_stream * s = malloc(sizeof(struct _libroarartsc_stream)); 
     147 struct _libroarartsc_stream * s = roar_mm_malloc(sizeof(struct _libroarartsc_stream)); 
    148148 struct roar_meta meta; 
    149149 struct roar_stream_info info; 
     
    154154 if ( (s->fh = roar_simple_new_stream_obj(_libroarartsc_connection, &(s->stream), 
    155155                                 rate, channels, bits, ROAR_CODEC_DEFAULT, ROAR_DIR_RECORD)) == -1 ) { 
    156   free(s); 
     156  roar_mm_free(s); 
    157157  return NULL; 
    158158 } 
     
    166166 } else { 
    167167  close(s->fh); 
    168   free(s); 
     168  roar_mm_free(s); 
    169169  return NULL; 
    170170 } 
     
    191191 close(s->fh); 
    192192 
    193  free(stream); 
     193 roar_mm_free(stream); 
    194194} 
    195195 
  • libroarsndio/libroarsndio.c

    r3811 r3833  
    8888 int is_midi = 0; 
    8989 
    90  if ( (hdl = malloc(sizeof(struct sio_hdl))) == NULL ) 
     90 if ( (hdl = roar_mm_malloc(sizeof(struct sio_hdl))) == NULL ) 
    9191  return NULL; 
    9292 
     
    113113  // illigal: 
    114114  default: 
    115     free(hdl); 
     115    roar_mm_free(hdl); 
    116116    return NULL; 
    117117 } 
     
    128128 
    129129 if ( roar_simple_connect(&(hdl->con), (char*) name, "libroarsndio") == -1 ) { 
    130   free(hdl); 
     130  roar_mm_free(hdl); 
    131131  return NULL; 
    132132 } 
     
    163163 roar_disconnect(&(hdl->con)); 
    164164 
    165  free(hdl); 
     165 roar_mm_free(hdl); 
    166166} 
    167167 
Note: See TracChangeset for help on using the changeset viewer.