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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.