Menu

#553 Network microphone does not work on PulseAudio

open
nobody
Unix (35)
6
2014-08-25
2011-12-09
No

When trying to use the microphone in a network game using PulseAudio, no sound can be heard, and when one presses the microphone button in a game where the alephone command was run from the console, one gets the message "adding pcm handler failed"; a brief perusal of the source code suggests that snd_async_add_pcm_handler, which is not implemented in PulseAudio's implementation of ALSA, and which is strongly discouraged from what I can tell.

Discussion

  • Gregory Smith

    Gregory Smith - 2011-12-09
    • priority: 5 --> 6
    • milestone: 531406 -->
     
  • William Schlieper

    I played the game with PulseAudio disabled, and while sound "worked"(despite a buzzing noise reported by the other player), as soon as I released the microphone button I recieved the bizarre message "I/O possible". Apparently, this message is received when a SIGIO(which snd_async_add_pcm_handler uses) is received but there is no handler; this is also a bug with the async code; probably a race condition.

    However, I changed a few lines in network_microphone_sdl_alsa.cpp so that instead of using the asynchronous SIGIO-based code, it would spawn an SDL thread that called the same code in a loop with snd_pcm_wait. Not only was the reported "buzzing" gone, net mic finally worked for PulseAudio.

    Where should I submit a patch or the like?

     
  • Jeremiah Morris

    Jeremiah Morris - 2011-12-10

    You can submit a patch to our Patches section here on SourceForge ( https://sourceforge.net/tracker/?func=add&group_id=1997&atid=301997 ), or just add it as a file attachment to this bug. I'm not in a position to test this patch myself, so I can't say when it will be reviewed, but thank you very much for your help in diagnosing and fixing this problem!

     

Log in to post a comment.