--- On Tue, 11/22/11, Rocky Bernstein <[email protected]> wrote:
From: Rocky Bernstein <[email protected]>
Subject: Re: [Libcdio-help] Custom read_audio function
To: "Bastiaan Timmer" <[email protected]>
Cc: [email protected], "libcdio developer's mailing list" 
<[email protected]>
Date: Tuesday, November 22, 2011, 4:27 PM

Perhaps. I don't see how it is that fixing NO_DRIVER ,or UNINIT is any 
different than fixing a BAD_POINTER.  But since you are coding this, the choice 
of what can be fixed or not is totally up to you and the program. 
No, you're absolutely right. I was just sort of thinking out loud (only not 
really out loud, just with my keyboard). On second thought, for my own app I 
think I'll just treat every error other than UNSUPPORTED and NOT_PERMITTED as 
bugs (that is, I should make sure the driver is initialized and pointers are 
valid and memory allocated before calling the read function). Then if that 
situation occurs I should just fix the bug. So I won't be throwing exceptions. 
Right now I'm checking for UNSUPPORTED and NOT_PERMITTED by just calling the 
custom read function once directly (not through paranoia_read()) before 
starting the reading loop, and checking its return value. That seems to work so 
far.
If you create a small test case that exhibits this, I'll look at it and 
possibly adjust things and then add that example as a test case.
Sure, I'm having a few very busy weeks right now, but hopefully I'll find some 
time one of the afternoons the coming week.
_______________________________________________
Libcdio-help mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/libcdio-help

Reply via email to