Changeset 5469:23c09a8dc701 in roaraudio


Ignore:
Timestamp:
04/11/12 10:24:14 (9 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added an filter to do: r = -(l = (l+r)/2.1) (usefull for broken headphones

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroardsp/filter.h

    r5381 r5469  
    8383#define ROARDSP_DOWNMIX_ARITHMETIC    3 
    8484#define ROARDSP_DOWNMIX_RMS           4 
     85#define ROARDSP_DOWNMIX_ARITHMETIC_INVERSE    5 
    8586 
    8687#define ROARDSP_DCBLOCK_NUMBLOCKS     100 
  • libroardsp/filter_downmix.c

    r5381 r5469  
    5252     samp[i  ] = s.i32; 
    5353     samp[i+1] = s.i32; 
     54    } 
     55   break; 
     56  case ROARDSP_DOWNMIX_ARITHMETIC_INVERSE: 
     57    for (i = 0; i < samples; i += 2) { 
     58     s.i32     = (float)(samp[i] + samp[i+1])/2.1; 
     59     samp[i  ] = s.i32; 
     60     samp[i+1] = -s.i32; 
    5461    } 
    5562   break; 
Note: See TracChangeset for help on using the changeset viewer.