[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-help] Custom read_audio function
From: |
Robert William Fuller |
Subject: |
Re: [Libcdio-help] Custom read_audio function |
Date: |
Fri, 25 Nov 2011 10:29:49 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110719 Lightning/1.0b3pre Thunderbird/3.1.10 |
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