nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

PulseAudio records with delay

Thu Jan 03, 2013 1:55 pm

Hi there,

I set up pulseaudio on my raspi. I am playing music via mpd and try to get the raw-audio with parec. That works but the recording is not "synchronized". The longer I record the loger is the delay. For example I play music and start parec and then after a while I stop the music parec is still recording raw-audio for a while.
I need the raw-audio for my leds so I need them with no delay.

I tryied to set the audio_output of mpd to alsa und pulse but both configurations had the same behaviour.
I also tryied mplayer and vlc with no success.
On my PC with Ubuntu it works fine that way.

Any suggestions? Is there something I can configure?
Thanks!

*EDIT*
I also tryied pulseaudio in system mode with no success/difference

nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

Re: PulseAudio records with delay

Thu Jan 03, 2013 3:50 pm

The problem seems to be that parec starts the record with a delay. The stuff that is recorded seems to be correct.
Is it somehow possible to synchronize it?

nw90
Posts: 6
Joined: Wed Dec 26, 2012 7:41 pm

Re: PulseAudio records with delay

Thu Jan 03, 2013 4:22 pm

I fixed in by manipulating the input stream in java - this is possible because I ineterprete the raw-audio in java.

This is just a workaround - if someone knows a better solution please answer :)

bs5115
Posts: 1
Joined: Sat Feb 09, 2013 2:50 pm

Re: PulseAudio records with delay

Sat Feb 09, 2013 2:53 pm

Any luck with this? I'm also looking to analyze realtime audio being played and control LEDs from that.

Right now I'm investigating using alsa to dump the raw pcm data to a pipe, and writing a program to process that data.

Return to “Graphics, sound and multimedia”