From: Lee Revell <rlrevell@joe-job.com>
To: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Cc: Clemens Ladisch <clemens@ladisch.de>, alsa-devel@alsa-project.org
Subject: Re: PCM driver only plays tiny portion of clip
Date: Wed, 01 Mar 2006 15:31:10 -0500 [thread overview]
Message-ID: <1141245071.5860.216.camel@mindpipe> (raw)
In-Reply-To: <1141244449.9233.24.camel@localhost.localdomain>
On Wed, 2006-03-01 at 20:20 +0000, Adrian McMenamin wrote:
> On Wed, 2006-03-01 at 14:59 -0500, Lee Revell wrote:
>
> >
> > The trigger callback is only called when the PCM is stopped, started, or
> > paused.
> >
>
>
> Which buffer?
The way most soundcards work is that there is a single ring buffer
shared by the software and hardware. Once the PCM is started the
hardware will repeatedly loop over this buffer playing the samples in
it. The buffer is normally divided in half - while your app is writing
to one half of the buffer the hardware is playing the samples in the
other half. The hardware generates interrupts at the middle and end of
this buffer, which is where we switch - the hardware is now playing what
the software just wrote to the one half of the buffer and the software
can write into the other half that was just played by the hardware.
If your soundcard does not work this way you'll have to model it
somehow.
Lee
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
next prev parent reply other threads:[~2006-03-01 20:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 16:07 PCM driver only plays tiny portion of clip Adrian McMenamin
2006-02-27 17:26 ` Clemens Ladisch
2006-02-27 17:35 ` Adrian McMenamin
2006-02-28 7:30 ` Clemens Ladisch
2006-02-28 9:10 ` Adrian McMenamin
2006-02-28 14:55 ` Clemens Ladisch
2006-02-28 15:14 ` Adrian McMenamin
2006-02-28 17:08 ` Clemens Ladisch
2006-02-28 17:36 ` Adrian McMenamin
2006-03-01 19:10 ` Adrian McMenamin
2006-03-01 19:31 ` Lee Revell
2006-03-01 19:40 ` Adrian McMenamin
2006-03-01 19:59 ` Lee Revell
2006-03-01 20:20 ` Adrian McMenamin
2006-03-01 20:31 ` Lee Revell [this message]
2006-03-01 20:28 ` Adrian McMenamin
2006-03-01 20:41 ` Lee Revell
2006-03-02 20:49 ` Adrian McMenamin
2006-03-03 7:27 ` Clemens Ladisch
2006-03-03 7:42 ` Adrian McMenamin
2006-03-03 8:12 ` Lee Revell
[not found] ` <1141373843.9229.4.camel@localhost.localdomain>
2006-03-03 8:45 ` Lee Revell
2006-03-03 8:18 ` Lee Revell
2006-03-03 8:36 ` Lee Revell
2006-03-01 19:45 ` Adrian McMenamin
2006-02-27 23:08 ` Adrian McMenamin
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=1141245071.5860.216.camel@mindpipe \
--to=rlrevell@joe-job.com \
--cc=adrian@mcmen.demon.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
/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.