Module I/O. Allows for the deserialization/serialization of Module and ModulePiece types.
Types
FormatResult = enum frNone = 0, ## No error, format is acceptable frInvalidSignature = 1, ## File has an invalid signature frInvalidRevision = 2, ## File has an unrecognized revision, possibly from a newer version of the format frCannotUpgrade = 3, ## An older revision file could not be upgraded to current revision frInvalidSize = 4, ## Attempted to read past the size of a payload block, block data ## is ill-formed frInvalidCount = 5, ## The icount or wcount field in the header is too big frInvalidBlock = 6, ## An invalid/unknown block id was used in a payload block frInvalidChannel = 7, ## An invalid/unknown channel was used in a payload block frInvalidSpeed = 8, ## The format contains an invalid speed, outside of Speed.low..Speed.high frInvalidRowCount = 9, ## A TrackFormat's rows field in a SONG block exceeds the Song's ## track size frInvalidRowNumber = 10, ## A RowFormat's rowno field exceeds the Song's track size frInvalidId = 11, ## An instrument or waveform has an invalid id frInvalidDuplicateId = 12, ## Two instruments or two waveforms have the same id frInvalidTerminator = 13, ## The terminator is invalid. frReadError = 14, ## A read error occurred during processing frWriteError = 15 ## A write error occurred during processing
- Source Edit
Procs
proc deserialize(i: var Instrument; stream: Stream): FormatResult {....raises: [], tags: [ReadIOEffect].}
- Source Edit
proc deserialize(m: var Module; stream: Stream): FormatResult {....raises: [], tags: [ReadIOEffect].}
- Source Edit
proc deserialize(s: var Song; stream: Stream): FormatResult {....raises: [], tags: [ReadIOEffect].}
- Source Edit
proc deserialize(w: var Waveform; stream: Stream): FormatResult {....raises: [], tags: [ReadIOEffect].}
- Source Edit
proc serialize(i: Instrument; stream: Stream): FormatResult {....raises: [], tags: [WriteIOEffect].}
- Source Edit
proc serialize(m: Module; stream: Stream): FormatResult {....raises: [], tags: [WriteIOEffect].}
- Source Edit
proc serialize(s: Song; stream: Stream): FormatResult {....raises: [], tags: [WriteIOEffect].}
- Source Edit
proc serialize(w: Waveform; stream: Stream): FormatResult {....raises: [], tags: [WriteIOEffect].}
- Source Edit