[crossfire] Alsa 1.0.x client sound support.

Mark Wedel mwedel at sonic.net
Fri Feb 11 01:35:40 CST 2005


Bob Tanner wrote:
>
     
      On Thursday 10 February 2005 12:11 pm, tchize wrote:
     
     >
     
     
     >>
     
     I use the alsa sound server and have a problem some other people already
     
     >>
     
     pointed:
     
     >>
     
     The sound server is blocking on the alsa device and stop responding, in the
     
     >>
     
     end, the client also freez because communication pipe is full.
     
     >
     
     
     >
     
     
     >
     
      Look at my branch of the client. I have autotool detect stuff correctly and 
     
     >
     
      patch that will prevent the freeze, BUT sound rate(?) is off.  All the sounds 
     
     >
     
      play a rate that is too fast, so it is like listen to a chimpunk record (hmm, 
     
     >
     
      this might be US-only joke).
     
     >
     
     
     >
     
      Regardless, there are several sounds that won't play now, because of code 
     
     >
     
      changes Mark made, which I cannot find in my inbox at the moment.
     
     
  The spells no longer play sounds, but that isn't unique to alsa 9.

  However, the problem you describe sounds roughly analogous to my 
problem - in my case, it may just be that the sounds are playing so 
rapidly that one can't distinguish them from normal sounds.

  The problem tchize describes is a bit different - and one I thought 
could be the case - if the sound process doesn't read data from the 
client process fast enough, the client process can block writing to the 
sound process.  The ideal way to handle this is for the pipe to be 
opened in non blocking mode, so that write will never fail.

  The other sound modules don't have a problem because they can make 
sure they never do blocking operations - I imagine the same can be true 
of the alsa client - I just think that right now there can be cases were 
certain operations can block (but I'm hardly an alsa9 expert).


    
    


More information about the crossfire mailing list