On Tue, 2016-12-27 at 16:33 +0000, Andrea A wrote: > I'm trying to write a pulseaudio module for an equalizer, I'm using as > examples others modules on pulseaudio source code and this is my source code: > https://github.com/andrea993/audioeqpro/blob/master/pulsemodule/module-test.c > > Now I'm trying to run this module without rewind for debugging purpose but It > does not work. > To debug the module I'm using pa_log that writes some log execution > information and this is an example of my log: > http://pastebin.com/m40ScgLT > > After a few attempts I tried to generate a simple sin wave to test the module > instead filter and in the code in "sink_input_pop_cb" you can see that I > commented the filter line and I replaced it with > *dst=sin(2*M_PI*500*foo_t); > that generate a sinusoidal wave of 500Hz > > However the module doesn't work as expected > 1) The module crash always after a while with the warning (in the log): > W: [pulseaudio] pid.c: Stale PID file, overwriting > > 2) If I run the module during a sound playing the sin wave is played but mixed > on the sound. I expect that only the sin wave is reproduced > > 3) If I run the module when no sound is played it crash just I play a sound > > Can someone help me with this module. I do not understand what the problem is. > Thank you so much It sounds like you're not familiar with gdb. Now would be a good time to learn that tool! It will show the exact location where the crash happens. That's unless the "crash" happens because the kernel kills pulseaudio due to excessive cpu use in realtime mode. To eliminate that possibility, you can set "realtime-scheduling = no" in daemon.conf. One source of mysterious crashes could be due to the fact that you're trying to make a module outside the pulseaudio source tree. That's a fragile approach, because you have to ensure that the core headers are exactly the same that the running pulseaudio daemon was built with. How did you make the core headers available for your module, anyway? Regarding the problem number 2, did you check that you played the other sound to the filter sink? Maybe the other sound played directly to the master sink. That would explain the mixing. -- Tanu https://www.patreon.com/tanuk