home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!hacgate!turbo4.rsg.hac.com!lee
- From: lee@turbo4.rsg.hac.com (C. Lee)
- Newsgroups: comp.sys.sgi
- Subject: problem with "select()" with Indigo audio library
- Summary: "select()" doesn't work; "poll()" does;
- Message-ID: <24704@hacgate.SCG.HAC.COM>
- Date: 12 Jan 93 20:35:48 GMT
- Sender: news@hacgate.SCG.HAC.COM
- Organization: Hughes Transportation Simulation Center, HAC; Culver City, CA
- Lines: 23
-
- I'm having trouble using "select()" with the audio on an Indigo.
-
- I do: ALsetfillpoint(audio_inp_port, new_fill_point);
- FD_ZERO(&read_set);
- FD_SET(ALgetfd(audio_inp_port),&read_set);
- status = select(1, &read_set, NULL, NULL, &timer);
-
- and "select()" only returns when the timer expires. I also do
- "ALgetfilled()" to check, and there's >> new_fill_point samples in there.
-
- I finally switched to using "poll()" instead, and that seems to work
- correctly.
-
- I'd like to know why "select()" didn't work. Is there something more I
- need to do to get it working on an audio port? (I've used "select()"
- before on standard input and didn't do anything extra or have any
- problems.)
-
- I've looked thru the "Digital Audio and MIDI Programming Guide" and the
- "Programming with the Audio Library" chapter, and using "select()" sounds
- like it should be as straightforward as the code fragment above.
-
- Thanks for any help.
-