Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Clemens Ladisch" <cladisch@fastmail.net>
To: r10 kindsofpeople <r10kindsofpeople@hotmail.com>,
	alsa-devel@lists.sourceforge.net
Subject: Re: stopping sequencer output queue gracefully
Date: Fri, 15 Dec 2006 08:30:54 +0100	[thread overview]
Message-ID: <1166167854.20860.280597815@webmail.messagingengine.com> (raw)
In-Reply-To: <BAY21-F222A395293750A95AC6FE3CDD50@phx.gbl>

r10 kindsofpeople wrote:
> Is there example code around that shows how to stop MIDI playback 
> gracefully?
> 
> At present, I'm doing a snd_seq_drop_output() and a snd_seq_stop_queue(), 
> and getting some interesting behavior when I try to restart.

What do you mean with "interesting"?

After snd_seq_stop_queue(), you have to call snd_seq_drain_output() to
actually send the stop event.

> I'm also wondering if Alsa does anything to track or handle the stuck notes 
> that result, or if my client needs to be responsible for tracking these and 
> turning them off before stopping the queue.

A queue is just a tool for delivering events; ALSA doesn't try to
interpret the events sent through it.  Besides, different devices may
have different rules about sending of note-on/note-off events.

I'd just send an All Notes Off message.


HTH
Clemens

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

      parent reply	other threads:[~2006-12-15  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14 14:12 stopping sequencer output queue gracefully r10 kindsofpeople
2006-12-14 16:48 ` Steve deRosier
2006-12-15  7:30 ` Clemens Ladisch [this message]

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=1166167854.20860.280597815@webmail.messagingengine.com \
    --to=cladisch@fastmail.net \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=r10kindsofpeople@hotmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox