Hi,
I am working on a setup which has Linux Kernel running and I have
pulseaudio as Sound server. ASoc Alsa driver *snd_pcm_mmap* function returns
me
Virtual Memory mapped to physical memory which is strictly 32 Bit Aligned.
When I am trying to Mix two streams with gst-launch, pa_mix function tries
to write 16Bit mixed samples to this physical memory resulting in Bus error.
As a work around I am trying following code which is trying to write two
Mixed 16Bit samples write making it a 32Bit write.
src/pulsecore/sample-util.c
// *((int16_t*) data) = (int16_t) sum;
if(j==0) {
temp[0]=(int16_t) sum;
j=1;
} else {
temp[1]=(int16_t) sum;
j=0;
sum = ((temp[1] << 16) | (0x0000FFFF &
temp[0]));
data = (uint8_t*) data - sizeof(int16_t);
*((int32_t*) data) = (int32_t) sum;
data = (uint8_t*) data + sizeof(int16_t);
}
With this I am able to mix a *gst-launch* stream and already loaded sample
from pulseaudio played with *play-sample* from *pacmd*.
But not able to mix two streams with gst-launch.
I am new to Pulseaudio. May I know What is that I am missing here ??
Kuldeep
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss