Menu

non-blocking read problems

Help
2000-02-01
2012-09-22
  • Eran Guendelman

    Eran Guendelman - 2000-02-01

    Now that I fixed the sampling rate problem, I've come across a different problem.  In ad_read, the call to read is returning -1.  I've discovered that removing the
    ioctl (dspFD, SNDCTL_DSP_NONBLOCK, &nonBlocking)
    initialization from ad_open_sps fixes the problem. Is it normal for read to return -1 if you ask it to be non-blocking?  If so, why is nobody else getting this problem?  (My soundcard is Soundblaster PCI 128).
    BTW after removing this setting from ad_open_sps, sphinx2-demo runs with no errors. But nothing really happens (it says [silence] and then [audio]).  Is it supposed to do more than this?  Maybe setting it to blocking made it not work?

    Thanks in advance.

     
    • Paul Fenwick

      Paul Fenwick - 2000-02-01

      Non-blocking read calls will return -1 and set errno to be EAGAIN if no data exists on the filehandle.

      It looks like a few people have experienced this problem, and mandrake (the person, not the distro) has fixed this bug and applied it to the CVS tree.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.