Calling snd_pcm_oss_write directly.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi all,
I took the advice and used write() from the other task. It
promptly returned with < 0 error.
I do not know how the oss emulation in ALSA happens, so I do not know what exactly went wrong.
Any more suggestions are welcome.
Again, continuing my experiment with calling snd_pcm_oss_write
directly, I traced the crash to few fns called from fn snd_pcm_prepare inpcm_native.c . These fns seem to be making few ioctls like
..._IOCTL_PREPARE and ..._IOCTL_DRAIN. (more fns name ..ioctl thanioctl() call itself). what are these fns doing and is it normal that they
are called after snd_pcm_oss_write has already been called.
--shaju abraham
Quoted 11 lines · Paul Davis
Quoted 2 lines
I am in a situation where I intend to call
snd_pcm_oss_write
directly.AFAIK, this is not a supported use of the alsa-lib API. There is no guarantee that your application will continue to work in future versions of alsa-lib.
Quoted 3 lines
What exactly happens is - the open and all the initial ioctl calls are done by the oss application. But the write call of the oss application is not done but it is done by some other task.
Quoted 6 lines
there is still no reason to be using snd_pcm_<type>_<function> directly.
if you insist on using the OSS API (a big error, IMHO) then you can just use the OSS API in the other task.
--p
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf