On Wed, 17 Oct 2001, Paul Davis wrote:
> >I just came to a pseudo-epiphany, but I can't test it atm. Do I poll
> >on the fd , but set pfd.events = POLLIN | POLLERR?
>
> there now, that wasn't too hard, was it? :))
Ok. Sorry to be so pedantic, it must be some small small error, but...
1. what does snd_pcm_avail_update() do and what does its return value mean?
1b. why does the value of 'avail' returned by snd_pcm_mmap_begin differ from
avail_update's value?
1c. what good does calling avail_update do?
The following output prompted these questions. The loop is still not blocking
btw.
wingo@cebreiro:~/src/gstreamer/plugins/alsa$ gstreamer-launch alsasrc ! fakesink
silent=true
INFO ( 5398:-1) Initializing GStreamer Core Library
INFO ( 5398:-1) CPU features: (808009bf) MMX 3DNOW
RUNNING pipeline
Opening alsa device "default" for capture...
Preparing channel: S16_LE 44100Hz, 0 channels
Plug PCM: Hardware PCM card 0 'Ensoniq AudioPCI' device 0 subdevice -1
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (1411200/32)
msbits : 16
buffer_size : 768
period_size : 256
period_time : 5804
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 256
xfer_align : 256
start_threshold : -1
stop_threshold : -1
silence_threshold: 0
silence_size : 768
boundary : 1610612736
snd_pcm_mmap_begin() sets avail = 0
snd_pcm_avail_update() = 256
snd_pcm_mmap_begin() sets avail = 256
snd_pcm_avail_update() = 496
snd_pcm_mmap_begin() sets avail = 496
snd_pcm_avail_update() = 272
snd_pcm_mmap_begin() sets avail = 16
snd_pcm_avail_update() = 256
snd_pcm_mmap_begin() sets avail = 256
snd_pcm_avail_update() = 496
snd_pcm_mmap_begin() sets avail = 496
snd_pcm_avail_update() = 256
snd_pcm_mmap_begin() sets avail = 16
snd_pcm_avail_update() = 768
snd_pcm_mmap_begin() sets avail = 768
snd_pcm_avail_update() = 496
snd_pcm_mmap_begin() sets avail = 496
snd_pcm_avail_update() = 256
snd_pcm_mmap_begin() sets avail = 256
snd_pcm_avail_update() = 272
Thanks for wielding the cluestick.
Cheers,
wingo
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel