Changeset 3235:0dccdb958c06 in roaraudio


Ignore:
Timestamp:
01/27/10 20:39:16 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

wrote channel mapping info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/ao/ao_roar.c

    r3232 r3235  
    119119int ao_plugin_open(ao_device * device, ao_sample_format * format) { 
    120120 ao_roar_internal * internal = (ao_roar_internal *) device->internal; 
     121#ifdef HAVE_MATRIX 
     122 char * map = NULL; 
     123#endif 
    121124 
    122125 if ( roar_vio_simple_stream(&(internal->svio), format->rate, format->channels, format->bits, 
     
    125128 
    126129 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 
    127149 
    128150 return 1; 
Note: See TracChangeset for help on using the changeset viewer.