Permalink
Browse files

MythMusic: don't use cdio_paranoia for CD playback

There is problem with cdio_paranoia_read_limited() getting stuck in a loop if
the CD is ejected while playing. In theory it should give up after a set
number of retries but that doesn't seem to be working in the latest version.

I tried to lock the CD tray while playing but while the media monitor supports
locking it doesn't appear to be working :( so the easiest solution for now is
to use the non paranoia cdio routines which do detect an ejected CD properly.
  • Loading branch information...
Paul Harrison
Paul Harrison committed May 26, 2013
1 parent b745004 commit d93eb3cc328a382cb213545410879a27fe1dd802
Showing with 8 additions and 2 deletions.
  1. +8 −2 mythplugins/mythmusic/mythmusic/cddecoder.cpp
@@ -231,15 +231,18 @@ bool CdDecoder::initialize()
m_end = end2;
}
m_paranoia = cdio_paranoia_init(m_device);
// FIXME can't use cdio_paranoia until we find a way to cleanly
// detect when the user has ejected a CD otherwise we enter a
// recursive loop in cdio_paranoia_read_limited()
//m_paranoia = cdio_paranoia_init(m_device);
if (NULL != m_paranoia)
{
cdio_paranoia_modeset(m_paranoia, PARANOIA_MODE_DISABLE);
(void)cdio_paranoia_seek(m_paranoia, m_start, SEEK_SET);
}
else
{
LOG(VB_GENERAL, LOG_ERR, "Warn: CD reading with paranoia is disabled");
LOG(VB_GENERAL, LOG_WARNING, "CD reading with paranoia is disabled");
}
}
else
@@ -375,6 +378,9 @@ void CdDecoder::run()
arg(m_curpos).arg(c));
memset( &m_output_buf[m_output_at],
0, CDIO_CD_FRAMESIZE_RAW);
// stop if we got an error
m_user_stop = true;
}
}

0 comments on commit d93eb3c

Please sign in to comment.