unixcw leaves audio device volume muted on exit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unixcw (Debian) |
Fix Released
|
Unknown
|
|||
unixcw (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: unixcw
The programs 'cw' or 'cwcp' accidentally leave the system audio device (mixer) volume muted when they exit.
TESTCASE:
1. Ensure that the system audio volume is not muted (e.g. with the gnome volume control applet).
2. In a terminal, run
echo KA6MAL | cw
While listening to the Morse code audio output, notice the gnome volume control applet flashing its "muted" status along with the dits and dahs.
3. After the command returns to the shell prompt, notice that the gnome volume control applet has been left muted. The volume should have been restored.
Note: If the Morse code output is completely garbled (just long continuous tones) then you're experiencing bug LP: #511676 "unixcw sends incorrect characters".
ANALYSIS:
unixcw's 'cwlib' library works by manipulating the audio device (mixer) volume control -- switching the volume on and off to generate Morse code. This is the normal behavior of the 'cwlib' library.
The library does actually preserve the initial volume setting, but fails to restore it in some scenarios -- specifically, when it exits during it 10 second "keep the soundcard held" termination phase as occurs when piping input into 'cw' and when quitting 'cwcp' with F12. These programs just need to call cw_complete_reset() in all exit paths.
I think its possible that some systems' audio devices may *not* indicate a flashing volume control applet because 'cwlib' might find and uses a different volume mixer -- this bug is probably not reproducible on such systems.
Related branches
- Ubuntu branches: Pending requested
-
Diff: 137 lines (+47/-1)5 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
src/cw/cw.c (+4/-0)
src/cwcp/cwcp.c (+7/-0)
src/cwlib/cwlib.c (+25/-0)
Changed in unixcw (Ubuntu): | |
assignee: | nobody → Kamal Mostafa (kamalmostafa) |
status: | New → In Progress |
Changed in unixcw (Debian): | |
status: | Unknown → New |
Changed in unixcw (Debian): | |
status: | New → Fix Committed |
Changed in unixcw (Debian): | |
status: | Fix Committed → Fix Released |
I added the requisite call to cw_complete_reset() in all exit paths, fixing the bug.
Fixed in the attached branch, and created PPA update packages for Karmic and Lucid, available here:
https:/ /launchpad. net/~kamalmosta fa/+archive/ unixcw- fixes