I'm not having a lot of success tracking this down. I'm trying to trace
where the command to send bytes to /dev/dsp is dispatched from. If I put
a print statement in AudioSubSystem::handleIO() or
Synth_PLAY_impl::notifyIO(), I get an infinite loop when artsd starts
up. Normally, artsd starts by sending a 16kb buffer of zeros to /dev/dsp
(for calibration purposes?). With the print statements present, however,
artsd never stops sending zero bytes to /dev/dsp.

I'd appreciate some suggestions to narrow the range of possibilities.

Thanks,
Allen

Allen Barnett wrote:
> 
> Another thing I noticed is that after successfully playing something,
> artsd consumes ~100% of the cpu for a couple of seconds. After this, it
> will no longer play anything. The strace shows that it gets the audio
> file name over the MCOP channel and reads the data from the file, but it
> never writes to /dev/dsp again. I guess I'll instrument artsd some and
> see why this happens.
> 
> Thanks,
> Allen
> 
> Stefan Westerfeld wrote:
> >
> > Anyway, the assert you are seeing fail is that artsd makes a query for
> > available output space (with SNDCTL_DSP_GETOSPACE), and then calculates
> > data according to that size, and writes the data. This should always
> > succeed (as it will write less or equal bytes than there is space, so it
> > should always work). Using strace or adding printfs might be able to help
> > you to examine the problem more closely, if you want to debug it.

Reply via email to