All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.co.uk>
To: Eric Peters <epeters@graphics.cs.uni-sb.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Starting the device manually
Date: Mon, 24 Jul 2006 16:37:13 +0100	[thread overview]
Message-ID: <44C4E929.3030602@superbug.co.uk> (raw)
In-Reply-To: <44C494F4.6050301@graphics.cs.uni-sb.de>

Eric Peters wrote:
> Dear all,
>
> I'm a bit confused by the alsa documentation. I want to fill up a buffer
> of a alsa device with snd_pcm_writei and then if the buffer is full, I
> want to be able to start the playback manually. By looking to the
> documentation, I found the method snd_pcm_sw_params_set_start_threshold.
> In some other messages on this list there was the hint to set this
> threshhold larger than the max_buffer_size and then the device shouldn't
> start automatically. So I've done. But unfortunately the playback starts
> again automatically. Here are the lines of code, I'm setting the
> buffer_size and period_size and the start threshhold:
>
>   
Why would you actually want to do what you describe. (You certainly can 
do it with ALSA, but as to why you would want to, is another thing entirely)
It is normally better to get the buffers running, sending silence 
samples to the buffer, and then introduce your sound when you want to.
One can accurately determine the delay or latency of the buffer, so 
accurately timing samples is not a problem.
One uses a callback approach to send sound to the card. A good example 
of this callback approach is an application called jackd.
http://jackaudio.org/

James


-------------------------------------------------------------------------
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-07-24 15:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24  9:37 Starting the device manually Eric Peters
2006-07-24 11:05 ` Clemens Ladisch
2006-07-24 11:40   ` Eric Peters
2006-08-04 16:44     ` Clemens Ladisch
2006-07-24 15:35 ` James Courtier-Dutton
2006-07-25  6:20   ` Eric Peters
2006-07-24 15:37 ` James Courtier-Dutton [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=44C4E929.3030602@superbug.co.uk \
    --to=james@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=epeters@graphics.cs.uni-sb.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.