ebiten icon indicating copy to clipboard operation
ebiten copied to clipboard

audio: remove a hack using a dummy player

Open hajimehoshi opened this issue 11 months ago • 3 comments

Operating System

  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] FreeBSD
  • [ ] OpenBSD
  • [ ] Android
  • [ ] iOS
  • [ ] Nintendo Switch
  • [ ] Xbox
  • [ ] Web Browsers

What feature would you like to be added?

There is a hack using a dummy player to make the context ready. Actually, without this hack, examples/pcm doesn't work on browsers. I think this hack was introduced when Oto was not separated yet. See also #969, #970.

This hack should be on the Oto side rather than Ebitengine for every Oto user's benefits.

Why is this needed?

No response

hajimehoshi avatar Jul 30 '23 05:07 hajimehoshi

The hack was needed not only for browsers but also every platform, maybe

hajimehoshi avatar Jul 30 '23 06:07 hajimehoshi

OK I found this is due to Ebitengine's implementation, rather than Oto. Let's do refactoring anyway...

hajimehoshi avatar Jul 30 '23 06:07 hajimehoshi

This requires more refactoring the audio package.

hajimehoshi avatar Jul 30 '23 08:07 hajimehoshi

https://github.com/hajimehoshi/ebiten/blob/9cc017412fe41350b78534e24ee2ed20045d37e8/audio/audio.go#L288-L299

hajimehoshi avatar Mar 16 '24 12:03 hajimehoshi