Changeset 3833:fc0909593cea in roaraudio for libroararts
- Timestamp:
- 05/16/10 21:59:01 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroararts/libartsc.c
r3811 r3833 40 40 #include <kde/artsc/artsc.h> 41 41 42 st ruct roar_connection _libroarartsc_connection[1];42 static struct roar_connection _libroarartsc_connection[1]; 43 43 44 44 struct _libroarartsc_stream { … … 97 97 */ 98 98 arts_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)); 100 100 struct roar_meta meta; 101 101 struct roar_stream_info info; … … 106 106 if ( (s->fh = roar_simple_new_stream_obj(_libroarartsc_connection, &(s->stream), 107 107 rate, channels, bits, ROAR_CODEC_DEFAULT, ROAR_DIR_PLAY)) == -1 ) { 108 free(s);108 roar_mm_free(s); 109 109 return NULL; 110 110 } … … 118 118 } else { 119 119 close(s->fh); 120 free(s);120 roar_mm_free(s); 121 121 return NULL; 122 122 } … … 145 145 */ 146 146 arts_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)); 148 148 struct roar_meta meta; 149 149 struct roar_stream_info info; … … 154 154 if ( (s->fh = roar_simple_new_stream_obj(_libroarartsc_connection, &(s->stream), 155 155 rate, channels, bits, ROAR_CODEC_DEFAULT, ROAR_DIR_RECORD)) == -1 ) { 156 free(s);156 roar_mm_free(s); 157 157 return NULL; 158 158 } … … 166 166 } else { 167 167 close(s->fh); 168 free(s);168 roar_mm_free(s); 169 169 return NULL; 170 170 } … … 191 191 close(s->fh); 192 192 193 free(stream);193 roar_mm_free(stream); 194 194 } 195 195
Note: See TracChangeset
for help on using the changeset viewer.