All of lore.kernel.org
 help / color / mirror / Atom feed
From: Irfan shaikh <irfan.shaikh@sasken.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Join play of pcm in multiple playback devices
Date: Tue, 3 Jan 2012 11:54:16 +0530	[thread overview]
Message-ID: <4F029F10.7060704@sasken.com> (raw)

Hello All,

              I have written an application which supports join play of 
PCM Audio.
i.e Capture and write to playback device 1 and playback device 2 
simultaneously.

Below code is just to explain the above scenario :

/######################/

while(1)
{
     retval=snd_pcm_readi(pAlsaConfig->pcm_handle, buffer, 
pAlsaConfig->alsaBufferSize);
     snd_pcm_writei(pAlsaConfig->pcm_handle1, buffer,retval);
     snd_pcm_writei(pAlsaConfig->pcm_handle2, buffer,retval);
}

/######################/

In above case, renderer 2 lags behind the renderer 1 i.e there is delay 
between two audio devices when actually heard.


Please help me if some better implementation for join play.
I have seen some thing as snd_pcm_link(). But i was not clear with its 
usage, while doing snd_pcm_writei ???

Thanks and regards,
Irfan

             reply	other threads:[~2012-01-03  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03  6:24 Irfan shaikh [this message]
2012-01-03 21:32 ` Join play of pcm in multiple playback devices Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F029F10.7060704@sasken.com \
    --to=irfan.shaikh@sasken.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.