-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound.repeat() does not repeat the sound #65
Comments
Can confirm this. I'm also running 14.04 with indigo. |
This bug is still present on deb package. |
The latest version seems still has bugs, but this one works: https://github.com/yann-bourrigault/audio_common |
In my environment with current master branch, I cannot reproduce this issue and I can repeat the wave play multiple times. |
can you share me your testing code? import rospy
import sys
from sound_play.libsoundplay import SoundClient
def play_repeat():
soundhandle = SoundClient()
rospy.sleep(0.5)
sound_beep = soundhandle.waveSound("say-beep.wav")
sound_beep.play()
rospy.loginfo('first beep')
rospy.sleep(1)
for i in range(100):
sound_beep.repeat()
rospy.loginfo('repeat beep: {}'.format(i))
if rospy.is_shutdown():
break
rospy.sleep(1)
if __name__ == '__main__':
rospy.init_node('repeat_test')
play_repeat()
sys.exit(0) |
Thanks for reply.
I tested in Ubuntu18.04 and ROS-Melodic with current master branch and C++.
|
you don't need to run |
I tested your python script, it worked as expected.
By the way, I tested this in VMware Workstation. Does that matter? |
@zhyx490991014 you forgot #!/usr/bin/env python
import rospy
import sys
from sound_play.libsoundplay import SoundClient
def play_repeat():
soundhandle = SoundClient()
rospy.sleep(0.5)
sound_beep = soundhandle.waveSound("say-beep.wav")
sound_beep.play()
rospy.loginfo('first beep')
rospy.sleep(3)
sound_beep.repeat()
rospy.loginfo('beep repeat')
rospy.sleep(4)
if __name__ == '__main__':
rospy.init_node('repeat_test')
play_repeat()
sys.exit(0) |
I tried your script, but it just play once when 'first beep', and another once when 'beep repeat'.... |
oh, thanks, I misunderstood about |
@zhyx490991014 thank you for debugging! I merged #131 to master branch, so this issue may be solved in master branch, too. |
this issue is solved by #131 |
thank you! it worked as expected in master branch |
Good! Thank you for helping my PR check :) |
(I came across this while working on #64, personally I have no use for this functionality but I figured it would be good to report).
The SoundClient's
repeat()
method does not appear to actually repeat the sound (instead it just plays it one time).MWE:
The first call plays the sound once, as expected.
The second call is expected to play the sound "repeatedly until stop() is called," but it also only plays it one time.
Tested on Ubuntu 14.04 with ros indigo.
The text was updated successfully, but these errors were encountered: