#934: downmix to mono makes audio cliffing.
----------------------+-----------------------------------------------------
 Reporter:  kwanghui  |       Owner:  lennart
     Type:  defect    |      Status:  new    
Milestone:  0.9.23    |   Component:  daemon 
 Keywords:  remap     |  
----------------------+-----------------------------------------------------
 down mix to mono channel makes audio cliffing.

 I think it is caused by src/pulsecore/resample.c 706 line.

 It is better to change code similar to following

 -            if (a == b || a == PA_CHANNEL_POSITION_MONO || b ==
 PA_CHANNEL_POSITION_MONO) {
 +            if (a == b || a == PA_CHANNEL_POSITION_MONO) {
                 m->map_table_f[oc][ic] = 1.0;

                 oc_connected = TRUE;
                 ic_connected[ic] = TRUE;
             }
 +            else if (b == PA_CHANNEL_POSITION_MONO) {
 +               if(n_ic)
 +                       m->map_table_f[oc][ic] = 1.0f / (float) n_ic;
 +
 +                oc_connected = TRUE;
 +                ic_connected[ic] = TRUE;
 +           }

-- 
Ticket URL: <http://pulseaudio.org/ticket/934>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
_______________________________________________
pulseaudio-tickets mailing list
pulseaudio-tickets@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets

Reply via email to