hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.08k stars 664 forks source link

audio: add `Decode` #3101

Open hajimehoshi opened 2 months ago

hajimehoshi commented 2 months ago

Operating System

What feature would you like to be added?

Like image.Decode, audio.Decode should be useful. This automatically detects the type by the magic number at the first 4 bytes.

Unfortunately now the audio package is imported by other decoder packages, so this will be in v3.

Why is this needed?

No response

hajimehoshi commented 2 months ago

I realized this can be possible even though audio depends on audio/vorbis, audio/wav, and so on.