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 13:56:38 +0000 [thread overview]
Message-ID: <20120127135638.GD29445@linuxaudio.org> (raw)
In-Reply-To: <CABscqj4qkkwPjBPv40MtL2VrY=sAnyhFoNRY8v0ymFb95tDJFA@mail.gmail.com>
On Fri, Jan 27, 2012 at 02:28:42PM +0100, Rafał Cieślak wrote:
> > 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 ?
>
> No, I'm not buffering a whole song, events are send at most a second
> or two ahead (for each bar). The reason why there may be so many of
> them, is that I emulate smooth movement of control parameters (just as
> if one was slowly moving a slider/knob on an external MIDI
> controller), which requires lots of events, and the problem starts
> when I try to do the same for many different controllers/channels
> independently.
I see. MIDI isn't really up to this sort of thing... The receiver
can be expected to smooth the controller values, but since this is
unspecified you don't know how many are needed.
> Also, it turned out that actually snd_seq_set_client_pool_output()
> does work, unless I try to set it to anything greater then 2000. Is
> this a hard-coded limit, or can I somehow increase it even more?
Don't know...
2000 events/s would be close to what a hardware MIDI interface can
handle anyway - that could be your next problem.
OTOH, you could reduce the update period to 1/4 second or so. That
should be no problem if you use a RT thread to do it - we're using
much shorter periods for audio.
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
next prev parent reply other threads:[~2012-01-27 13:56 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
2012-01-27 13:28 ` Rafał Cieślak
2012-01-27 13:56 ` Fons Adriaensen [this message]
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=20120127135638.GD29445@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.