module WritingAdditions::PcSound

Overview

A pc speaker 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 pc sound given an output io and returns the size of the written lump

Writes a pc sound in my_wad to a file:

my_wad = WAD.read("Path/To/Wad")
my_wad.pcsounds.["MyPcSound"].write("Path/To/pcsound.lmp")

def write(io : IO) : UInt32 #

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

Writes a pc sound in my_wad to a file:

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