Skip to content

Using File2ByteSlice for WAV files #1515

Answered by hajimehoshi
bjazmoore asked this question in Q&A
Discussion options

You must be logged in to vote

Now I recommend to use Go 1.16's new feature: embed instead of file2byteslice. This is the standard way to embed resources and much easier to use. Ebiten will keep using file2byteslice for a while for old Go compilers, but will migrate this into embed in near future.

if I encode a WAV file to a byte slice will I be able to use it in the game engine? How?

Wav file format can be decoded with Ebiten's wav package. See examples/wav.

Thanks in advance. P.S. - if I should be taking my basic questions somewhere else - please let me know.

I welcome any questions related to Ebiten here :-)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@AWachtendorf
Comment options

@hajimehoshi
Comment options

@AWachtendorf
Comment options

@hajimehoshi
Comment options

@bjazmoore
Comment options

Answer selected by hajimehoshi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants