AOSP 8.1 - minimum volume is too high - android-source

I have AOSP 8.1 and I would like to know if there is some possibility to change the behavior of the volume control (e.g. by modifying build.props, Framework/SystemUI config, ...).
Volume control in apps, which can override the system volume (like PowerAMP), behaves normally. For example, you can set their volume to values between 0 - 10%.
However, without Precise Volume app, the system volume can be set only to 0% or more than 70%. When I set volume steps to 50, all 50 steps are situated between 70 - 100%.
I would appreciate any help with this.

Related

Is there a maximum value for the volume depth of a render texture?

I'm using render texture as an array of textures by specifying the size of the array in volume depth property. But, sometimes when I exceed some value (eg. for 128x128 textures it's 45...) it return me an error : D3D11: Failed to create RenderTexture (128 x 128 fmt 39 aa 1), error 0x80070057 which isn't very clear. Therefore, I supposed it's because this property has a maximum value ? But I did not find it in unity manual either on internet.
Does anyone know this value or could tell me where I could find it ?
The width, height, and depth must be equal to or less than D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION (2048).
Likely you are having issues with some other parameter. Try enabling the Direct3D Debug Device for better information. Use -force-d3d11-debug. With Windows 10 or Windows 11, you have to install it by enabling the Windows optional feature Graphics Tools.
See Microsoft Docs.

(re)detect number of monitors connected when disconnecting monitor

When multiple monitors are connected to my computer, I can detect them, and draw figures to them by setting the position according to the values obtained from
get(0, 'MonitorPositions')
However, when I disconnect a monitor while MATLAB is running, this property is not updated. I use distFig to handle the positioning of the figures, but since this property is not updated, sometimes the figures are drawn at the pixel locations that lay outside my screen (i.e. drawing on my disconnected monitor).
Restarting MATLAB solves the issue, but is there a way to re-detect the number of monitors connected?
I think I found a solution using JAVA:
I got the JAVA code from here: How do I get number of available screens?
Getting number of
get(0, 'MonitorPositions') keeps showing the same value, and the JAVA result changes:
%// Get local graphics environment
%GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
env = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();
%// Returns an array of all of the screen GraphicsDevice objects.
%GraphicsDevice[] devices = env.getScreenDevices();
devices = env.getScreenDevices();
%numberOfScreens = devices.length;
numberOfScreens = length(devices)
I tested the code in Windows 10 OS.
In monitor duplicate mode, result is one monitor, and in extended mode 2.
When I unplug a monitor, the result is 1.
When unplugging all monitors the result is also 1 (it's not a perfect solution).

Set agent monitor window size in Netlogo

I use a monitor window and mouse coordinates to get a closer look at certain parts of my model. Is there any way to set the size of the agent monitor window somewhere in the inspect procedure? If the magnification level could be set at the same time, that would be even better. I couldn't find anything in the dictionary. I know that you can set the size of the static monitors by opening up the text version of the model by playing with the dimensions as below:
MONITOR
610
1074
791
1119
NIL
int-step-len
17
1
11
However, I can't figure out a way to do this for a dynamic window, and I'd like to not have to manually resize and zoom in. Any help would be appreciated!

BMP image header - biXPelsPerMeter

I have read a lot about BMP file format structure but I still cannot get what is the real meaning of the fields "biXPelsPermeter" and "biYPelsPermeter". I mean in practical way, how is it used or how it can be utilized. Any example or experience? Thanks a lot
biXPelsPermeter
Specifies the horizontal print resolution, in pixels per meter, of the target device for the bitmap.
biYPelsPermeter
Specifies the vertical print resolution.
Its not very important. You can leave them on 2835 its not going to ruin the image.
(72 DPI × 39.3701 inches per meter yields 2834.6472)
Think of it this way: The image bits within the BMP structure define the shape of the image using that much data (that much information describes the image), but that information must then be translated to a target device using a measuring system to indicate its applied resolution in practical use.
For example, if the BMP is 10,000 pixels wide, and 4,000 pixels high, that explains how much raw detail exists within the image bits. However, that image information must then be applied to some target. It uses the relationship to the dpi and its target to derive the applied resolution.
If it were printed at 1000 dpi then it's only going to give you an image with 10" x 4" but one with extremely high detail to the naked eye (more pixels per square inch). By contrast, if it's printed at only 100 dpi, then you'll get an image that's 100" x 40" with low detail (fewer pixels per square inch), but both of them have the same overall number of bits within. You can actually scale an image without scaling any of its internal image data by merely changing the dpi to non-standard values.
Also, using 72 dpi is a throwback to ancient printing techniques (https://en.wikipedia.org/wiki/Twip) which are not really relevant in moving forward (except to maintain compatibility with standards) as modern hardware devices often use other values for their fundamental relationships to image data. For video screens, for example, Macs use 72 dpi as the default. Windows uses 96 dpi. Others are similar. In theory you can set it to whatever you want, but be warned that not all software honors the internal settings and will instead assume a particular size. This can affect the way images are scaled within the app, even though the actual image data within hasn't changed.

What is the internal format of UIImage?

for ipad
e.g.
for pixel size 10x10 image, how much memory is used?
provide some other contribution:
usually for a normal iPad, it start with app-usable memory of 190-200mb
this number decrease if background process / other apps is running
many thanks!~~~
10 x 10 x 4 = 400bytes for that image, so it's 4 bytes per pixel. (GRBA).
Also it is normal for background app to take some memory. iOS will free memory if needed by any app.