How to adjust system volume when in low_latency(set in audio_policy.conf) mode - low-latency

In driver layer, the max volume parameter can't be set when it's in low_latency mode in audio_policy.conf. The reason to change from deep_buffer mode to low_latency, keypad tone has a delay when the key pressed. Change to low_latency resolve it. Any ideas?

Related

Fullscreen Exclusive: How to change the native resolution?

I can successfully control the native refresh-rate by specifying the refresh rate in DXGI_SWAP_CHAIN_FULLSCREEN_DESC which is passed to CreateSwapChainForHwnd.
I was expecting native resolution to change to that specified by the hight and width of the swapchain. However, I was not this lucky.
Moreover, the CreateSwapChainForHwnd suggests that you cant control the native resolution of the monitor since you can specify DXGI_SWAP_CHAIN_FULLSCREEN_DESC has a scaling parameter
typedef enum DXGI_MODE_SCALING {
DXGI_MODE_SCALING_UNSPECIFIED = 0,
DXGI_MODE_SCALING_CENTERED = 1,
DXGI_MODE_SCALING_STRETCHED = 2
} DXGI_MODE_SCALING;
But, video games are clearly trigging a mode change (temporary black screen) when they change resolution in fullscreen exclusive. So they must be able to change the native resolution. How are they doing this?
Also, I was wondering why DXGI_MODE_SCALING_STRETCHED only fills a sub-rectangle of screen (DXGI_MODE_SCALING_CENTERED centres on this sub-rectangle, and DXGI_MODE_SCALING_UNSPECIFIED aligns the swapchain's top right corner with the top-right of this sub-rectangle). This sub-rectangle also changes as the hight and width passed to CreateSwapChainForHwnd changes. Maybe it's that I'm really in Fullscreen Optimizations rather than Fullscreen Exclusive and this sub-rectangle is the same size of my window(changing the window size didn't affect the observed behaviour).
DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH
Set this flag to enable an application to switch modes by calling IDXGISwapChain::ResizeTarget.
When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window.
https://learn.microsoft.com/en-us/windows/win32/api/dxgi/ne-dxgi-dxgi_swap_chain_flag
Interestingly, the mode switch works correctly without the flag when changing refresh-rates but will not when changing resolutions

Disable microphone button in UITextField keyboard

I have a UITextField, and the keyboard shows a mic button, which I'd like to disable. I'm especially concerned that it shouldn't show on iPhone X.
I already disabled the Emoji keyboard by setting the keyboard type to "ASCII Capable". Is there another setting to remove dictation?
We are talking about the mic symbol in lower right corner on an iPhone X.
You should not remove it since this is where users of an iPhone X are expecting it.
Also you can not remove the keyboard switcher on the left.
only if you use a custom view for the keyboard, but why?
As you can see on any other iPhone the mic key is still in the same position.
By changing type of keyboard you can discard things you don't want
textField.keyboardType = UIKeyboardTypeEmailAddress;
above one not exact solution but still that can give some idea regarding keyboard type
Hope this will help you

Firebase overwrite default screen name

I'm using the Firebase SDK and I want to give everyscreen a custom name so that I can track this.
Now when the app starts I get this info statement:
Firebase automatic screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name
Now I don't see where I can just overwrite the default screen name, is it a property somewhere on every viewcontroller?
If you would like to overwrite it, then I'd recommend to use the method in viewDidAppear in each of your view controller. To avoid conflicting reporting with the auto reporter as it might overwrite your own screen name, I think you might want to turn off the auto reporter:
To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist

Underscan issue with AirPlay mirroring

I'm having some issues with AirPlay. The thing is, I'm developing with the ATV3, and my TV set supports 1080p. But when I start screen mirroring and receive the new instance of UIScreen, the bounds and the applicationFrame are both giving me a 720p resolution.
But it gets weird when I actually moved the subviews to a negative value, and the whole screen gets covered. So, technically my iPhone is streaming at 1080p, but the bounds returned by the UIScreen are underscanned.
I've tried modifying the overscanCompensation before getting the bounds or the applicationFrame (tried both with all 3 overscanCompensation values available) but I'm still getting the same result.
Here is a picture of what I'm getting (sorry, it's the worst picture in the planet, I know, but I was using my phone to stream the image to the ATV :) )
Red view is the 720p reported by bounds.
It gets even weirder when I actually try this out in my ATV2 (it is supposedly limited to 720p even if it supports 1080p) and the result is exactly the same.
Anyway, if someone knows the method to get the real screen display to avoid putting a settings view in my app, I'll really appreciate it.
Thanks in advance :)
When you mentioned that you tried all 3 overscanCompensation modes, I presume you mean the 3 documented modes:
typedef enum {
UIScreenOverscanCompensationScale,
UIScreenOverscanCompensationInsetBounds,
UIScreenOverscanCompensationInsetApplicationFrame,
} UIScreenOverscanCompensation;
However, there is a fourth mode, which is not there, but should fix your problems: just set your overscanCompensation to 3.
Also, take a look at this SO question.
The answer of Ivan solved the same issue for me! But I also had the borders when using AirPlay Mirroring. I got rid of the borders without setting the overscanCompensation property by changing a setting on my Apple TV: try setting 'Settings > Audio & Video > Adjust For AirPlay Overscan' to Off (default On).
The setting that works best for most TVs is:
externalScreen.overscanCompensation = UIScreenOverscanCompensationInsetBounds | UIScreenOverscanCompensationInsetApplicationFrame; // this is the same as setting it to 3
Just setting it to UIScreenOverscanCompensationInsetApplicationFrame can cause misalignment of the UIWindow contents.
3 is a bitmask of UIScreenOverscanCompensationInsetBounds(1) and UIScreenOverscanCompensationInsetApplicationFrame(2) for those wondering where that number comes from and why it works.

How to set primefaces virtual keyboard?

Is there any option for primefaces keyboard component to accept numbers form both keyboard and mouse?
I'm using primefaces keyboard component with keypadonly option to enter numbers only.
I should be able to enter numbers either from physical keyboard or virtual keyboard.
If keypadonly is set to true, I'm not able to enter data using physical keyboard.
I don't have this problem if keypadonly only attribute is not used. Did someone experience this problem? If so please let me know how to handle it.
It seems to be intentional, if keypadonly is set to true a javascript will set the input to readonly="readonly".
You may try to use a custom layout (see http://www.primefaces.org/showcase/ui/keyboard.jsf ).
This migth work:
<p:keyboard value="#{keyboardBean.value}"
layout="custom"
layoutTemplate="123-close,456-clear,789-back,0"/>
or removing the readonly attribute with a custom javascript.

Resources