[pulseaudio-discuss] - wrap around when recording output.monitor

2010-09-15 Thread Baek Chang
I am seeing warp around happening due to overflow when doing the following.

parec -r --device=alsa_output.pci_8086_269a_sound_card_0_alsa_playback_0.monitor
output.raw --format=s16le --rate=44100 --channels=1
paplay --format=s16le --rate=44100 --channels=2


if i use parec with the same configuration as the sink that I am
playing the wave file on, then there is no overflow/wraparound.  It
seems to be a problem with the remapping of the channels from stereo
to mono.  Is there an additional gain stage applied in this remapping
that might be causing this?

I am using pulseaudio 0.9.14


Thanks
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] - wrap around when recording output.monitor

2010-09-15 Thread Baek Chang
looks like in the remap_channels method, calling oil_vectoradd_s16, the
constant to multiply by is set to 1.

if (r-map_table[oc][ic] = 1.0) {
static const int16_t one = 1;

oil_vectoradd_s16(
(int16_t*) dst + oc, o_skip,
(int16_t*) dst + oc, o_skip,
(int16_t*) src + ic, i_skip,
(int) n_frames,
one, one);

}

shouldn't there be a divide by 2 somewhere if we are adding two channels
together?


On Wed, Sep 15, 2010 at 2:54 PM, Baek Chang baek...@ccrma.stanford.eduwrote:

 I am seeing warp around happening due to overflow when doing the following.

 parec -r
 --device=alsa_output.pci_8086_269a_sound_card_0_alsa_playback_0.monitor
 output.raw --format=s16le --rate=44100 --channels=1
 paplay --format=s16le --rate=44100 --channels=2


 if i use parec with the same configuration as the sink that I am
 playing the wave file on, then there is no overflow/wraparound.  It
 seems to be a problem with the remapping of the channels from stereo
 to mono.  Is there an additional gain stage applied in this remapping
 that might be causing this?

 I am using pulseaudio 0.9.14


 Thanks

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] - wrap around when recording output.monitor

2010-09-15 Thread Mads Kiilerich

 Baek Chang wrote, On 09/16/2010 02:26 AM:
looks like in the remap_channels method, calling oil_vectoradd_s16, 
the constant to multiply by is set to 1.


if (r-map_table[oc][ic] = 1.0) {
static const int16_t one = 1;

oil_vectoradd_s16(
(int16_t*) dst + oc, o_skip,
(int16_t*) dst + oc, o_skip,
(int16_t*) src + ic, i_skip,
(int) n_frames,
one, one);

}

shouldn't there be a divide by 2 somewhere if we are adding two 
channels together?



On Wed, Sep 15, 2010 at 2:54 PM, Baek Chang 
baek...@ccrma.stanford.edu mailto:baek...@ccrma.stanford.edu wrote:


I am seeing warp around happening due to overflow when doing the
following.

parec -r
--device=alsa_output.pci_8086_269a_sound_card_0_alsa_playback_0.monitor
output.raw --format=s16le --rate=44100 --channels=1
paplay --format=s16le --rate=44100 --channels=2


if i use parec with the same configuration as the sink that I am
playing the wave file on, then there is no overflow/wraparound.  It
seems to be a problem with the remapping of the channels from stereo
to mono.  Is there an additional gain stage applied in this remapping
that might be causing this?

I am using pulseaudio 0.9.14



Note that the latest version is 0.9.21 and that the code you are 
referring to seems to have been completely rewritten.


/Mads
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss