|
|
Rockbox mail archiveSubject: RE: Some questions about naming of some functionsRE: Some questions about naming of some functions
From: Jonas Hellesøe Nielsen <jonas_hn_at_hotmail.com>
Date: Sat, 9 Feb 2008 18:01:02 +0100
>Here we have three variations:
>set master volume registers, set lineout registers)?
>Please tell me about your opinions and maybe you can give me an understandable url/document, which explains what prescale does.
Well, let's say we had a player with both some sort of master, and a headphone, and a separate line out. Even though we don't have it at the moment, by keeping three functions, each for each sort of sound output, if we one day had a player with these capabilities, the code would be changed in parts of the functions using #ifdefs. But if all three functions all have the same body, i would consider making audiohw_set_volume(l, r), and then do
#define audiohw_set_master_vol audiohw_set_volume
later on, the macros could be replaces by individual functions, and we wouldn't need to decide which of the three functions should be used every time we would change volume in the code.
_________________________________________________________________
Page was last modified "Mar 9 2008" The Rockbox Crew |