From: "random.bits" <random.bits@rogers.com>
To: Jaroslav Kysela <perex@suse.cz>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Re: alsa driver, repeat playback of buffer contents
Date: Tue, 15 Mar 2005 13:49:02 -0500 [thread overview]
Message-ID: <200503151349.02376.random.bits@rogers.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0503150848280.1743@pnote.perex-int.cz>
I started to follow up on Jaroslav's advice.
I am opening the "hw" pcm device using snd_pcm_open in
order to address the base hardware.
I use "snd_pcm_hw_params_get_buffer" to determine the
buffer size (which I presume is the hardware ring
buffer). If I map to this buffer and then fill it with
the sound exactly, then commit it, it just plays once.
I put my process into wait state by using sleep(1)
calls.
How can I get the hardware to continue to play using
the data in the ring buffer?
Thanks,
Mark
On Tuesday 15 March 2005 02:49, Jaroslav Kysela wrote:
> On Mon, 14 Mar 2005, Mark Cannon wrote:
> > How can I send down a short PCM stream, and have
> > the hardware repeat it until told to stop?
>
> You must always copy the data to right place in the
> ring buffer unless the sound fragment has not exact
> (or multiple) size of ring buffer.
>
> Jaroslav
>
> -----
> Jaroslav Kysela <perex@suse.cz>
> Linux Kernel Sound Maintainer
> ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next prev parent reply other threads:[~2005-03-15 18:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-14 20:30 alsa driver, repeat playback of buffer contents random.bits
2005-03-14 21:45 ` Lee Revell
2005-03-14 22:20 ` Måns Rullgård
2005-03-15 0:20 ` Lee Revell
2005-03-15 1:14 ` Mark Cannon
2005-03-15 1:19 ` Lee Revell
2005-03-15 7:49 ` Jaroslav Kysela
2005-03-15 18:49 ` random.bits [this message]
2005-03-15 18:49 ` Jaroslav Kysela
2005-03-15 21:34 ` random.bits
2005-03-15 8:14 ` 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=200503151349.02376.random.bits@rogers.com \
--to=random.bits@rogers.com \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@suse.cz \
/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