audio_play stops producing sound
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 audiocommon package (http://wiki.ros.org/audiocommon) which provides audioplay and audiocapture.
I am launching audiocapture on computer A, which has a microphone. Computer B launches audioplay and should output the sound captured by this microphone.
When starting audiocapture and audioplay, 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/audio_play-on-turtlebot-messages-being-sent-but-no-audio-output/ 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 audiocapture stops for a short time, audioplay stops producing sound. I have verified that audioplay still receives all messages that have been sent by audiocapture.
My setup is Ubuntu 12.04, catkin and ROS Hydro (on both machines).
Thanks,
-Mathijs
Asked by mathijsdelangen on 2014-02-24 03:48:54 UTC
Comments
Did you verify that sound output was not accidentally muted on computer B?
Asked by joq on 2014-02-24 05:01:10 UTC
Yes, of course.
Asked by mathijsdelangen on 2014-02-24 05:11:32 UTC
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.
Asked by ahendrix on 2014-03-04 09:19:41 UTC
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.)
Asked by mathijsdelangen on 2014-03-04 21:59:47 UTC
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.
Asked by ahendrix on 2014-03-04 22:07:49 UTC
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.)
Asked by bradknox on 2014-05-01 16:06:53 UTC