On Thu, 11 Nov 2004 13:33:42 -0800 (PST)
Josh Coalson <[EMAIL PROTECTED]> wrote:

> I guess FLAC__STREAM_ENCODER_NOT_STREAMABLE could be expanded
> to FLAC__STREAM_ENCODER_NOT_STREAMABLE_BAD_SAMPLE_RATE,
> FLAC__STREAM_ENCODER_NOT_STREAMABLE_BAD_BITS_PER_SAMPLE etc
> but it doesn't seem worth changing the API for.

Here's what I do in libsndfile:

   - Errors are integers from 0 (SFE_NO_ERROR) through to some 
     maximum error number (which can change from release to 
     release).
   - API functions can return an error number.
   - The API supplies a function (rather than a string array)
     to convert the error number into a "const char *" string
     after checking that the error number is in the valid range.
   - Using a function means that error messages can be added and
     removed from release to release without breaking the API.

Hope this helps,
Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
"If POSIX threads are a good thing, perhaps I don't want to know what
they're better than."                                   -- Rob Pike
_______________________________________________
Flac-dev mailing list
[EMAIL PROTECTED]
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to