Bug 119753

Summary: kttsd freezes when removing a speaking text job on alsa plugin
Product: kttsd Reporter: Gary Cramblitt <garycramblitt>
Component: generalAssignee: Gary Cramblitt <garycramblitt>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Gary Cramblitt 2006-01-08 18:54:23 UTC
Version:           0.3.5 (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
OS:                Linux

With ALSA v1.0.10 or ALSA 1.0.9-8, duplicate this problem as follows.  Configure ALSA as output audio plugin.  In Job tab of KTTSMgr, click Speak Clipboard.  While sentence is speaking, click Remove.  KTTSMgr freezes because kttsd is frozen.

ALSA seems to have changed its behavour sometime after 1.0.8.  It used to be that calling snd_pcm_drop on a playing pcm would cause an error and stop the playback.  No longer.  Instead, the code in AlsaPlayer::stop() calls snd_pcm_drop  and then waits infinitely for the playing thread to exit.
Comment 1 Gary Cramblitt 2006-01-11 00:00:14 UTC
SVN commit 496660 by cramblitt:

BUG:119753 plus other fixes.  See ChangeLog for details.

 M  +25 -0     ChangeLog  
 M  +2 -2      TODO  
 M  +16 -2     kttsd/speaker.cpp  
 M  +12 -0     kttsd/speaker.h  
 M  +14 -4     libkttsd/player.h  
 M  +0 -3      players/akodeplayer/akodeplayer.cpp  
 M  +0 -1      players/akodeplayer/akodeplayer.h  
 M  +1326 -1006 players/alsaplayer/alsaplayer.cpp  
 M  +18 -9     players/alsaplayer/alsaplayer.h  
 M  +3 -6      players/artsplayer/artsplayer.cpp  
 M  +0 -4      players/artsplayer/artsplayer.h  
 M  +3 -3      players/gstplayer/gstreamerplayer.cpp