Subject: [linux-audio-dev] OSS uncertain use of SNDCTL_DSP_GET{I|O}SPACE
From: Lucia Cappellato (lucia_AT_toonz.com)
Date: Fri May 03 2002 - 16:06:12 EEST
Hi all,
I have two questions
1)
in many documentation on web (and so in ossguide.pdf) I read that is
possible use ioctl calls with SNDCTL_DSP_GETISPACE or
SNDCTL_DSP_GETOSPACE to obtain information about output and
input buffering. Is it right?
Later i read that these two calls permit to writing non-blocking
applications.
To do a playback of a soundtrack I use SNDCTL_DSP_GETOSPACE
and It works well.
In the field "bytes" of the structure "audio_buf_info" there is always the
number of byte that i can write without blocking the application.
After when i write code to do recording of soundtrack I want to use
SNDCTL_DSP_GETISPACE but many times I obtain that the field
"bytes" of the structure "audio_buf_info" is = 0. When it's != 0 I have
only one or two fragment available on 32. Is there a explanation?
2)
If to do the playback/recording of a soundtrack I use another thread,
is it necessary use SNDCTL_DSP_GET{I|O}SPACE too?
I see the code of player/recorder of raw file rawrec-0.9.97.tgz it's use
some thread and never call ioctl with SNDCTL_DSP_GET{I|O}SPACE
but it works fine.
bye all
Lucia
This archive was generated by hypermail 2b28 : Fri May 03 2002 - 16:21:48 EEST