On 11/21/2011 09:09 AM, Bastiaan Timmer wrote:

<snip>

> Now this all worked splendidly, but yesterday I wrote another custom read 
> function to be used in some other 
> circumstances. This time, I made a slight mistake in the mmc command, causing 
> mmc_read_cd() to fail and return 
> DRIVER_OP_BAD_PARAMETER. Now I had never seen the read function fail before, 
> but simply assumed that if the 
> read_audio function would not return a number of sectors, but a negative 
> value (an error), paranoia_read() would 
> return NULL so that the cd reading loop would break (the 'if (!p_readbuf)' 
> part). Instead, I just get the 
> following messages repeated:
> 
> [MESSAGE] (CdioInternal) : ioctl CDROM_SEND_PACKET failed: Invalid argument
> RETURN CODE: -5
> [WARNING] (CdioCddaInterface::callback()) : paranoia_read() reports `read 
> error' at sector 0
> 
> The first of these is a message from a log_handler (set with 
> cdio_log_set_handler()). The second is the cout seen 
> in the readRaw2448() function shown above. The last is a message from my 
> callback (given as parameter to 
> paranoia_read()). The messages get repeated in series of 4, where the sector 
> number changes from 0 to 25 to 50 to 75 
> and then back to 0. Calling paranoia_read_limited() instead of 
> paranoia_read() in the loop does not seem to help, 
> paranoia_read() will just not return. At what point could/should I break from 
> the loop if read_audio returns an error 
> code? Am I returning the correct values from the read function 
> (driver_return_code_t on error, sectors on success)? 
> Any other remarks?

A couple of questions.  Are you doing something like this?

cdio_paranoia_modeset(rip->paranoiaRipObj, PARANOIA_MODE_FULL ^
PARANOIA_MODE_NEVERSKIP);

This line of code clears the NEVERSKIP bit.  You need this to keep
paranoia from re-trying forever.  I think you need this in conjunction
with specifying a number of retries to the read_limited interface.

Rob

_______________________________________________
Libcdio-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/libcdio-help

Reply via email to