Re: Use of snd_pcm_format_set_silence

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

 



Hello Clemens,

Thanks for your response. Just to clarify, the snd_pcm_format_set_silence()
would simply *replace* the actual buffer read from snd_pcm_readi() to
zeros(since my application is using signed 32 bit little endian format).
There would be no delay induced in doing so. Correct?

Regards,
Ankhit

On Wed, Jan 20, 2016 at 3:56 PM, Clemens Ladisch <clemens@xxxxxxxxxx> wrote:

> Ankhit Vivekananda wrote:
> > I have an application where in I need to silence the first few samples of
> > the buffer that is read from snd_pcm_readi(). In order to do this, I call
> > the snd_pcm_format_set_silence() providing the same buffer that the
> > snd_pcm_readi() reads to.
> >
> > 1) By doing this, is there going to be a timing delay due to the use of
> > snd_pcm_format_set_silence()?
>
> That function just modifies memory; it does not affect any PCM device.
>
> > 2) Is snd_pcm_format_set_silence() the correct function to achieve this
> > goal or are there better methods?
>
> You already know your sample format; memset(0) might be simpler.
>
>
> Regards,
> Clemens
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux