Strange audio noise when using new sound device API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 06 Apr 2009, at 22:02, Benny Prijono wrote:

> On Mon, Apr 6, 2009 at 5:23 PM, Ruud Klaver <ruud at ag-projects.com>  
> wrote:
>
> It seems that the echo canceller is started before Portaudio is done  
> sometimes. According to the wiki page about the new audio device  
> API, I've done the following to setup the audio device with  
> (software) EC directly:
>
>           param.flags = PJMEDIA_AUD_DEV_CAP_EC |  
> PJMEDIA_AUD_DEV_CAP_EC_TAIL
>           param.ec_enabled = 1
>
> If I omit this and do pjmedia_snd_port_set_ec() later instead, the  
> echo cancellation is enabled at that point.
>
> Just as an update, doing this doesn't actually seem to help at all...
>
>
> Bear with me (as always!), as this belongs to those difficult  
> question to answer type of question. :)
>
>  -benny

Some more new sound device API related issues, this time in linux  
(previous issues were on mac):

Previously while using ALSA, the "default" device was selected for  
both recording device and playback device when passing -1 as id. Now  
when passing PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV and  
PJMEDIA_AUD_DEFAULT_CAPTURE_DEV respectively, some other ALSA device  
gets selected. It results in these errors in the log:

2009-04-07 16:12:31.344000 (5)       pa_dev.c: PA message: Expression  
'SetApproximateSampleRate( pcm, hwParams, sr )' failed in  
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1291
2009-04-07 16:12:31.344000 (5)       pa_dev.c: PA message: Expression  
'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams,  
self->primeBuffers, hwParamsPlayback, &realSr )' failed in  
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1865
2009-04-07 16:12:31.344000 (5)       pa_dev.c: PA message: Expression  
'PaAlsaStream_Configure( stream, inputParameters, outputParameters,  
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,  
&hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/ 
alsa/pa_linux_alsa.c', line: 1986
2009-04-07 16:12:31.352000 (5)       pa_dev.c: PA message: Expression  
'SetApproximateSampleRate( pcm, hwParams, sr )' failed in  
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1291
2009-04-07 16:12:31.352000 (5)       pa_dev.c: PA message: Expression  
'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams,  
self->primeBuffers, hwParamsPlayback, &realSr )' failed in  
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1865
2009-04-07 16:12:31.352000 (5)       pa_dev.c: PA message: Expression  
'PaAlsaStream_Configure( stream, inputParameters, outputParameters,  
sampleRate, framesPerBuffer, &inputLatency, &outputLatency,  
&hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/ 
alsa/pa_linux_alsa.c', line: 1986

And it fails with "Invalid sample rate". This also happens on the old  
API when I select another device than "default". Note that I am only  
trying 32 kHz as sample rate.

When I force the use of the "default" audio device, it sits for about  
10 seconds eating 100% CPU before finally starting.

OSS (or at least ALSA OSS emulation) seems to work fine still.

Good luck! ;)

Ruud Klaver
AG Projects



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux