-
Notifications
You must be signed in to change notification settings - Fork 31
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
Rework audio handling #318
Conversation
…eanup * unused prototypes and defines * cleanup unused keyword SC_DEVICE
Allows stop of recording with ESC key.
* change default soundlog directory to './soundlogs' * add a SOUNDLOG_DIRECTORY keyword for configuration
The playback command will be executed in the soundlog directory, so we can directly reference the file by name
I see at least one issue: contest recording can be started multiple times. The user has no feedback whether it is already active. Ideally options 1 and 2 would be mutually exclusive. Similarly on exit the recording continues, that could be viewed both as a feature or a bug. Here it would make sense to ask for confirmation to continue with the recording, e.g. in case user wants to make a quick parameter change and get back to TLF. |
- clear whole screen on start - drop period from menu items - add comment for 3->4 transition
Added some minor cosmetic fixes. |
- Start/stop is done by the same command, so recording can not be started two times in a row. - Code honors recording started in a former run of TLF. So you can start recording, leave TLF and start it anew. TLF recognizes already started sound recording and allows now stop of recording, - Drop unused case for separate playing the sound file.
Thanks. That sounds like a valid enhancement. The following commits fixes both problems. |
play_thread assumes now that the 'ptr' parameter is dynamically allocated and has to be freed by the thread after use.
Thanks for the updates! Just added minor cosmetic fixes. On playback using the default command I get this warning:
I does play it back, just the warning is annoying. In my case a trailing Another point: it would be nice to use the same terms (Enable/Disable vs. Start/Stop) on the :sound screen and at exit. |
Hmm, that does not look nice. Here it works without problems. The provided discussion is quite old, just wondering that the problem is not fixed yet in SoX. Wrt start/stop I agree. Will fix it. |
I have this SoX version (Debian 11)
|
Same version here but with patchset from May 2021. v14.4.2 is otherwise quite old - 2015. Anyway the code should work with the tools provided by the actual standard distributions. |
Can you please test if the warning from play goes only to stderr (play -q xyz 2> /dev/null)? |
There is no warning with stderr redirect. ( |
Thanks for the quick test and sorry for the late reply. Last days I did not feel well. I think best is to redirect that error message by adding the '2>/dev/null' but only for the default soundlog play command. If the user decides t use another program for play back there will be nost likely no error. See coming patch. |
OK with me. |
(stopping with Ctrl-C is somewhat slow, but that's the same from command line. most likely it buffers a large amount of sound data that needs to be drained first.) |
Yes draining the buffers takes some time. Other than for voice key messages the delay seems acceptable here. So no need to hard kill the program and let it finish graceful. Again, Thanks for the feedback. Will merge it in tomorrow. |
These commit gives recording and playing of voice keyer messages and contest soundlogs a thorough overhaul.
The code relies on the tools from the SoX package with some sane default settings but allow user configuration of all play and record commands (See also the discussion in PR #276)
The default directory for recorded soundlogs was changed to
./soundlogs
and are therefor contest specific now. These setting can also be overwritten by a configuration keyword (see man page for details).Please update the script
soundlog
in /usr/bin before testing.As I will be away the next days please merge the PR in if there are no problems.