All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fons Adriaensen <fons@linuxaudio.org>
To: alsa-devel@alsa-project.org
Subject: Re: Why does snd_seq_drain_output() need lots of time	to execute?
Date: Fri, 27 Jan 2012 12:03:13 +0000	[thread overview]
Message-ID: <20120127120313.GC29445@linuxaudio.org> (raw)
In-Reply-To: <CABscqj6i0JAVbrhFN=BQEjkQFFDdng2jc+mf8ATqMNfGEMq4Lw@mail.gmail.com>

On Fri, Jan 27, 2012 at 01:20:17AM +0100, Rafał Cieślak wrote:
 
> However, it seems that somehow I cannot change it. If I try using
> snd_seq_set_client_pool_output(), this gives absolutely no effect, and
> does not seem to make any effect, the pool size stays at 500 (even
> though the function returns 0)  (to check the pool size I look at
> /proc/asound/seq/clients, and it is always 500).

If you manage to fill a 500-event buffer, could that mean that
you are sending events a long time ahead of their due time ?

In that case the solution is to keep events in application buffers
until say half a second before they are really needed. In other
words let the app do the rough timing, and ALSA the fine one.

It requires a bit more logic, but it's probably needed anyway -
you can't expect kernel side ALSA to buffer e.g. a complete song.

Limiting the send-ahead time will also make the app more
responsive in case you have to stop and/or reposition the
stream.

Ciao,

-- 
FA

Vor uns liegt ein weites Tal, die Sonne scheint - ein Glitzerstrahl.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2012-01-27 12:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 17:19 Why does snd_seq_drain_output() need lots of time to execute? Rafał Cieślak
2012-01-26 22:04 ` Clemens Ladisch
2012-01-27  0:20   ` Rafał Cieślak
2012-01-27 12:03     ` Fons Adriaensen [this message]
2012-01-27 13:28       ` Rafał Cieślak
2012-01-27 13:56         ` Fons Adriaensen
2012-01-27 18:04         ` Clemens Ladisch

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=20120127120313.GC29445@linuxaudio.org \
    --to=fons@linuxaudio.org \
    --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.