All of lore.kernel.org
 help / color / mirror / Atom feed
From: asbjs@stud.ntnu.no (Asbjørn Sæbø)
To: alsa-devel@lists.sourceforge.net
Subject: Q: Periodsize for capture, SBLive
Date: Mon, 18 Oct 2004 15:36:14 +0200	[thread overview]
Message-ID: <20041018133613.GA14810@stud.ntnu.no> (raw)

As part of a research project I am writing some software for 
low latency transmission of audio samples over the network.
For the audio part of this I am using ALSA.  (Development 
takes place on a Dell box running Debian Sarge Linux.)

I open the sound card (a SoundBlaster Live) for capture, and 
request a period size (using set_period_size_near()) of 8 frames,
but what I get is a period size of 384 frames.  

At 44100 Hz, 384 frames corresponds to a delay of at least 8.7ms, 
and I would like to do quite a bit better.  (And better should also 
be possible.  As far as I know ALSA, latencies down to a couple of
milliseconds should be possible.)  

Is this large period size given by the sound card, and therefore 
unavoidable, or can the card give lower period sizes than 384?

If the card can do better, what can I do, programming wise, to achieve 
better performance?  

(For now, my program is quite simple, it opens the sound card 
(snd_pcm_open()), sets hardware parameters to 2 channels,
44100hz, access to SND_PCM_ACCESS_RW_INTERLEAVED and format to 
SND_PCM_FORMAT_S16_LE.  It then reads samples from the card using 
snd_pcm_readi().)


Asbjørn Sæbø
-- 
Asbjørn Sæbø, post.doc.
Centre for Quantifiable Quality of Service in Communication Systems
Norweigan University of Science and Technology
http://www.q2s.ntnu.no


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

             reply	other threads:[~2004-10-18 13:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18 13:36 Asbjørn Sæbø [this message]
2004-10-18 13:42 ` Q: Periodsize for capture, SBLive Paul Davis
2004-10-18 14:22   ` Unknown
2004-10-18 19:52     ` Glenn Maynard
  -- strict thread matches above, loose matches on Subject: below --
2004-10-19  8:07 Peter Zubaj
2004-10-19  8:19 ` Asbjørn Sæbø
2004-10-19 20:28   ` Lee Revell
2004-10-20  7:15     ` Asbjørn Sæbø
2004-10-20  7:57       ` Lee Revell
2004-10-20  8:42         ` Asbjørn Sæbø

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=20041018133613.GA14810@stud.ntnu.no \
    --to=asbjs@stud.ntnu.no \
    --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 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.