All of lore.kernel.org
 help / color / mirror / Atom feed
* Q: Periodsize for capture, SBLive
@ 2004-10-18 13:36 Asbjørn Sæbø
  2004-10-18 13:42 ` Paul Davis
  0 siblings, 1 reply; 10+ messages in thread
From: Asbjørn Sæbø @ 2004-10-18 13:36 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Q: Periodsize for capture, SBLive
@ 2004-10-19  8:07 Peter Zubaj
  2004-10-19  8:19 ` Asbjørn Sæbø
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Zubaj @ 2004-10-19  8:07 UTC (permalink / raw)
  To: asbjs; +Cc: alsa-devel

> OK.  Any idea why I get 384?
I think hardware can't do less. If you need less latency use hw:0,2
and set more channel count (1, 2, 4, 8, 16, 32)

Peter Zubaj



____________________________________
http://www.pobox.sk/ - spolahliva a bezpecna prevadzka





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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-20  8:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-18 13:36 Q: Periodsize for capture, SBLive Asbjørn Sæbø
2004-10-18 13:42 ` 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ø

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.