LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2002, 08:15 AM   #1
ludama
LQ Newbie
 
Registered: Apr 2002
Location: Rome
Distribution: RedHat 7.2
Posts: 2

Rep: Reputation: 0
SNDCTL_DSP_GET{I|O}SPACE and non-bloccking application


Hi all,
I'm doing a sound application and 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 and thanks for any explanation
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM
Web hosting application- assigning disk space ssudhi Linux - Newbie 1 05-01-2004 05:09 PM
Application to place single space with % between each line MasterC Linux - General 2 05-18-2003 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration