Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Peters <epeters@graphics.cs.uni-sb.de>
To: James Courtier-Dutton <James@superbug.co.uk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Starting the device manually
Date: Tue, 25 Jul 2006 08:20:25 +0200	[thread overview]
Message-ID: <44C5B829.1090809@graphics.cs.uni-sb.de> (raw)
In-Reply-To: <44C4E8D0.5020104@superbug.co.uk>

James Courtier-Dutton wrote:
> 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
> 

Thank you James for your answer,

but unfortunately it isn't a real simple application. So it wouldn't be 
possible to start the device with silence samples. But I will take this 
approach into account to make it better. :-)

Best regards,
Eric

-------------------------------------------------------------------------
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

  reply	other threads:[~2006-07-25  6:20 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 [this message]
2006-07-24 15:37 ` James Courtier-Dutton

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=44C5B829.1090809@graphics.cs.uni-sb.de \
    --to=epeters@graphics.cs.uni-sb.de \
    --cc=James@superbug.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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