Please apply my current pull request. It implements dB-based VU meters and a tricolor stripe for the main VU meter. In addition, the following improvement has been introduced:
for a VU meter, during initialization, 47 single LED stripe images are created and stored in an array. The 0th element of this array shows all LEDs in dark color, the 1st element shows the leftmost LED in bright color, the 2nd element shows the two leftmost LEDs in bright color, and so on, until the 46th element, which contains all LEDs in bright.
in the VuMeter::paint() method, there were previously two calls to the drawImage() method: the first one redrew the entire LED stripe in dark, and the second one redrew the necessary leftmost LEDs in bright color. Now, there is a single call to the drawImageAt() method, which refers to the proper element of the array of images mentioned above, indexed by the dB-based scaling. (And, it is also hoped, the method drawImageAt() is faster on its own than the drawImage()).
Dear Pascal,
Please apply my current pull request. It implements dB-based VU meters and a tricolor stripe for the main VU meter. In addition, the following improvement has been introduced:
VuMeter::paint()
method, there were previously two calls to thedrawImage()
method: the first one redrew the entire LED stripe in dark, and the second one redrew the necessary leftmost LEDs in bright color. Now, there is a single call to thedrawImageAt()
method, which refers to the proper element of the array of images mentioned above, indexed by the dB-based scaling. (And, it is also hoped, the methoddrawImageAt()
is faster on its own than thedrawImage()
).