-
Notifications
You must be signed in to change notification settings - Fork 154
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_play/scripts/soundplay_node.py] refactor and bugfix #77
[sound_play/scripts/soundplay_node.py] refactor and bugfix #77
Conversation
c355644
to
46dcb2c
Compare
#*********************************************************** | ||
#* Software License Agreement (BSD License) | ||
#* | ||
#* Copyright (c) 2009, Willow Garage, Inc. | ||
#* Copyright (c) 2016 JSK Lab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having made significant updates, there is nothing wrong with adding your own copyright line to the file, but you should not delete the old one.
[soundplay_node.launch] add params and docs
46dcb2c
to
2b20080
Compare
@jack-oquin Sorry I fixed. Actually, copy right is auto generated by my emacs. |
@jack-oquin @trainman419 |
I am not a maintainer of this repository, so merging is not my decision. But, since you ask, it looks like you have fixed a lot of problems, but I find the extent of these changes rather worrisome, especially given the lack of unit tests for the affected package. That is especially a concern for Python modules: without reasonable test coverage, it is hard to ensure that all the code even compiles. With packages I maintain, I like to see a small pull request for each individual bug fix, with a reference to the corresponding issue and a test case demonstrating the previous failure and the successful fix. That's an ideal, and I don't often get it, but that is what I try to do when modifying other people's packages. |
Sorry; this looked like a large set of changes and I haven't been able to find the time to sit down and give it a thorough review. This it too large for me to review it and have a good idea of whether it fixes the issues or not. All of the changes introduced by refactoring make it hard to understand which changes are just refactoring and which changes affect functionality. Please break this into several pull requests; ideally separating the bug fixes, the refactoring and the new features into separate PRs. |
@trainman419 So how about splitting this pull request into some requests: first only refactoring, and then each bugfix and new features? |
Yes. Please break this into pull requests for refactoring, bug fixes and features. |
This Pull Request includes some features:
bugfix: 'too many files open' (reported at soundplay_node.py crashes with "Too many open files" #75 )
This bug occurs because
soundplay_node
holds file descriptor of all playing wave files even after finished playing.Also see new feature below.
bugfix: repeating sound actually does not repeat. (reported at Sound.repeat() does not repeat the sound #65 )
This bug occured because the existing code was dirty enough to be out of control player states.
fix: permission of generated wav file (reported at sound_play: say command only works for first user on the robot #26 )
This fix gives write permission to auto generated wave files.
bugfix: play more than one sounds at a time (reported at Inconsistency in sound_play documentation and code (ros ticket #23) #23 )
Now you can play multiple sounds simultaneously.
new feature: specify prefix of files which are generated by
sound_play
nodeIn existing node, prefix of files generated in
/tmp
are only fixed tosound_play
.You can specify prefix by setting ros param.
new feature: "caching timeout" parameter
Though in existing code, all files were cached (see bugfix above), refactored code also holds some latest wave files in a short time for reusing.
I added new parameter "cache_timeout". After playing audio and another "cache_timeout" seconds passed, the wave file is closed.
Also I added service
clear_cache
for force clearing caches.new feature: "cache_saying_file" parameter
If this parameter is set to "True",
soundplay_node
caches wave file generated automatically from festival for saying.[soundplay_node.launch] add parameters and documents for parameters