0
Reply

Loading music and sounds from embedded resource?

Antti

Antti

Aug 24 2005 1:39 PM
2.3k
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.