Re: [AD] get volume

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Elias Pschernig wrote:
> 
> I would go with the first one personally, although the 2nd one looks
> cleaner (but pollutes API with another struct). All other getter
> functions we have in Allegro seem to return a single value - so to be
> consistent with that, we also could use 4 separate functions - but then,
> we also should have 4 setter functions for that, so my vote stays #1.
 
Another concern: on some drivers get_hardware_volume() will be unavailable (on
drivers where set_hardware_volume() does nothing). How should
get_hardware_volume() behave in that case? I think this is where returning a
pointer to a struct is a better idea. It would return NULL in this case. But
then there should be an API to destroy allocated struct, like in
get_gfx_mode_list/destroy_gfx_mode_list pair, because of different heaps :-(
Or int get_hardware_volume(int *digi, int* midi) which returns 0 on success.


-- 
Milan Mimica
http://sparklet.sf.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/