tuffy / python-audio-tools

A collection of audio handling programs which work from the command line.
http://audiotools.sourceforge.net
GNU General Public License v2.0
248 stars 57 forks source link

Ability to abort ripping/recoding #11

Open azatoth opened 11 years ago

azatoth commented 11 years ago

I'm trying to find a way to solve following three events, and has yet to come up with a solution. Sometimes cd2track just freezes and I have to use kill -9 to kill it.

I'm writing a own program for a project, which is an automated ripping to mp3 when CD is inserted into a drive, but I've been able to reproduce the issues using cd2track.

  1. Ejecting of CD during ripping (using udisk1 for event handling, but hasn't found a way to stop the ripping)
  2. Disconnect the physical CD drive (external USB portable drive)
  3. removal of the target directory during ripping
tuffy commented 11 years ago

I've pushed out a fix to ensure CD reading doesn't lock up the whole Python interpreter. That way you should be able to perform a ctrl-c to exit in the worst case without having to kill -9 it.

I'll see if I can track down an external USB drive and reproduce the lockups. CD reading is a pretty thin wrapper around libcdio's cdio_read_audio_sectors function so it may be something I need to push upstream if I can locate the problem.