mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Add support for local audio playback mode
This commit is contained in:
parent
21822f259c
commit
1a71dda243
Binary file not shown.
@ -158,11 +158,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
decoderRenderer = new ConfigurableDecoderRenderer();
|
decoderRenderer = new ConfigurableDecoderRenderer();
|
||||||
decoderRenderer.initializeWithFlags(drFlags);
|
decoderRenderer.initializeWithFlags(drFlags);
|
||||||
|
|
||||||
StreamConfiguration config =
|
StreamConfiguration config = new StreamConfiguration.Builder()
|
||||||
new StreamConfiguration(app, prefConfig.width, prefConfig.height,
|
.setResolution(prefConfig.width, prefConfig.height)
|
||||||
prefConfig.fps, prefConfig.bitrate * 1000, prefConfig.enableSops,
|
.setRefreshRate(prefConfig.fps)
|
||||||
(decoderRenderer.getCapabilities() &
|
.setApp(app)
|
||||||
VideoDecoderRenderer.CAPABILITY_ADAPTIVE_RESOLUTION) != 0);
|
.setBitrate(prefConfig.bitrate * 1000)
|
||||||
|
.setEnableSops(prefConfig.enableSops)
|
||||||
|
.enableAdaptiveResolution((decoderRenderer.getCapabilities() &
|
||||||
|
VideoDecoderRenderer.CAPABILITY_ADAPTIVE_RESOLUTION) != 0)
|
||||||
|
.enableLocalAudioPlayback(prefConfig.playHostAudio)
|
||||||
|
.build();
|
||||||
|
|
||||||
// Initialize the connection
|
// Initialize the connection
|
||||||
conn = new NvConnection(host, uniqueId, Game.this, config, PlatformBinding.getCryptoProvider(this));
|
conn = new NvConnection(host, uniqueId, Game.this, config, PlatformBinding.getCryptoProvider(this));
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<string name="title_checkbox_enable_sops">Optimize game settings</string>
|
<string name="title_checkbox_enable_sops">Optimize game settings</string>
|
||||||
<string name="summary_checkbox_enable_sops">Allow GFE to modify game settings for optimal streaming</string>
|
<string name="summary_checkbox_enable_sops">Allow GFE to modify game settings for optimal streaming</string>
|
||||||
<string name="title_checkbox_host_audio">Play audio on PC</string>
|
<string name="title_checkbox_host_audio">Play audio on PC</string>
|
||||||
<string name="summary_checkbox_host_audio">Play audio from the computer instead of the device</string>
|
<string name="summary_checkbox_host_audio">Play audio from the computer instead of this device. Requires GFE 2.1.2+</string>
|
||||||
|
|
||||||
<string name="category_advanced_settings">Advanced Settings</string>
|
<string name="category_advanced_settings">Advanced Settings</string>
|
||||||
<string name="title_decoder_list">Change decoder</string>
|
<string name="title_decoder_list">Change decoder</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user