diff --git a/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java b/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java index 10d2ad0692..41485a8018 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java @@ -34,7 +34,7 @@ import org.mozilla.geckoview.CrashReporter; import org.mozilla.geckoview.GeckoRuntime; import org.mozilla.geckoview.GeckoSession; -import org.mozilla.vrbrowser.audio.AudioEngine; +// import org.mozilla.vrbrowser.audio.AudioEngine; import org.mozilla.vrbrowser.audio.VRAudioTheme; import org.mozilla.vrbrowser.browser.PermissionDelegate; import org.mozilla.vrbrowser.browser.SessionStore; @@ -100,7 +100,7 @@ public void run() { static final String LOGTAG = "VRB"; HashMap mWidgets; private int mWidgetHandleIndex = 1; - AudioEngine mAudioEngine; + // AudioEngine mAudioEngine; OffscreenDisplay mOffscreenDisplay; FrameLayout mWidgetContainer; int mLastGesture; @@ -167,12 +167,12 @@ protected void onCreate(Bundle savedInstanceState) { mPermissionDelegate = new PermissionDelegate(this, this); - mAudioEngine = new AudioEngine(this, new VRAudioTheme()); - mAudioEngine.preloadAsync(() -> { - Log.i(LOGTAG, "AudioEngine sounds preloaded!"); - // mAudioEngine.playSound(AudioEngine.Sound.AMBIENT, true); - }); - mAudioUpdateRunnable = () -> mAudioEngine.update(); + // mAudioEngine = new AudioEngine(this, new VRAudioTheme()); + // mAudioEngine.preloadAsync(() -> { + // Log.i(LOGTAG, "AudioEngine sounds preloaded!"); + // // mAudioEngine.playSound(AudioEngine.Sound.AMBIENT, true); + // }); + // mAudioUpdateRunnable = () -> mAudioEngine.update(); loadFromIntent(getIntent()); queueRunnable(() -> createOffscreenDisplay()); @@ -242,7 +242,7 @@ protected void onPause() { // Also prevents a deadlock in onDestroy when the BrowserWidget is released. exitImmersiveSync(); } - mAudioEngine.pauseEngine(); + // mAudioEngine.pauseEngine(); SessionStore.get().setActive(false); super.onPause(); } @@ -250,7 +250,7 @@ protected void onPause() { @Override protected void onResume() { SessionStore.get().setActive(true); - mAudioEngine.resumeEngine(); + // mAudioEngine.resumeEngine(); super.onResume(); } @@ -267,9 +267,9 @@ protected void onDestroy() { if (mOffscreenDisplay != null) { mOffscreenDisplay.release(); } - if (mAudioEngine != null) { - mAudioEngine.release(); - } + // if (mAudioEngine != null) { + // mAudioEngine.release(); + // } if (mPermissionDelegate != null) { mPermissionDelegate.release(); } @@ -528,7 +528,7 @@ void handleBack() { @Keep @SuppressWarnings({"UnusedDeclaration"}) void handleAudioPose(float qx, float qy, float qz, float qw, float px, float py, float pz) { - mAudioEngine.setPose(qx, qy, qz, qw, px, py, pz); + // mAudioEngine.setPose(qx, qy, qz, qw, px, py, pz); // https://developers.google.com/vr/reference/android/com/google/vr/sdk/audio/GvrAudioEngine.html#resume() // The initialize method must be called from the main thread at a regular rate. diff --git a/app/src/googlevrFlat/java/org/mozilla/vrbrowser/BrowserActivity.java b/app/src/googlevrFlat/java/org/mozilla/vrbrowser/BrowserActivity.java index 734c848b45..2e1d5b0b52 100644 --- a/app/src/googlevrFlat/java/org/mozilla/vrbrowser/BrowserActivity.java +++ b/app/src/googlevrFlat/java/org/mozilla/vrbrowser/BrowserActivity.java @@ -24,7 +24,7 @@ import org.mozilla.geckoview.GeckoView; import org.mozilla.gecko.util.GeckoBundle; import org.mozilla.vrbrowser.SessionStore; -import org.mozilla.vrbrowser.audio.AudioEngine; +// import org.mozilla.vrbrowser.audio.AudioEngine; import org.mozilla.vrbrowser.audio.VRAudioTheme; import org.mozilla.vrbrowser.ui.NavigationBarWidget; @@ -36,7 +36,7 @@ public class BrowserActivity extends Activity implements SessionStore.SessionCha private GeckoView mGeckoView; private GeckoSession mGeckoSession; private NavigationBarWidget mBrowserHeader; - private AudioEngine mAudioEngine; + // private AudioEngine mAudioEngine; @Override @@ -46,8 +46,8 @@ protected void onCreate(Bundle savedInstanceState) { SessionStore.get().setContext(this); - mAudioEngine = new AudioEngine(this, new VRAudioTheme()); - mAudioEngine.preloadAsync(); + // mAudioEngine = new AudioEngine(this, new VRAudioTheme()); + // mAudioEngine.preloadAsync(); setContentView(R.layout.browser_activity); mBrowserHeader = findViewById(R.id.browserHeader); @@ -107,7 +107,7 @@ protected void onPause() { if (mGeckoView != null) { mGeckoView.releaseSession(); } - mAudioEngine.pauseEngine(); + // mAudioEngine.pauseEngine(); super.onPause(); } @@ -121,7 +121,7 @@ protected void onResume() { } mGeckoView.requestFocus(); } - mAudioEngine.resumeEngine(); + // mAudioEngine.resumeEngine(); super.onResume(); } @@ -131,7 +131,7 @@ protected void onDestroy() { if (mBrowserHeader != null) { mBrowserHeader.releaseWidget(); } - mAudioEngine.release(); + // mAudioEngine.release(); SessionStore.get().removeSessionChangeListener(this); super.onDestroy(); }