Changeset 3235:0dccdb958c06 in roaraudio for plugins/ao/ao_roar.c
- Timestamp:
- 01/27/10 20:39:16 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/ao/ao_roar.c
r3232 r3235 119 119 int ao_plugin_open(ao_device * device, ao_sample_format * format) { 120 120 ao_roar_internal * internal = (ao_roar_internal *) device->internal; 121 #ifdef HAVE_MATRIX 122 char * map = NULL; 123 #endif 121 124 122 125 if ( roar_vio_simple_stream(&(internal->svio), format->rate, format->channels, format->bits, … … 125 128 126 129 device->driver_byte_format = AO_FMT_NATIVE; 130 131 #ifdef HAVE_MATRIX 132 if( device->output_matrix != NULL ) 133 free(device->output_matrix); 134 135 device->output_matrix = NULL; 136 137 switch (format->channels) { 138 case 1: map = "M"; break; 139 case 2: map = "L,R"; break; 140 case 3: map = "L,R,C"; break; 141 case 4: map = "L,R,BL,BR"; break; 142 case 5: map = "L,R,C,BL,BR"; break; 143 case 6: map = "L,R,C,LFE,BL,BR"; break; 144 } 145 146 if ( map != NULL ) 147 device->output_matrix = strdup(map); 148 #endif 127 149 128 150 return 1;
Note: See TracChangeset
for help on using the changeset viewer.