From: Lukasz Pawelczyk <havner@pld-linux.org>
To: alsa-devel@alsa-project.org
Subject: Re: How to stop playback on alsa synth?
Date: Sun, 16 Mar 2008 22:48:25 +0100 [thread overview]
Message-ID: <47DD95A9.30606@pld-linux.org> (raw)
In-Reply-To: <47DD5093.6070702@pld-linux.org>
I think I've done it, just don't know how correct my solution is
I've added snd_seq_drain_output() after snd_seq_event_output() in thread
function so the events are processed more "real time" as I understand
it. I've also moved queue creation to the beginning of thread function
(because stop function deletes the queue).
Then the stop function calls:
sets a bool to break the thread loop.
snd_seq_free_queue()
snd_seq_drop_output()
This seems to work. Any comments?
One problem I got with it though is that sometimes when I stop one music
and play another one some note(s) from the old one are played
indefinitely during the new music. I suppose some 'clear' event should
be sent to remove it. I've tried MIDI_CTL_ALL_SOUNDS_OFF control one (as
pmidi does on exit) but no luck.
--
Regards Havner {jid,mail}:havner(at)pld-linux.org
"Quis custodiet ipsos custodes?"
prev parent reply other threads:[~2008-03-16 21:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 16:53 How to stop playback on alsa synth? Lukasz Pawelczyk
2008-03-16 21:48 ` Lukasz Pawelczyk [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=47DD95A9.30606@pld-linux.org \
--to=havner@pld-linux.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.