new
new
new
8.18
top
← prev up next →

Resource Interchange File Format (RIFF)πŸ”— i

This module provides utilities for reading and writing RIFF files.

1Reading and WritingπŸ”— i

procedure

( read-riff [in])(is-a?/c riff% )

(read-riff indispatch)(is-a?/c riff% )
dispatch:(-> bytes? (or/c (subclass?/c riff% )#f))
Reads RIFF data from in and returns it. If dispatch is supplied, it must be a procedure accepting a four-byte chunk ID, and returning a subclass of riff% or #f if no special handling is required.

procedure

( write-riff v[out])void?

Writes the RIFF object v to out.

2Binary ClassesπŸ”— i

class

riff% :class?

superclass:object%

extends: binary<%>
The base type for all RIFF data.

constructor

( new riff% [idid][sizesize])(is-a?/c riff% )

id:bytes?

superclass:riff%

Represents a raw chunk.

constructor

[datadata]
...superclass-args...)
data:bytes?

superclass:riff%

Represents a list chunk.

constructor

[typetype]
[chunkschunks]
...superclass-args...)(is-a?/c riff:list% )
type:bytes?
chunks:(listof (is-a?/c riff% ))

method

(send a-riff:list chunk-ref id...+)(or/c (is-a?/c riff% )#f)

id:bytes?
Returns the first sub-chunk with ID matching id. If multiple ids are supplied, they refer to nested sub-chunks.

A binary type for reading chunk IDs.

procedure

( pad/word type)binary?

type:binary?
Returns a binary type based on type, with padding to the nearest word.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /