audio_play stops producing sound [closed]
Hello,
I'm trying to get audio streaming to work. The goal is to stream audio from one computer to another. I am using the audio_common package ( http://wiki.ros.org/audio_common ) which provides audio_play and audio_capture.
I am launching audio_capture on computer A, which has a microphone. Computer B launches audio_play and should output the sound captured by this microphone.
When starting audio_capture and audio_play, at first, computer B outputs the sound that is captured by the microphone. After a while, the playback stops.
The command
rostopic echo /audio
shows that there is still data received on the /audio topic, but no sound is produced anymore.
When I start audio_play again, it produces sound again (for a little while).
The symptoms of this issue are exactly the same as the ones in http://answers.ros.org/question/12777... besides the fact that I have sound playback when launching audio_play. Hence, I think this problem cannot be seen as a driver issue.
I guess that there is a problem in audio_play. But I cannot understand why the playback stops. Any ideas on how to troubleshoot this?
Edit: After some experimenting I also have noticed that when audio_capture stops for a short time, audio_play stops producing sound. I have verified that audio_play still receives all messages that have been sent by audio_capture.
My setup is Ubuntu 12.04, catkin and ROS Hydro (on both machines).
Thanks,
-Mathijs
Did you verify that sound output was not accidentally muted on computer B?
Yes, of course.
I suspect that this is a memory or other resource leak in audio_play. It may be worth watching the process's memory usage while running.
After some experimenting I have noticed that when audio_capture stops for a short time, audio_play stops producing sound. I have verified that audio_play still receives all messages that have been sent by audio_capture. I think that is were the problem lies. (I have updated my question above.)
My best guess is that there's something about the data stream or the mp3 decoder that isn't tolerant to losing packets. I don't have enough experience with audio codecs or streaming to debug further.
I'm experiencing the same issue on almost the same setup. The only noticeable difference in my setup is that I have both capture and play occurring on the same machine. (Maybe related: the audio quality during play is terrible, despite great quality with the gst-launch-0.10 ... test.)