module

WritingAdditions::Sound

A normal sound effect.

Instance methods

write(file : String | Path) : UInt32

Writes a sound given an output io and returns the size of the written lump

Writes a sound in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
my_wad.sounds["MySound"].write("Path/To/sound.lmp")
write(io : IO) : UInt32

Writes a sound given an output io and returns the size of the written lump

Writes a sound in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
File.open("Path/To/sound.lmp", "w+") do |file|
  my_wad.sounds["MySound"].write(file)
end