module WritingAdditions::Sound

Overview

A normal sound effect.

Direct including types

Defined in:

write/write_sound.cr

Instance Method Summary

Instance Method Detail

def 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")

def 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