Re: [AD] Latest mixer patch |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Elias Pschernig wrote:
I'll add a comment about this to the docs and ABI compatibility section when committing.
I don't think this patch can be added to the 4.0 branch. Because it adds the global functions I listed out, ABI compatibility is impossible. If you remove those however, it should be fine.
I read through your changes (without trying to understand them :P) - and only made some minor formatting changes, and I used ASSERT() instead of modifying user provided parameters for set_mixer_quality and _set_mixer_position - since that's the way Allegro normally treats user parameters. (So instead of silently allowing errors to creep into the user code, the program aborts.) + if((quality < 0) || (quality > 2)) + quality = 2; + ASSERT(_sound_hq >= 0 && _sound_hq <= 2);
Well, the thing is, the Allegro docs never state that a value greater than 2 is invalid, and indeed you could create filters that are activated with quality 3 or higher, as well I also would think a value of <= -1 would indicate the default (which is currently 2).
+ if (position < 0) + position = 0; + ASSERT(position >= 0);
This however does seem reasonable. :) - Kitty Cat
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |