home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / 18729 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  1.3 KB

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