octareenroon91 / analog-box

Automatically exported from code.google.com/p/analog-box
0 stars 0 forks source link

Clock Cycles Only Display 4 Digits #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Problem:
ABox can display the estimated average CPU clock cycles per audio 
sample used by each object in a circuit. Typically the number is 
less than one hundred, but can spike in the several thousands. 
When a great number of objects are grouped together, however, the 
clocks per sample can be in the hundreds of thousands. ABox only 
allows room for the least significant 4 digits -- thus, the numbers 
larger than 9999 do not display correctly.

Recommend:
*Resize the drawing rectangle (possibly the format string too) to 
 allow room for more digits. Alternately, since it is desirable in 
 general to draw less text (spaces count as text), selectively adjust
 the rectangle if the number to be displayed is greater than a certain 
 value. 
*Clock cycle information is collected in the PlayThread, and passed to 
 the GUIThread to be rendered. The formatting and rendering of the clock 
 cycles is performed during the GDIRender operation.
*As an aside: ABox was origonally developed on a 90MHz Pentium 1. 
 Using 10 thousand clocks per audio sample was simply not possible 
 (in real time). Now, with 3+ GHz processors in common use, sustaining 
 70000 clocks per sample is not out of the question.

Original issue reported on code.google.com by andyt7...@gmail.com on 8 Jul 2011 at 9:07

GoogleCodeExporter commented 8 years ago
This has been fixed in 'Update 20120417' release.
Solution involved adding 'k' and 'M' suffixes,
and the addition of a simple state machine to track
display modes.

Original comment by andyt7...@gmail.com on 17 Apr 2012 at 11:30