audio_play stops producing sound [closed]

asked 2014-02-24 02:48:54 -0500

updated 2014-03-04 20:58:26 -0500

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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2018-01-30 17:41:33.227337

Comments

Did you verify that sound output was not accidentally muted on computer B?

joq gravatar imagejoq ( 2014-02-24 04:01:10 -0500 )edit

Yes, of course.

mathijsdelangen gravatar imagemathijsdelangen ( 2014-02-24 04:11:32 -0500 )edit
1

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.

ahendrix gravatar imageahendrix ( 2014-03-04 08:19:41 -0500 )edit

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.)

mathijsdelangen gravatar imagemathijsdelangen ( 2014-03-04 20:59:47 -0500 )edit

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.

ahendrix gravatar imageahendrix ( 2014-03-04 21:07:49 -0500 )edit

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.)

bradknox gravatar imagebradknox ( 2014-05-01 16:06:53 -0500 )edit