0
Answer

Loading music and sounds from embedded resource?

Antti

Antti

19y
2.3k
1
I'm making a small dx-game, and i want to embed all the resources inside the exe-file. Images i can load from resources, but how about sounds and music? Now i load music with this code (using DirectX.AudioVideoPlayback nameSpace): audio = new Audio(fileName, false); and sounds: BufferDescription desc = new BufferDescription(); desc.StaticBuffer = true; secondaryBuffer = new SecondaryBuffer(fileName, desc, soundDevice); Musics are in mid or mp3 format, and sounds are in wav format.