Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay of sound after not focusing the game window #975

Closed
wasedaigo opened this issue Nov 6, 2019 · 4 comments
Closed

Delay of sound after not focusing the game window #975

wasedaigo opened this issue Nov 6, 2019 · 4 comments
Assignees
Milestone

Comments

@wasedaigo
Copy link
Contributor

wasedaigo commented Nov 6, 2019

OS: Mac
ebiten version: ddba7f0

Repro Step:

  1. Leave the game unfocused
  2. Confirm the music delays after focusing the window

It seems the amount of delay is proportional to the time you were not focusing the window.

@hajimehoshi hajimehoshi added this to the v1.10.1 milestone Nov 6, 2019
@hajimehoshi hajimehoshi self-assigned this Nov 6, 2019
@hajimehoshi
Copy link
Owner

Confirmed.

hajimehoshi added a commit that referenced this issue Nov 6, 2019
When writing is stopped on Oto's players, unexpected delaying
happens.

The ideal solution is to have APIs to suspend and resume Oto's
player, but this is not easy. For a temporary solution, write
zero values on the players when audio is suspended.

Fixes #975
hajimehoshi added a commit that referenced this issue Nov 9, 2019
This reverts commit 529dddd.

Updates #975

Reason: This causes PARTIAL_WAKE_LOCK on Android (AudioDirectOut) (#931)
@hajimehoshi hajimehoshi reopened this Nov 9, 2019
@hajimehoshi
Copy link
Owner

The fix causes PARTIAL_WAKE_LOCK on Android.

hajimehoshi added a commit that referenced this issue Nov 9, 2019
This reverts commit 529dddd.

Updates #975

Reason: This causes PARTIAL_WAKE_LOCK on Android (AudioDirectOut) (#931)
hajimehoshi added a commit to ebitengine/oto that referenced this issue Nov 10, 2019
hajimehoshi added a commit that referenced this issue Nov 10, 2019
@hajimehoshi
Copy link
Owner

I'll reflect this fix on 1.10 after Oto v0.5.3 is released.

hajimehoshi added a commit that referenced this issue Nov 10, 2019
@hajimehoshi
Copy link
Owner

Now Ebiten has Oto v0.5.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants