Changeset 3833:fc0909593cea in roaraudio for libroararts


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

use roar_mm_*()

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.