libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] [Libcdio-help] Custom read_audio function


From: Bastiaan Timmer
Subject: Re: [Libcdio-devel] [Libcdio-help] Custom read_audio function
Date: Fri, 25 Nov 2011 12:37:21 -0800 (PST)

--- On Tue, 11/22/11, Rocky Bernstein <address@hidden> wrote:
From: Rocky Bernstein <address@hidden>
Subject: Re: [Libcdio-help] Custom read_audio function
To: "Bastiaan Timmer" <address@hidden>
Cc: address@hidden, "libcdio developer's mailing list" <address@hidden>
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]