Changeset 1208:3ed0b4a1da52 in roaraudio
- Timestamp:
- 02/04/09 17:46:44 (15 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r1199 r1208 61 61 62 62 ROAR_DRIVER_DEFAULT='' 63 ROAR_DRIVER_CODEC='' 63 64 64 65 echo -n "checking for C compiler... " … … 121 122 echo '--default-bits BITS - Set default number of bits per sample for roard and roarclients' 122 123 echo '--default-driver DRIVER - Set default driver for roard' 124 echo '--default-codec CODEC - Set default codec used for the default driver' 123 125 echo 124 126 echo '--without-alaw - Disable support of A-Law codec (de- and encoding)' … … 197 199 '--default-driver') 198 200 ROAR_DRIVER_DEFAULT="$2" 201 shift; 202 ;; 203 '--default-codec') 204 ROAR_DRIVER_CODEC="$2" 199 205 shift; 200 206 ;; … … 452 458 [ "$DEFAULT_BITS" = '' ] || echo "#define ROAR_BITS_DEFAULT $DEFAULT_BITS" 453 459 [ "$ROAR_DRIVER_DEFAULT" = '' ] || echo "#define ROAR_DRIVER_DEFAULT \"$ROAR_DRIVER_DEFAULT\"" 460 [ "$ROAR_DRIVER_CODEC" = '' ] || echo "#define ROAR_DRIVER_CODEC \"$ROAR_DRIVER_CODEC\"" 454 461 echo 455 462 $ALAW && echo '#define ROAR_SUPPORT_ALAW' -
roard/roard.c
r1207 r1208 129 129 struct roar_stream_server * ss; 130 130 char * k, * v; 131 #ifdef ROAR_DRIVER_CODEC 132 char * to_free = NULL; 133 #endif 131 134 int codec; 132 135 int sync = 0; … … 138 141 prim = 1; 139 142 sync = 1; 143 144 #ifdef ROAR_DRIVER_CODEC 145 if ( opts == NULL ) { 146 opts = to_free = strdup("codec=" ROAR_DRIVER_CODEC); 147 } 148 #endif 140 149 } 141 150 … … 177 186 streams_delete(stream); 178 187 if ( prim ) alive = 0; 188 #ifdef ROAR_DRIVER_CODEC 189 if ( to_free != NULL ) 190 free(to_free); 191 #endif 179 192 return -1; 180 193 } … … 187 200 streams_delete(stream); 188 201 if ( prim ) alive = 0; 202 #ifdef ROAR_DRIVER_CODEC 203 if ( to_free != NULL ) 204 free(to_free); 205 #endif 189 206 return -1; 190 207 } … … 192 209 k = strtok(NULL, ","); 193 210 } 211 212 #ifdef ROAR_DRIVER_CODEC 213 if ( to_free != NULL ) 214 free(to_free); 215 #endif 194 216 195 217 if ( codec == ROAR_CODEC_ALAW || codec == ROAR_CODEC_MULAW )
Note: See TracChangeset
for help on using the changeset viewer.