Permalink
Browse files

added: more verbose logging to CFileCDDA::Read

  • Loading branch information...
1 parent 2f1b2c4 commit 2c74b5a4df948766aef1958cb6419ff41d231ec8 @wsoltys wsoltys committed Jan 25, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 xbmc/filesystem/FileCDDA.cpp
@@ -130,9 +130,11 @@ unsigned int CFileCDDA::Read(void* lpBuf, int64_t uiBufSize)
if (m_lsnCurrent + iSectorCount > m_lsnEnd)
iSectorCount = m_lsnEnd - m_lsnCurrent;
- if (m_cdio->cdio_read_audio_sectors(m_pCdIo, lpBuf, m_lsnCurrent, iSectorCount) != DRIVER_OP_SUCCESS)
+ int iret = m_cdio->cdio_read_audio_sectors(m_pCdIo, lpBuf, m_lsnCurrent, iSectorCount);
+
+ if ( iret != DRIVER_OP_SUCCESS)
{
- CLog::Log(LOGERROR, "file cdda: Reading %d sectors of audio data starting at lsn %d failed", iSectorCount, m_lsnCurrent);
+ CLog::Log(LOGERROR, "file cdda: Reading %d sectors of audio data starting at lsn %d failed with error code %i", iSectorCount, m_lsnCurrent, iret);
return 0;
}

0 comments on commit 2c74b5a

Please sign in to comment.