Changeset 0c0c679545f62b3dcfe039859b00be6cdb0da938

Show
Ignore:
Timestamp:
23/08/06 23:59:47 (2 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1156370387 +0000
git-parent:

[0acc11b0549c3ccf237d2b4422e9a8282922adbe]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1156370387 +0000
Message:

put mono audio in both (left/right) channels. For some reason AOUT_CHAN_CENTER doesn't work. Somebody explain this to me, please.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/audio_filter/converter/mono.c

    r10e3212 r0c0c679  
    143143#if 0 
    144144    p_filter->fmt_out.audio.i_physical_channels = AOUT_CHAN_CENTER; 
    145 #endif 
     145#else 
    146146    p_filter->fmt_out.audio.i_physical_channels = 
    147147                            (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT); 
    148  
     148#endif 
    149149    p_filter->fmt_out.audio.i_rate = p_filter->fmt_in.audio.i_rate; 
    150150    p_filter->fmt_out.audio.i_format = p_filter->fmt_out.i_codec; 
     
    262262    for( n = 0; n < (p_input->i_nb_samples * p_sys->i_nb_channels); n++ ) 
    263263    { 
    264         if( (n%p_sys->i_nb_channels) == p_sys->i_channel_selected ) 
    265         { 
    266             p_out[n] = (p_in[n] + p_in[n+1]) >> 1; 
    267         } 
    268         else 
    269         { 
    270             p_out[n] = 0x0; 
    271         } 
     264        /* Fake real mono. */ 
     265        p_out[n] = (p_in[n] + p_in[n+1]) >> 1; 
     266        n++; 
    272267    } 
    273268    return n;