Add support for local audio playback mode

This commit is contained in:
Cameron Gutman 2014-11-02 20:55:15 -08:00
parent 21822f259c
commit 1a71dda243
3 changed files with 12 additions and 7 deletions

Binary file not shown.

View File

@ -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));

View File

@ -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>